brumi1024 commented on code in PR #4150:
URL: https://github.com/apache/hadoop/pull/4150#discussion_r848182436


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/DefaultAMSProcessor.java:
##########
@@ -351,7 +351,19 @@ public void allocate(ApplicationAttemptId appAttemptId,
         ((AbstractYarnScheduler)getScheduler())
             .getApplicationAttempt(appAttemptId).pullUpdateContainerErrors());
 
-    response.setNumClusterNodes(getScheduler().getNumClusterNodes());
+    String label="";
+    try {
+      label = rmContext.getScheduler()
+          .getQueueInfo(app.getQueue(), false, false)
+          .getDefaultNodeLabelExpression();
+    } catch (Exception e){
+    }

Review Comment:
   One thing about this: is the "queue missing" is a valid scenario here? If it 
is, and it's completely normal to not have any queue returned here, can you 
please write a comment (or a debug log line)? If it's not a valid scenario an 
exception could be thrown.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to