فهرست منبع

YARN-6493. Print requested node partition in assignContainer logs. (Jonathan Hung via wangda)

Change-Id: I6b045ebf0be09bcc73d4bf009ca60a59f9626916
Wangda Tan 8 سال پیش
والد
کامیت
e9575d7dae

+ 6 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java

@@ -1551,12 +1551,17 @@ public class LeafQueue extends AbstractCSQueue {
       // Inform the node
       node.allocateContainer(allocatedContainer);
 
+      String label = RMNodeLabelsManager.NO_LABEL;
+      if (node.getLabels() != null && !node.getLabels().isEmpty()) {
+        label = node.getLabels().iterator().next();
+      }
       LOG.info("assignedContainer" +
           " application attempt=" + application.getApplicationAttemptId() +
           " container=" + container + 
           " queue=" + this + 
           " clusterResource=" + clusterResource + 
-          " type=" + type);
+          " type=" + type +
+          " requestedPartition=" + label);
 
       createdContainer.setValue(allocatedContainer);
       return container.getResource();