Author: challngr Date: Thu Sep 5 14:34:27 2013 New Revision: 1520328 URL: http://svn.apache.org/r1520328 Log: UIMA-3249 Make sure RM doesn't throw if ResourceClass can't find a refused job. (Just ignore the job).
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/ResourceClass.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/ResourceClass.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/ResourceClass.java?rev=1520328&r1=1520327&r2=1520328&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/ResourceClass.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/ResourceClass.java Thu Sep 5 14:34:27 2013 @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.Comparator; import java.util.HashMap; +import org.apache.uima.ducc.common.utils.DuccLogger; import org.apache.uima.ducc.common.utils.DuccProperties; import org.apache.uima.ducc.common.utils.SystemPropertyResolver; @@ -34,7 +35,7 @@ public class ResourceClass implements SchedConstants, IEntity { - //private DuccLogger logger = DuccLogger.getLogger(this.getClass(), COMPONENT_NAME); + private DuccLogger logger = DuccLogger.getLogger(this.getClass(), COMPONENT_NAME); private String id; private Policy policy; @@ -417,8 +418,11 @@ public class ResourceClass void removeJob(IRmJob j) { + String methodName = "removeJob"; if ( ! allJobs.containsKey(j) ) { - throw new SchedulingException(j.getId(), "Priority class " + getName() + " cannot find job to remove."); + if ( j.isRefused() ) return; + + logger.error(methodName, j.getId(), "Priority class", getName(), "cannot find job to remove."); } allJobs.remove(j);