use of org.ow2.proactive.resourcemanager.nodesource.infrastructure.InfrastructureManager in project scheduling by ow2-proactive.
the class NodesRecoveryManager method recoverFullyDeployedInfrastructureOrReset.
protected boolean recoverFullyDeployedInfrastructureOrReset(String nodeSourceName, NodeSource nodeSourceToDeploy, NodeSourceDescriptor descriptor) {
boolean recoverNodes = false;
boolean existPersistedNodes = this.existPersistedNodes(nodeSourceName);
if (existPersistedNodes) {
InfrastructureManager im = InfrastructureManagerFactory.recover(descriptor);
if (!im.getDeployingAndLostNodes().isEmpty()) {
// if there are deploying nodes, we will not recover
this.rmCore.getDbManager().removeAllNodesFromNodeSource(nodeSourceName);
} else {
recoverNodes = true;
nodeSourceToDeploy.setInfrastructureManager(im);
}
}
return recoverNodes;
}
Aggregations