You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/06 07:13:07 UTC

[GitHub] [flink] wangyang0918 commented on a diff in pull request #19675: [FLINK-27550] Remove checking yarn queues before submitting job to Yarn

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

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