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 2015/03/07 22:20:00 UTC

svn commit: r1664919 - in /uima/sandbox/uima-ducc/trunk: src/main/resources/ uima-ducc-common/src/main/java/org/apache/uima/ducc/common/ uima-ducc-common/src/test/resources/node_configuration_data/test1/resources/ uima-ducc-common/src/test/resources/no...

Author: challngr
Date: Sat Mar  7 21:19:59 2015
New Revision: 1664919

URL: http://svn.apache.org/r1664919
Log:
UIMA-4275 Reservations governed by max-allotment; left pending if can't be fulfilled for any reason.

Modified:
    uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeConfiguration.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test1/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test10/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test11/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test12/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test2/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test3/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test4/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test5/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test6/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test7/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test8/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test9/resources/ducc.classes
    uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/JobManagerConverter.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/IRmJob.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/NodepoolScheduler.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/ResourceClass.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/RmJob.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/Scheduler.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/SchedulingUpdate.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/User.java
    uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java

Modified: uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/src/main/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -75,7 +75,6 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -88,7 +87,6 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeConfiguration.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeConfiguration.java?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeConfiguration.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/main/java/org/apache/uima/ducc/common/NodeConfiguration.java Sat Mar  7 21:19:59 2015
@@ -103,10 +103,10 @@ public class NodeConfiguration
         defaultFairShareClass.put("use-prediction", ""+SystemPropertyResolver.getBooleanProperty("ducc.rm.prediction", true));
         defaultFairShareClass.put("prediction-fudge", ""+SystemPropertyResolver.getIntProperty("ducc.rm.prediction.fudge", 60000));
         defaultFairShareClass.put("max-processes", Integer.toString(Integer.MAX_VALUE));
+        defaultFairShareClass.put("max-allotment", Integer.toString(Integer.MAX_VALUE));
         defaultFairShareClass.put("nodepool", "<required>");
         defaultFairShareClass.put("users", "<optional>");
         defaultFairShareClass.put("debug", "fixed");
-        defaultFairShareClass.put("hostile", "false");
         defaultFairShareClass.put("abstract", "<optional>");
         defaultFairShareClass.put("children", "<optional>");
         defaultFairShareClass.put("parent", "<optional>");
@@ -123,6 +123,7 @@ public class NodeConfiguration
         defaultFixedShareClass.put("priority", "5");
         defaultFixedShareClass.put("default", "<optional>");
         defaultFixedShareClass.put("max-processes", Integer.toString(Integer.MAX_VALUE));
+        defaultFixedShareClass.put("max-allotment", Integer.toString(Integer.MAX_VALUE));
         defaultFixedShareClass.put("cap", Integer.toString(Integer.MAX_VALUE));
         defaultFixedShareClass.put("nodepool", "<required>");
         defaultFixedShareClass.put("users", "<optional>");
@@ -136,6 +137,7 @@ public class NodeConfiguration
         defaultReserveClass.put("priority", "1");
         defaultReserveClass.put("default", "<optional>");
         defaultReserveClass.put("max-machines", Integer.toString(Integer.MAX_VALUE));
+        defaultReserveClass.put("max-allotment", Integer.toString(Integer.MAX_VALUE));
         defaultReserveClass.put("cap", Integer.toString(Integer.MAX_VALUE));
         defaultReserveClass.put("nodepool", "<required>");
         defaultReserveClass.put("users", "<optional>");
@@ -1126,6 +1128,13 @@ public class NodeConfiguration
         logInfo(methodName, String.format("   %-20s: %s", k, v));
     }
 
+    void printDeprecatedProperty(String k, Object v, String msg)
+    {
+        String methodName = "printProperty";
+        if ( v == null ) return;  // ignore non-existant properties
+        logInfo(methodName, String.format("   %-20s: Deprecated property - %s", k, msg));
+    }
+
     /**
      * Print class values in controlled order and format, not to be confused
      * with what you'd get just iterating the map.
@@ -1133,24 +1142,22 @@ public class NodeConfiguration
     void printClass(DuccProperties cl)
     {        
         String methodName = "printClass";
-        logInfo(methodName, "Class " +      cl.get("name"));
-        printProperty("Policy",             cl.get("policy"));
-        if ( cl.get("policy").equals("FAIR_SHARE") ) {
-            printProperty("hostile",        cl.get("hostile"));
-        }
-        printProperty("Nodepool",           cl.get("nodepool"));
-        printProperty("Priority",           cl.get("priority"));
-        printProperty("Weight",             cl.get("weight"));
-        printProperty("Debug",              cl.get("debug"));
-        printProperty("Cap",                cl.get("cap"));
-        printProperty("Expand By Doubling", cl.get("expand-by-doubling"));
-        printProperty("Initialization Cap", cl.get("initialization-cap"));
-        printProperty("Use Prediction",     cl.get("use-prediction"));
-        printProperty("Prediction Fudge",   cl.get("prediction-fudge"));
-        printProperty("Max Processes",      cl.get("max-processes"));
-        printProperty("Max Machines",       cl.get("max-machines"));
-        printProperty("Enforce Memory Size",cl.get("enforce"));
-        printProperty("Authorized Users"   ,cl.get("users"));
+        logInfo(methodName, "Class " +           cl.get("name"));
+        printProperty("Policy",                  cl.get("policy"));
+        printProperty("Nodepool",                cl.get("nodepool"));
+        printProperty("Priority",                cl.get("priority"));
+        printProperty("Weight",                  cl.get("weight"));
+        printProperty("Debug",                   cl.get("debug"));
+        printDeprecatedProperty("Cap",           cl.get("cap"),           "IGNORED Use max-allotment = [mem in GB] instead.");
+        printProperty("Expand By Doubling",      cl.get("expand-by-doubling"));
+        printProperty("Initialization Cap",      cl.get("initialization-cap"));
+        printProperty("Use Prediction",          cl.get("use-prediction"));
+        printProperty("Prediction Fudge",        cl.get("prediction-fudge"));
+        printDeprecatedProperty("Max Processes", cl.get("max-processes"), "IGNORED Use max-allotment = [mem in GB] instead.");
+        printDeprecatedProperty("Max Machines" , cl.get("max-machines") , "IGNORED Use max-allotment = [mem in GB] instead.");
+        printProperty("Max Allotment",           cl.get("max-allotment"));
+        printProperty("Enforce Memory Size",     cl.get("enforce"));
+        printProperty("Authorized Users"   ,     cl.get("users"));
 
         logInfo(methodName, "");
     }
@@ -1162,7 +1169,7 @@ public class NodeConfiguration
 
         for (Object o : cl.keySet() ) {
         		String k = (String) o;
-            if ( k.startsWith("max_allotment.") ) {
+            if ( k.startsWith("max-allotment.") ) {
                 printProperty(k, cl.get(k));
             }
         }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test1/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test1/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test1/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test1/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -55,6 +55,7 @@ Class fair-base {
       priority = 10
       weight = 100
       abstract = true
+      cap = 50
 }
 
 # These classes are derived from fair-base, and override the 'weight' property.  As well
@@ -73,6 +74,7 @@ Class fixed-base {
       priority = 5
       abstract = true
       max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -85,6 +87,7 @@ Class reserve-base {
       priority = 1
       abstract = true
       max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test10/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test10/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test10/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test10/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test11/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test11/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test11/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test11/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -73,7 +73,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true }
@@ -85,7 +85,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test12/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test12/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test12/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test12/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test2/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test2/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test2/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test2/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test3/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test3/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test3/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test3/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test4/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test4/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test4/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test4/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test5/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test5/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test5/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test5/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test6/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test6/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test6/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test6/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test7/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test7/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test7/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test7/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test8/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test8/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test8/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test8/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test9/resources/ducc.classes
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test9/resources/ducc.classes?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test9/resources/ducc.classes (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-common/src/test/resources/node_configuration_data/test9/resources/ducc.classes Sat Mar  7 21:19:59 2015
@@ -72,7 +72,7 @@ Class fixed-base {
       nodepool = --default--
       priority = 5
       abstract = true
-      max-processes = 10
+      max-allotment = 10
 }
 
 Class fixed      fixed-base  { default = true}
@@ -84,7 +84,7 @@ Class reserve-base {
       nodepool = --default--
       priority = 1
       abstract = true
-      max-machines = 10
+      max-allotment = 10
 }
  
 Class reserve     reserve-base { default = true }

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=1664919&r1=1664918&r2=1664919&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 Sat Mar  7 21:19:59 2015
@@ -608,7 +608,7 @@ public class JobManagerConverter
             // if not recovering, and the class is not authorized, stop it dead here
             // if we are recovering, might no longer be authorized - the main scheduler will
             // deal with this as appropriate for the scheduling policy.
-            refuse(j, "User not authorized to use class '" + className + "'");
+            refuse(j, "User '" + user_name + "' not authorized to use class '" + className + "'");
             if ( ! mustRecover ) {
                 return false;
             }

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/IRmJob.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/IRmJob.java?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/IRmJob.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/IRmJob.java Sat Mar  7 21:19:59 2015
@@ -199,6 +199,12 @@ public interface IRmJob
     String getRefusalReason();
     boolean isRefused();
 
+    /**
+     * Can't schedule non-preemptable yet, but maybe later
+     */
+    void defer(String refsual);
+    void undefer();
+    boolean isDeferred();
 
     /**
      * Scheduler looks at job memory and decides what its share order is.

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/NodepoolScheduler.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/NodepoolScheduler.java?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/NodepoolScheduler.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/NodepoolScheduler.java Sat Mar  7 21:19:59 2015
@@ -1059,7 +1059,8 @@ public class NodepoolScheduler
     // private static int stop_here_dx = 0;
     protected void traverseNodepoolsForExpansion(NodePool np, ArrayList<ResourceClass> rcs)
     {
-    	String methodName = "traverseNodepoolsForExpansion";
+    	    @SuppressWarnings("unused")
+		String methodName = "traverseNodepoolsForExpansion";
         // HashMap<String, NodePool> subpools = np.getChildren();
         List<NodePool> subpools = np.getChildrenAscending();
 
@@ -1352,10 +1353,11 @@ public class NodepoolScheduler
             Iterator<IRmJob> jlist = jobs.iterator();
             while ( jlist.hasNext() ) {
                 IRmJob j = jlist.next();
+                j.undefer();
 
                 if ( np == null ) {                      // oops - no nodes here yet, must refuse all jobs
                     
-                    schedulingUpdate.refuse(j, "Reservation refused because insufficient resources are available.");
+                    schedulingUpdate.defer(j, "Reservation deferred because insufficient resources are available.");
                     logger.warn(methodName, j.getId(), "Job scheduled to class "
                                                        + rc.getName()
                                                        + " but associated nodepool has no resources");
@@ -1382,7 +1384,7 @@ public class NodepoolScheduler
                 }
             }
 
-            if ( np == null ) {                         // no np. jobs have been refused, cannot continue.
+            if ( np == null ) {                         // no np. jobs have been deferred, cannot continue.
                 return;
             }
 
@@ -1403,7 +1405,7 @@ public class NodepoolScheduler
                 int classcap;
                 
                 if ( np.countLocalMachines() == 0 ) {
-                    schedulingUpdate.refuse(j, "Reservation refused because insufficient resources are available."); 
+                    schedulingUpdate.defer(j, "Reservation deferred because resources are exhausted."); 
                     logger.warn(methodName, j.getId(), "Job asks for " 
                                             + nrequested 
                                             + " reserved machines but reservable resources are exhausted for nodepool "
@@ -1411,26 +1413,10 @@ public class NodepoolScheduler
                     continue;
                 }
 
-                if ( rc.getMaxMachines() < nrequested ) {               // Does it blow the configured limit for this class?
-                    schedulingUpdate.refuse(j, "Reservation refused because class max of " + rc.getMaxMachines() + "is exceeded.");
+                if ( rc.allotmentExceeded(j) ) {               // Does it blow the configured limit for this class?
+                    schedulingUpdate.defer(j, "Reservation deferred because allotment of " + rc.getAllotment(j) + " is exceeded by user " + j.getUserName());
                     continue;
                 }
-
-                classcap = calcCaps(rc.getAbsoluteCap(), rc.getPercentCap(), np.countLocalMachines());
-                logger.info(methodName, j.getId(), "Absolute cap:", rc.getAbsoluteCap(), "PercentCap", rc.getPercentCap(), "np.countLocalMachines", np.countLocalMachines(), "cap", classcap);
-                //
-                // Assumption to continue is that this is a new reservation
-                //
-                if ( (machines_given_out + nrequested) > classcap ) {
-                    schedulingUpdate.refuse(j, "Reservation refused because class cap of " + classcap + " is exceeded.");
-                    logger.warn(methodName, j.getId(), "Job asks for " 
-                                            + nrequested 
-                                            + " reserved machines but total machines for class '" + rc.getName()
-                                            + "' exceeds class cap of "
-                                            + classcap);
-                                            
-                    continue;
-                }               
                 
                 logger.info(methodName, j.getId(), "Job is granted " + nrequested + " machines for reservation.");
                 //j.addQShares(nrequested * order);
@@ -1446,16 +1432,17 @@ public class NodepoolScheduler
                     given = np.countFreeableMachines(j, false);
                 }           
 
+                // The counts worked out but for some reason we can't find / evict enough space
                 if ( given == 0 ) {
-                    schedulingUpdate.refuse(j, "Reservation is refused because insufficient resources are available.");
+                    schedulingUpdate.defer(j, "Reservation is deferred because insufficient resources are available.");
                     if ( rc.enforceMemory() ) {
-                        logger.warn(methodName, j.getId(), "Reservation refused: asks for " 
+                        logger.warn(methodName, j.getId(), "Reservation deferred: asks for " 
                                                 + nrequested 
                                                 + " reserved machines with exactly "
                                                 + j.getShareOrder()  
                                                 + " shares but there are insufficient freeable machines.");
                     } else {
-                        logger.warn(methodName, j.getId(), "Reservation refused: ask for " 
+                        logger.warn(methodName, j.getId(), "Reservation deferred: ask for " 
                                                 + nrequested 
                                                 + " reserved machines with at least "
                                                 + j.getShareOrder()  
@@ -1482,6 +1469,10 @@ public class NodepoolScheduler
                     continue;
                 }
 
+                if ( j.isDeferred() ) {                  // counts don't work, we can't do this yet
+                    continue;
+                }
+
                 if ( j.countNShares() > 0 ) {            // shares already allocated, nothing to do (all-or-nothing policy in effect)
                     continue;
                 }
@@ -2189,6 +2180,10 @@ public class NodepoolScheduler
                     continue;
                 }
 
+                if ( j.isDeferred() ) {
+                    continue;
+                }
+
                 int counted = 0;
                 switch ( rc.getPolicy() ) {
                     case FAIR_SHARE:

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=1664919&r1=1664918&r2=1664919&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 Sat Mar  7 21:19:59 2015
@@ -42,16 +42,13 @@ public class ResourceClass
     private Policy policy;
     private int priority;           // orders evaluation of the class
 
-
     private int share_weight;       // for fair-share, the share weight to use
-    private int min_shares;         // fixed-shre: min shares to hand out
-    private int max_processes = 0;  // fixed-share: max shares to hand out regardless of
-                                    // what is requested or what fair-share turns out to be
 
-    private int max_machines = 0;   // reservation: max machines that can be reserved by a single user - global across
-                                    // all this user's requests.
+    private int share_quantum;      // for limits, to convert shares to GB
+    private int max_allotment;      // All allocation policies, max in GB
+    private int max_processes;      // fixed-share: max shares to hand out regardless of
+                                    // what is requested or what fair-share turns out to be
 
-    // for reservation, this caps machines. 
     // for shares, this caps shares
     private int absolute_cap;       // max shares or machines this class can hand out
     private double percent_cap;     // max shares or machines this class can hand out as a percentage of all shares
@@ -60,9 +57,9 @@ public class ResourceClass
 
     private Map<String, String> authorizedUsers = new HashMap<String, String>();      // if non-empty, restricted set of users
                                                                                       // who can use this class
-    private HashMap<IRmJob, IRmJob> allJobs = new HashMap<IRmJob, IRmJob>();
+    private HashMap<IRmJob, IRmJob>                   allJobs = new HashMap<IRmJob, IRmJob>();
     private HashMap<Integer, HashMap<IRmJob, IRmJob>> jobsByOrder = new HashMap<Integer, HashMap<IRmJob, IRmJob>>();
-    private HashMap<User, HashMap<IRmJob, IRmJob>> jobsByUser = new HashMap<User, HashMap<IRmJob, IRmJob>>();
+    private HashMap<User, HashMap<IRmJob, IRmJob>>    jobsByUser = new HashMap<User, HashMap<IRmJob, IRmJob>>();
     private int max_job_order = 0;  // largest order of any job still alive in this rc (not necessarily globally though)
 
     private NodePool nodepool = null;
@@ -93,7 +90,7 @@ public class ResourceClass
 
     private static Comparator<IEntity> apportionmentSorter = new ApportionmentSorterCl();
 
-    public ResourceClass(DuccProperties props)
+    public ResourceClass(DuccProperties props, long share_quantum)
     {
         //
         // We can assume everything useful is here because the parser insured it
@@ -101,7 +98,7 @@ public class ResourceClass
         this.id = props.getStringProperty("name");
         this.policy = Policy.valueOf(props.getStringProperty("policy"));
         this.priority = props.getIntProperty("priority");
-        this.min_shares = 0;
+        this.share_quantum = (int) (share_quantum / ( 1024 * 1024 ));        // KB back to GB
 
         String userset = props.getProperty("users");
         if ( userset != null ) {
@@ -111,18 +108,16 @@ public class ResourceClass
             }
         }
 
+        this.max_allotment = props.getIntProperty("max-allotment", Integer.MAX_VALUE);
+
         if ( policy == Policy.RESERVE ) {
-            this.max_machines = props.getIntProperty("max-machines");
             this.enforce_memory = props.getBooleanProperty("enforce", true);
         }
 
         if ( policy != Policy.RESERVE ) {
-            this.max_processes = props.getIntProperty("max-processes");
+            this.max_processes = props.getIntProperty("max-processes", Integer.MAX_VALUE);
         }
 
-        if ( max_processes <= 0 ) max_processes = Integer.MAX_VALUE;
-        if ( max_machines <= 0 )  max_machines  = Integer.MAX_VALUE;
-
         this.absolute_cap = Integer.MAX_VALUE;
         this.percent_cap  = 1.0;
 
@@ -264,12 +259,15 @@ public class ResourceClass
         return max_processes;
     }
 
-//     public int getMinShares() {
-//         return min_shares;
-//     }
-
-    public int getMaxMachines() {
-        return max_machines;
+    public int getAllotment(IRmJob j) 
+    {
+        User u = j.getUser();
+        int max = u.getClassLimit(this);
+        if ( max == Integer.MAX_VALUE ) {
+            return max_allotment;       // no user override
+        } else {
+            return max;
+        }
     }
     
     void setPolicy(Policy p)
@@ -295,6 +293,67 @@ public class ResourceClass
     }
 
     /**
+     * See if the total memory for job 'j' plus the occupancy of the 'jobs' exceeds 'max'
+     * Returns 'true' if occupancy is exceeded, else returns 'false'
+     * UIMA-4275
+     */
+    private boolean occupancyExceeded(int max, IRmJob j, Map<IRmJob, IRmJob> jobs)
+    {
+        int occupancy = 0;
+        for ( IRmJob job : jobs.values() ) {
+            if ( ! job.getUserName().equals(j.getUserName()) ) continue;           // limits are user based
+
+            // nshares_given is shares counted out for the job but maybe not assigned
+            // nshares       is shares given
+            // share_order   is used to convert nshares to qshares so
+            // so ( nshares_give + nshares ) * share_order is the current potential occupancy of the job
+            // Then multiply by the scheduling quantum to convert to GB
+            occupancy += ( job.countNSharesGiven()  * job.getShareOrder() * share_quantum ); // convert to GB
+        }
+        int requested = j.getMemory() * j.countInstances();
+        
+        if ( max - ( occupancy + requested ) < 0 ) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * Does this job push the per-user allotment over the top?
+     *
+     * Note that we don't store current occupancy directly, we always calculate it from the
+     * jobs assigned to the class.  Less bookkeeping that way.
+     * UIMA-4275
+     */
+    public boolean allotmentExceeded(IRmJob j)
+    {
+        User u = j.getUser();
+        int max = u.getClassLimit(this);
+
+        switch ( policy ) {
+            case FIXED_SHARE:
+            case RESERVE:
+            {
+                if ( max != Integer.MAX_VALUE ) {
+                    // user is constrained, and the constraint overrides the class constraint
+                    return occupancyExceeded(max, j, jobsByUser.get(j.getUser()));
+                } else {
+                    // user is not constrained.  check class constraints
+                    if ( max_allotment == Integer.MAX_VALUE ) return false;   // no class constraints
+
+                    return occupancyExceeded(max_allotment, j, allJobs);
+                }
+            }
+
+            // for completion of the case - this is handled elsewhere
+            case FAIR_SHARE:
+            default:
+                return false;            
+        }
+    }
+
+    /**
      * Return my share weight, if I have any jobs of the given order or less.  If not,
      * return 0;
      */
@@ -570,15 +629,15 @@ public class ResourceClass
     }
     
     // note we assume Nodepool is the last token so we don't set a len for it!
-    private static String formatString = "%12s %11s %4s %5s %5s %5s %6s %6s %7s %6s %6s %7s %5s %7s %s";
+    private static String formatString = "%12s %11s %4s %5s %5s %6s %6s %7s %6s %6s %7s %5s %7s %s";
     public static String getDashes()
     {
-        return String.format(formatString, "------------", "-----------",  "----", "-----", "-----", "-----", "------", "------", "-------", "------", "------", "-------", "-----", "-------", "--------");
+        return String.format(formatString, "------------", "-----------",  "----", "-----", "-----", "------", "------", "-------", "------", "------", "-------", "-----", "-------", "--------");
     }
 
     public static String getHeader()
     {
-        return String.format(formatString, "Class Name", "Policy", "Prio", "Wgt", "MinSh", "MaxSh", "AbsCap", "PctCap", "InitCap", "Dbling", "Prdct", "PFudge", "Shr", "Enforce", "Nodepool");
+        return String.format(formatString, "Class Name", "Policy", "Prio", "Wgt", "MaxSh", "AbsCap", "PctCap", "InitCap", "Dbling", "Prdct", "PFudge", "Shr", "Enforce", "Nodepool");
     }
 
     @Override
@@ -588,12 +647,11 @@ public class ResourceClass
     }
 
     public String toString() {
-        return String.format("%12s %11s %4d %5d %5d %5d %6d %6d %7d %6s %6s %7d %5d %7s %s", 
+        return String.format(formatString,
                              id,
                              policy.toString(),
                              priority, 
                              share_weight, 
-                             makeReadable(min_shares), 
                              makeReadable(max_processes), 
                              makeReadable(absolute_cap), 
                              (int) (percent_cap *100), 

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/RmJob.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/RmJob.java?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/RmJob.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/RmJob.java Sat Mar  7 21:19:59 2015
@@ -84,7 +84,7 @@ public class RmJob
     protected HashMap<Share, Share> pendingRemoves;      // job is scheduled to remove these but not confirmed
     protected HashMap<Share, Share> recoveredShares;     // recovery after bounce, need to reconnect these
 
-    protected int total_assigned = 0;                    // non-preemptable only, total shares every assigned
+    protected int total_assigned = 0;                    // non-preemptable only, total shares ever assigned
 
     // track shares by machine, and machines, to help when we have to give stuff away
     Map<Machine, Map<Share, Share>> sharesByMachine = new HashMap<Machine, Map<Share, Share>>();
@@ -106,6 +106,8 @@ public class RmJob
     protected Properties jobprops;                       // input that job is constructed from. currently is condensed from Blade logs (simulation only)
 
     protected String refusalReason = null;               // if refused, this is why, for the message
+    boolean   refused = false;
+    boolean   deferred = false;
 
     private static Comparator<IEntity> apportionmentSorter = new ApportionmentSorterCl();
 
@@ -870,14 +872,34 @@ public class RmJob
 
     public void refuse(String refusal)
     {
-        String methodName = "refusal";
+        String methodName = "refuse";
         logger.warn(methodName, id, refusal);
         this.refusalReason = refusal;
+        deferred = true;
+    }
+
+    public void defer(String reason)
+    {
+        String methodName = "defer";
+        logger.info(methodName, id, reason);
+        this.refusalReason = reason;
+        deferred = true;
+    }
+
+    public void undefer()
+    {
+        deferred = false;
+        refusalReason = null;
     }
 
     public boolean isRefused()
     {
-    	return (refusalReason != null);
+    	return refused;
+    }
+    
+    public boolean isDeferred()
+    {
+    	return deferred;
     }
     
     public String getRefusalReason()

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=1664919&r1=1664918&r2=1664919&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 Sat Mar  7 21:19:59 2015
@@ -105,13 +105,13 @@ public class Scheduler
 
     int defaultNThreads = 1;
     int defaultNTasks = 10;
-    int defaultMemory = 16;
+    int defaultMemory = 15;
 
     // these two are initialized in constructor
     String schedImplName;
     IScheduler[] schedulers;
 
-    long share_quantum    = 16;             // 16 GB in KB - smallest share size
+    long  share_quantum    = 15;             // 15 GB in KB - smallest share size
     long share_free_dram  = 0;              // 0  GB in KB  - minim memory after shares are allocated
     long dramOverride     = 0;              // if > 0, use this instead of amount reported by agents (modeling and testing)
 
@@ -145,8 +145,8 @@ public class Scheduler
     // 1.0.2 - vary-on, vary-off
     // 1.0.3 - fix bad check in recursion in NodepoolScheduler.doEvictions
     // 1.1.0 - Syncnronize with release
-    final static int rmversion_major = 1;
-    final static int rmversion_minor = 1;
+    final static int rmversion_major = 2;
+    final static int rmversion_minor = 0;
     final static int rmversion_ptf   = 0;  
     final static String rmversion_string = null;
 
@@ -175,7 +175,7 @@ public class Scheduler
         // some defaults, for jobs that don't specify them
         defaultNTasks     = SystemPropertyResolver.getIntProperty("ducc.rm.default.tasks", 10); 
         defaultNThreads   = SystemPropertyResolver.getIntProperty("ducc.rm.default.threads", 1);
-        defaultMemory     = SystemPropertyResolver.getIntProperty("ducc.rm.default.memory", 16);      // in GB
+        defaultMemory     = SystemPropertyResolver.getIntProperty("ducc.rm.default.memory", 15);      // in GB
         // expandByDoubling  = RmUtil.getBooleanProperty("ducc.rm.expand.by.doubling", true);
 
         nodeStability     = SystemPropertyResolver.getIntProperty("ducc.rm.node.stability", 3);        // number of node metrics updates to wait for before scheduling
@@ -537,7 +537,7 @@ public class Scheduler
         logger.info(methodName, null, ResourceClass.getHeader());
         logger.info(methodName, null, ResourceClass.getDashes());
         for ( DuccProperties props : cls.values() ) {
-            ResourceClass rc = new ResourceClass(props);
+            ResourceClass rc = new ResourceClass(props, share_quantum);            
             resourceClasses.put(rc, rc);
             resourceClassesByName.put(rc.getName(), rc);
             logger.info(methodName, null, rc.toString());
@@ -610,7 +610,10 @@ public class Scheduler
             String n = (String) o;
             DuccProperties dp = usrs.get(n);
             for ( Object l : dp.keySet() ) {                  // iterate over limits for the user
-                int lim = Integer.parseInt( ((String)dp.get(l)).trim()); // verified parsable int during parsing
+                if ( !((String)l).startsWith("max-allotment")) continue; // only this supported at this time
+                String val = ((String) dp.get(l)).trim();
+
+                int lim = Integer.parseInt( val ); // verified parsable int during parsing
                 String[] tmp = ((String)l).split("\\.");                // max_allotment.classname
                 User user = users.get(n);
                 if (user == null) {
@@ -1388,9 +1391,7 @@ public class Scheduler
 
         // -- clean up user list
         User user = users.get(j.getUserName());
-        if ( user.remove(job) == 0 ) {
-            users.remove(user.getName());
-        }
+        user.remove(job);         // UIMA4275 don't clean up users list because it may have registry things in it
 
         ResourceClass rc = job.getResourceClass();
         if ( rc != null ) {

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/SchedulingUpdate.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/SchedulingUpdate.java?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/SchedulingUpdate.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/SchedulingUpdate.java Sat Mar  7 21:19:59 2015
@@ -80,6 +80,11 @@ public class SchedulingUpdate
         refusals.put(j, j);
     }
 
+    void defer(IRmJob j, String reason)
+    {
+        j.defer(reason);
+    }
+
     HashMap<IRmJob, IRmJob> getRefusedJobs() 
     {
         return refusals;

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/User.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/User.java?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/User.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-rm/src/main/java/org/apache/uima/ducc/rm/scheduler/User.java Sat Mar  7 21:19:59 2015
@@ -57,6 +57,12 @@ public class User
         classLimits.put(rc, lim);
     }
 
+    int getClassLimit(ResourceClass rc)
+    {
+        if ( classLimits.containsKey(rc) ) return classLimits.get(rc);
+        else                               return Integer.MAX_VALUE;
+    }
+
     void addJob(IRmJob j)
     {
         jobs.put(j, j);

Modified: uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java
URL: http://svn.apache.org/viewvc/uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java?rev=1664919&r1=1664918&r2=1664919&view=diff
==============================================================================
--- uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java (original)
+++ uima/sandbox/uima-ducc/trunk/uima-ducc-transport/src/main/java/org/apache/uima/ducc/transport/event/RmStateDuccEvent.java Sat Mar  7 21:19:59 2015
@@ -96,7 +96,7 @@ public class RmStateDuccEvent
             int counter = 0;
             
             if (j.isRefused() ) {
-                buf.append(String.format("%s %s\n\tRefused: %s", j.getDuccType(), j.getId().getFriendly(), j.getReason()));
+                buf.append(String.format("%s %s\n\tRefused: %s\n", j.getDuccType(), j.getId().getFriendly(), j.getReason()));
                 continue;
             }