zuston commented on code in PR #19675:
URL: https://github.com/apache/flink/pull/19675#discussion_r882444459
##########
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.
+ if (!queueName.contains(".")) {
+ String[] splitArray = this.yarnQueue.split("\\.");
+ if (queueName.equals(splitArray[splitArray.length -
1])) {
+ queueFound = true;
+ break;
+ }
+ }
}
if (!queueFound) {
- String queueNames =
StringUtils.toQuotedListString(queues.toArray());
Review Comment:
This will print out object.tostring info, and should only print the queue
name.
--
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]