Explorar el Código

YARN-5678. Log demand as demand in FSLeafQueue and FSParentQueue. (Yufei Gu via kasha)

Karthik Kambatla hace 8 años
padre
commit
82857037b6

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSLeafQueue.java

@@ -295,7 +295,7 @@ public class FSLeafQueue extends FSQueue {
     Resource toAdd = sched.getDemand();
     Resource toAdd = sched.getDemand();
     if (LOG.isDebugEnabled()) {
     if (LOG.isDebugEnabled()) {
       LOG.debug("Counting resource from " + sched.getName() + " " + toAdd
       LOG.debug("Counting resource from " + sched.getName() + " " + toAdd
-          + "; Total resource consumption for " + getName() + " now "
+          + "; Total resource demand for " + getName() + " now "
           + demand);
           + demand);
     }
     }
     demand = Resources.add(demand, toAdd);
     demand = Resources.add(demand, toAdd);

+ 3 - 3
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fair/FSParentQueue.java

@@ -158,13 +158,13 @@ public class FSParentQueue extends FSQueue {
       for (FSQueue childQueue : childQueues) {
       for (FSQueue childQueue : childQueues) {
         childQueue.updateDemand();
         childQueue.updateDemand();
         Resource toAdd = childQueue.getDemand();
         Resource toAdd = childQueue.getDemand();
+        demand = Resources.add(demand, toAdd);
+        demand = Resources.componentwiseMin(demand, maxShare);
         if (LOG.isDebugEnabled()) {
         if (LOG.isDebugEnabled()) {
           LOG.debug("Counting resource from " + childQueue.getName() + " " +
           LOG.debug("Counting resource from " + childQueue.getName() + " " +
-              toAdd + "; Total resource consumption for " + getName() +
+              toAdd + "; Total resource demand for " + getName() +
               " now " + demand);
               " now " + demand);
         }
         }
-        demand = Resources.add(demand, toAdd);
-        demand = Resources.componentwiseMin(demand, maxShare);
         if (Resources.equals(demand, maxShare)) {
         if (Resources.equals(demand, maxShare)) {
           break;
           break;
         }
         }