[
https://issues.apache.org/jira/browse/YARN-11593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17777374#comment-17777374
]
ASF GitHub Bot commented on YARN-11593:
---------------------------------------
slfan1989 commented on code in PR #6199:
URL: https://github.com/apache/hadoop/pull/6199#discussion_r1365863997
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RouterCLI.java:
##########
@@ -77,25 +79,70 @@ public class RouterCLI extends Configured implements Tool {
private static final Logger LOG = LoggerFactory.getLogger(RouterCLI.class);
- protected final static Map<String, UsageInfo> ADMIN_USAGE =
- ImmutableMap.<String, UsageInfo>builder()
- // Command1: deregisterSubCluster
- .put("-deregisterSubCluster", new UsageInfo(
- "[-sc|--subClusterId [subCluster Id]]",
- "Deregister SubCluster, If the interval between the heartbeat time of
the subCluster " +
- "and the current time exceeds the timeout period, " +
- "set the state of the subCluster to SC_LOST."))
- // Command2: policy
- .put("-policy", new UsageInfo(
- "[-s|--save [queue;router weight;amrm weight;headroomalpha]] " +
- "[-bs|--batch-save [--format xml] [-f|--input-file fileName]]" +
- "[-l|--list [--pageSize][--currentPage][--queue][--queues]]",
- "We provide a set of commands for Policy:" +
- " Include list policies, save policies, batch save policies. " +
- " (Note: The policy type will be directly read from the" +
- " yarn.federation.policy-manager in the local yarn-site.xml.)" +
- " eg. (routeradmin -policy [-s|--save]
root.a;SC-1:0.7,SC-2:0.3;SC-1:0.7,SC-2:0.3;1.0)"))
- .build();
+ protected final static UsageInfo SUBCLUSTER_ID = new
UsageInfo("<-sc|--subClusterId>",
+ "'-sc' option allows you to specify the sub-cluster to operate on, " +
+ "while the '--subClusterId' option is the long format of -sc and serves
the same purpose.");
+ protected final static String DSEXAMPLE_1 = "yarn routeradmin
-deregisterSubCluster -sc SC-1";
+ protected final static String DSEXAMPLE_2 = "yarn routeradmin
-deregisterSubCluster --subClusterId SC-1";
+
+ protected final static RouterExampleUsageInfos DSEXAMPLEUSAGEINFOS_1 = new
RouterExampleUsageInfos(
+ Arrays.asList(DSEXAMPLE_1, DSEXAMPLE_2),
+ Arrays.asList("At this point we can use the following command:"));
+ protected final static RouterUsageInfos DEREGISTER_SUBCLUSTER =
+ new RouterUsageInfos(Arrays.asList(SUBCLUSTER_ID),
+ Arrays.asList("deregister subCluster, " +
Review Comment:
Thanks for your feedback! I will improve this part of the code to make it
more readable.
> [Federation] Improve command line help information.
> ---------------------------------------------------
>
> Key: YARN-11593
> URL: https://issues.apache.org/jira/browse/YARN-11593
> Project: Hadoop YARN
> Issue Type: Sub-task
> Components: federation
> Affects Versions: 3.4.0
> Reporter: Shilun Fan
> Assignee: Shilun Fan
> Priority: Major
> Labels: pull-request-available
>
> This jira will improve the help information of routeradmin so that users can
> better understand and use commands.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]