You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/04/12 09:11:05 UTC

[GitHub] [hadoop] brumi1024 commented on a diff in pull request #4150: YARN-11107:When NodeLabel is enabled for a YARN cluster, AM blacklist…

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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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