long processFailureCount = job.getProcessFailureCount();
if(processFailureCount > 0) {
long limit = job.getProcessFailureLimit();
if(job.isInitialized()) {
if(processFailureCount >= limit) {
IRationale rationale = new Rationale("health monitor detected job process failures limit reached:"+limit);
StateManager.getInstance().jobTerminate(job, JobCompletionType.ProcessFailure, rationale, ProcessDeallocationType.JobCanceled);
logger.info(methodName, job.getDuccId(), JobCompletionType.ProcessFailure);
ckpt = true;
}
}
else {
IRationale rationale = new Rationale("health monitor detected job process failure during initialization of first process");
StateManager.getInstance().jobTerminate(job, JobCompletionType.ProcessInitializationFailure, rationale, ProcessDeallocationType.JobCanceled);
logger.info(methodName, job.getDuccId(), JobCompletionType.ProcessInitializationFailure);
ckpt = true;
}
}