You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by ch...@apache.org on 2013/11/18 20:35:46 UTC

svn commit: r1543124 - /uima/sandbox/uima-ducc/trunk/uima-ducc-sm/src/main/java/org/apache/uima/ducc/sm/ServiceHandler.java

Author: challngr
Date: Mon Nov 18 19:35:46 2013
New Revision: 1543124

URL: http://svn.apache.org/r1543124
Log:
UIMA-3237 Backing out this fix because manually stopping an instance is not
          distinguisable from instance failure that does not return an error.
          We'll address this in a future version.

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=1543124&r1=1543123&r2=1543124&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 Mon Nov 18 19:35:46 2013
@@ -678,14 +678,23 @@ public class ServiceHandler
                 if ( state == JobState.Completed ) {
                     sset.removeImplementor(id);
                     JobCompletionType jct = w.getCompletionType();
-                    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();
-                        }
+                        
+                    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;
                     }
                 }
             }