hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject hadoop git commit: YARN-5899. Debug log in AbstractCSQueue#canAssignToThisQueue needs improvement. Contributed by Ying Zhang.
Date Tue, 10 Jan 2017 08:38:42 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 6332a318b -> 9594c35dc


YARN-5899. Debug log in AbstractCSQueue#canAssignToThisQueue needs improvement. Contributed
by Ying Zhang.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/9594c35d
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/9594c35d
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/9594c35d

Branch: refs/heads/trunk
Commit: 9594c35dcb655add1991d8fd15897b40c4ad6205
Parents: 6332a31
Author: Sunil G <sunilg@apache.org>
Authored: Tue Jan 10 14:08:01 2017 +0530
Committer: Sunil G <sunilg@apache.org>
Committed: Tue Jan 10 14:08:01 2017 +0530

----------------------------------------------------------------------
 .../scheduler/capacity/AbstractCSQueue.java     | 45 ++++++++++++--------
 1 file changed, 28 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9594c35d/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
index d1fa410..cefa1e2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/AbstractCSQueue.java
@@ -632,31 +632,42 @@ public abstract class AbstractCSQueue implements CSQueue {
           if (Resources.lessThan(resourceCalculator, clusterResource,
               newTotalWithoutReservedResource, currentLimitResource)) {
             if (LOG.isDebugEnabled()) {
-              LOG.debug(
-                  "try to use reserved: " + getQueueName() + " usedResources: "
-                      + queueUsage.getUsed() + ", clusterResources: "
-                      + clusterResource + ", reservedResources: "
-                      + resourceCouldBeUnreserved
-                      + ", capacity-without-reserved: "
-                      + newTotalWithoutReservedResource + ", maxLimitCapacity: "
-                      + currentLimitResource);
+              LOG.debug("try to use reserved: " + getQueueName()
+                  + " usedResources: " + queueUsage.getUsed()
+                  + ", clusterResources: " + clusterResource
+                  + ", reservedResources: " + resourceCouldBeUnreserved
+                  + ", capacity-without-reserved: "
+                  + newTotalWithoutReservedResource
+                  + ", maxLimitCapacity: " + currentLimitResource);
             }
             return true;
           }
         }
+
+        // Can not assign to this queue
         if (LOG.isDebugEnabled()) {
-          LOG.debug(getQueueName() + "Check assign to queue, nodePartition="
-              + nodePartition + " usedResources: " + queueUsage
-              .getUsed(nodePartition) + " clusterResources: " + clusterResource
-              + " currentUsedCapacity " + Resources
-              .divide(resourceCalculator, clusterResource,
-                  queueUsage.getUsed(nodePartition), labelManager
-                      .getResourceByLabel(nodePartition, clusterResource))
-              + " max-capacity: " + queueCapacities
-              .getAbsoluteMaximumCapacity(nodePartition) + ")");
+          LOG.debug("Failed to assign to queue: " + getQueueName()
+              + " nodePatrition: " + nodePartition
+              + ", usedResources: " + queueUsage.getUsed(nodePartition)
+              + ", clusterResources: " + clusterResource
+              + ", reservedResources: " + resourceCouldBeUnreserved
+              + ", maxLimitCapacity: " + currentLimitResource
+              + ", currTotalUsed:" + usedExceptKillable);
         }
         return false;
       }
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Check assign to queue: " + getQueueName()
+            + " nodePartition: " + nodePartition
+            + ", usedResources: " + queueUsage.getUsed(nodePartition)
+            + ", clusterResources: " + clusterResource
+            + ", currentUsedCapacity: " + Resources
+            .divide(resourceCalculator, clusterResource,
+                queueUsage.getUsed(nodePartition), labelManager
+                    .getResourceByLabel(nodePartition, clusterResource))
+            + ", max-capacity: " + queueCapacities
+            .getAbsoluteMaximumCapacity(nodePartition));
+      }
       return true;
     } finally {
       readLock.unlock();


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message