[ 
https://issues.apache.org/jira/browse/YARN-11485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17786775#comment-17786775
 ] 

ASF GitHub Bot commented on YARN-11485:
---------------------------------------

slfan1989 commented on code in PR #6265:
URL: https://github.com/apache/hadoop/pull/6265#discussion_r1395798501


##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/main/java/org/apache/hadoop/yarn/client/cli/RMAdminCLI.java:
##########
@@ -1039,6 +1114,54 @@ protected String getUsageString() {
     return "Usage: rmadmin";
   }
 
+  /**
+   * Parse subClusterId.
+   * This method will only parse subClusterId when Yarn Federation mode is 
enabled.
+   *
+   * @param cliParser CommandLine.
+   * @return subClusterId.
+   */
+  protected String parseSubClusterId(CommandLine cliParser) {
+    // If YARN Federation mode is not enabled, return empty.
+    if (!isYarnFederationEnabled(getConf())) {
+      return StringUtils.EMPTY;
+    }
+
+    String subClusterId = cliParser.getOptionValue(OPTION_SUBCLUSTERID);
+    if(StringUtils.isBlank(subClusterId)) {

Review Comment:
   Thank you very much for your help in reviewing the code! I will fix it.





> [Federation] Router Supports Yarn Admin CLI Cmds.
> -------------------------------------------------
>
>                 Key: YARN-11485
>                 URL: https://issues.apache.org/jira/browse/YARN-11485
>             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 ticket aims to enhance the Router command by adding support for all 
> Yarn Admin CLI options.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org

Reply via email to