-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YARN-11474.The yarn queue list is displayed on the CLI #5577
Conversation
8e4ac93
to
25b2ebe
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@@ -60,6 +61,11 @@ public int run(String[] args) throws Exception { | |||
"List queue information about given queue."); | |||
opts.addOption(HELP_CMD, false, "Displays help for all commands."); | |||
opts.getOption(STATUS_CMD).setArgName("Queue Name"); | |||
opts.addOption(LIST_CMD, true, | |||
"All child queues are displayed according to the parent queue. " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 chars
* It prints the usage of the command | ||
* | ||
* It prints the usage of the command. | ||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid
@@ -122,6 +134,33 @@ private int listQueue(String queueName) throws YarnException, IOException { | |||
return rc; | |||
} | |||
|
|||
private int listChildQueues(String parentQueueName) throws IOException, YarnException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add document
int exitCode; | ||
PrintWriter writer = new PrintWriter( | ||
new OutputStreamWriter(sysout, Charset.forName("UTF-8"))); | ||
if (parentQueueName.equalsIgnoreCase("all")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constant
private void printQueueInfos(PrintWriter writer, List<QueueInfo> queueInfos) { | ||
writer.print(queueInfos.size() + " queues were found : \n"); | ||
writer.print("Queue Name\tQueue Path\tState\tCapacity\tCurrent Capacity" + | ||
"\tMaximum Capacity\tWeight\tMaximum Parallel Apps\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 chars
@slfan1989 Your suggestion has been changed, thank you! |
💔 -1 overall
This message was automatically generated. |
@@ -60,6 +64,11 @@ public int run(String[] args) throws Exception { | |||
"List queue information about given queue."); | |||
opts.addOption(HELP_CMD, false, "Displays help for all commands."); | |||
opts.getOption(STATUS_CMD).setArgName("Queue Name"); | |||
opts.addOption(LIST_CMD, true, | |||
"All child queues are displayed according to the parent queue. " + | |||
"If the value is all, all queues are displayed."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 chars
nodeLabels.add("JDK_7"); | ||
List<QueueInfo> queueInfos = new ArrayList<>(); | ||
QueueInfo queueInfo = QueueInfo. | ||
newInstance("queueA", "root.queueA", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one line.
3b390cf
to
d72f488
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@slfan1989 The javac is not caused by this pull request. |
@yl09099 Thanks for your contribution! merged. |
6c0c047
to
72c2b8c
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
YARN-11474.The yarn queue list is displayed on the CLI
The effect of printing queue information is as follows:
4 queues were found :
Queue Name Queue Path State Capacity Current Capacity Maximum Capacity Weight Maximum Parallel Apps
queueA root.queueA RUNNING 40.00% 50.00% 80.00% -1.00 10
queueB root.queueB RUNNING 40.00% 50.00% 80.00% -1.00 10
queueC root.queueC RUNNING 40.00% 50.00% 80.00% -1.00 10
queueD root.queueD RUNNING 40.00% 50.00% 80.00% -1.00 10