wangyang0918 commented on code in PR #19675:
URL: https://github.com/apache/flink/pull/19675#discussion_r889881541


##########
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java:
##########
@@ -752,14 +753,30 @@ private void checkYarnQueues(YarnClient yarnClient) {
                 // this session.
                 boolean queueFound = false;
                 for (QueueInfo queue : queues) {
-                    if (queue.getQueueName().equals(this.yarnQueue)
-                            || queue.getQueueName().equals("root." + 
this.yarnQueue)) {
+                    String queueName = queue.getQueueName();
+                    if (queueName.equals(this.yarnQueue)
+                            || queueName.equals("root." + this.yarnQueue)) {
                         queueFound = true;
                         break;
                     }
+
+                    // Distinguish capacity and fair scheduler based on 
whether queueName contain
+                    // ".", if In capacity scheduler, the queue name will 
contain and it will
+                    // only check the leaf queue name.

Review Comment:
   ```suggestion
                       // Distinguish capacity and fair scheduler based on 
whether queue name contains
                       // ".". The capacity scheduler always returns a 
full-path queue name(e.g. root.parent.q1)
                       // while the fair scheduler returns a leaf queue 
name(e.g. q2).
   ```



-- 
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]

Reply via email to