slfan1989 commented on code in PR #6199:
URL: https://github.com/apache/hadoop/pull/6199#discussion_r1364784350
##########
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),
Review Comment:
Thank you very much for your help in reviewing the code! I will improve this
part of the code.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]