Author: challngr Date: Fri Oct 25 14:50:22 2013 New Revision: 1535753 URL: http://svn.apache.org/r1535753 Log: UIMA-3378 Ignore job update if job hasn't yet been added to scheduling list.
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/Scheduler.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/Scheduler.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/Scheduler.java?rev=1535753&r1=1535752&r2=1535753&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/Scheduler.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/Scheduler.java Fri Oct 25 14:50:22 2013 @@ -1057,10 +1057,15 @@ public class Scheduler synchronized(completedJobs) { try { IRmJob job = allJobs.get(id); + if ( job == null ) { + logger.warn(methodName, id, "Job completion signal: early termination; nothing to complete."); + return; // canceled or terminated very soon. + } + logger.info(methodName, id, "Job completion signal."); completedJobs.add(job); - } catch (Exception e) { - logger.warn(methodName, id, e); + } catch (Throwable t) { + logger.warn(methodName, id, t); } } }