IDuccProcessMap processMap = driver.getProcessMap();
if(processMap != null) {
Collection<IDuccProcess> processCollection = processMap.values();
Iterator<IDuccProcess> iterator = processCollection.iterator();
while(iterator.hasNext()) {
IDuccProcess process = iterator.next();
if(!process.isDeallocated()) {
process.setResourceState(ResourceState.Deallocated);
process.setProcessDeallocationType(ProcessDeallocationType.JobCompleted);
logger.info(methodName, job.getDuccId(), process.getDuccId(), ProcessDeallocationType.JobCompleted);
ckpt = true;
}
else {
if(!process.isComplete()) {
String nodeName = process.getNodeIdentity().getName();
if(!NodeAccounting.getInstance().isAlive(nodeName)) {
process.advanceProcessState(ProcessState.Stopped);
logger.info(methodName, job.getDuccId(), process.getDuccId(), ProcessState.Stopped);
ckpt = true;
}
}
}
}