Author: challngr Date: Wed Oct 30 18:05:10 2013 New Revision: 1537218 URL: http://svn.apache.org/r1537218 Log: UIMA-3237 Treat all unsolicited instance completions as retryable failures.
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java?rev=1537218&r1=1537217&r2=1537218&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java Wed Oct 30 18:05:10 2013 @@ -678,23 +678,14 @@ public class ServiceHandler if ( state == JobState.Completed ) { sset.removeImplementor(id); JobCompletionType jct = w.getCompletionType(); - - logger.info(methodName, id, "Removing stopped instance from maps: state[", state, "] completion[", jct, "]"); - switch ( jct ) { - case EndOfJob: - case CanceledByUser: - case CanceledByAdministrator: - case Undefined: - break; - default: - logger.debug(methodName, id, "RECORDING FAILURE"); - // all other cases are errors that contribute to the error count - if ( sset.excessiveRunFailures() ) { // if true, the count is exceeeded, but reset - logger.warn(methodName, null, "Process Failure: " + jct + " Maximum consecutive failures[" + sset.failure_run + "] max [" + sset.failure_max + "]"); - } else { - sset.start(); - } - break; + if ( ! sset.isStopped() ) { + logger.warn(methodName, id, "UNEXPECTED instance termination in state[", state, "] with completion[", jct, "]"); + // all other cases are errors that contribute to the error count + if ( sset.excessiveRunFailures() ) { // if true, the count is exceeeded, but reset + logger.warn(methodName, null, "Process Failure: " + jct + " Maximum consecutive terminations[" + sset.failure_run + "] max [" + sset.failure_max + "]"); + } else { + sset.start(); + } } } }