Author: degenaro Date: Thu Oct 17 15:38:42 2013 New Revision: 1533125 URL: http://svn.apache.org/r1533125 Log: UIMA-3353 DUCC Fixed share Jobs that over-specify maximum process parallelism should be limited to maximum usable shares
Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java?rev=1533125&r1=1533124&r2=1533125&view=diff ============================================================================== --- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java (original) +++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java Thu Oct 17 15:38:42 2013 @@ -436,6 +436,16 @@ public class JobManagerConverter case FIXED_SHARE: max_processes = toInt(si.getSharesMax(), DEFAULT_INSTANCES); + // <uima-3353> + switch ( job.getDuccType() ) { + case Job: + int calc_max_processes = (int) Math.ceil(remaining_work/(threads*1.0)); + max_processes = Math.min(max_processes, calc_max_processes); + break; + default: + break; + } + // </uima-3353> j.setMaxShares(max_processes); j.setNInstances(max_processes); break;