zhangxiping1 commented on code in PR #4150:
URL: https://github.com/apache/hadoop/pull/4150#discussion_r848208717
##########
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:
Reference the SchedulerUtils. NormalizeAndValidateRequest fuction
`
try {
queueInfo = rmContext.getScheduler().getQueueInfo(queueName, false,
false);
} catch (IOException e) {
//Queue may not exist since it could be auto-created in case of
// dynamic queues
}
`
Should I add comments like this too?
--
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]