Author: burn Date: Thu Jun 18 22:41:34 2015 New Revision: 1686338 URL: http://svn.apache.org/r1686338 Log: UIMA-4465 Add verbiage to timeout exception and log with a single call
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndAbstract.java uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndTimeout.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndAbstract.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndAbstract.java?rev=1686338&r1=1686337&r2=1686338&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndAbstract.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndAbstract.java Thu Jun 18 22:41:34 2015 @@ -158,9 +158,12 @@ public abstract class ActionEndAbstract // int seqNo = metaCasHelper.getSystemKey(); try { - String delimiter = Standardize.Label.seqNo.get()+seqNo+" ***** EXCEPTION *****"; - toJdErrLog(delimiter); - toJdErrLog(printableException); + // Identify the timeout case in the header & record in one logger call as is multi-threadsd + if (printableException != null) { + toJdErrLog(Standardize.Label.seqNo.get()+seqNo+" ***** EXCEPTION *****\n"+printableException); + } else { + toJdErrLog(Standardize.Label.seqNo.get()+seqNo+" ***** TIMEOUT *****\n"+userException.toString()+"\n"); + } } catch(Exception e) { logger.error(location, ILogger.null_id, e); Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndTimeout.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndTimeout.java?rev=1686338&r1=1686337&r2=1686338&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndTimeout.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-container/src/main/java/org/apache/uima/ducc/container/jd/fsm/wi/ActionEndTimeout.java Thu Jun 18 22:41:34 2015 @@ -66,9 +66,8 @@ public class ActionEndTimeout extends Ac MessageBuffer mb = LoggerHelper.getMessageBuffer(actionData); mb.append("timeout"); logger.info(location, ILogger.null_id, mb.toString()); - Exception userException = new Exception("timeout"); - String printableException = userException.toString(); - handleException(actionData, userException, printableException); + Exception userException = new Exception("Timeout - work-item exceeded the specified 'process_per_item_time_max'"); + handleException(actionData, userException, null); displayProcessStatistics(logger, actionData, wi, pStats); } else {