hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tao Jie (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-5697) Use CliParser to parse options in RMAdminCLI
Date Thu, 13 Oct 2016 02:24:20 GMT

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

Tao Jie commented on YARN-5697:
-------------------------------

Thank you [~Naganarasimha],
I tried more ideal logic in earlier patch, but failed in testcase:TestRMAdminCLI#directlyAccessNodeLabelStore:
{code}
    // change the sequence of "-directlyAccessNodeLabelStore" and labels,
    // should not matter
    args =
        new String[] { "-addToClusterNodeLabels",
            "-directlyAccessNodeLabelStore", "x,y" };
    assertEquals(0, rmAdminCLI.run(args));
    assertTrue(dummyNodeLabelsManager.getClusterNodeLabelNames().containsAll(
        ImmutableSet.of("x", "y")));
{code}
It seems that we don't care about the position of {{-directlyAccessNodeLabelStore}} in command
line currently.
Although {{-directlyAccessNodeLabelStore}} is marked as deprecated, this option still leads
to different code path currently:
{code}
if (directlyAccessNodeLabelStore) {
      getNodeLabelManagerInstance(getConf()).replaceLabelsOnNode(map);
    } else {
      ResourceManagerAdministrationProtocol adminProtocol =
          createAdminProtocol();
      ReplaceLabelsOnNodeRequest request =
          ReplaceLabelsOnNodeRequest.newInstance(map);
      request.setFailOnUnknownNodes(failOnUnknownNodes);
      adminProtocol.replaceLabelsOnNode(request);
    }
{code}
Should we just remove the logic about {{-directlyAccessNodeLabelStore}} in this patch?
To make it clear,
1,  We should restrict command line format ({{rmadmin -addToClusterNodeLabels -directlyAccessNodeLabelStore
x,y}} will no longer be OK, also {{rmadmin -replaceLabelsOnNode -failOnUnknownNodes node1=label1}}
should be {{rmadmin -replaceLabelsOnNode node1=label1 -failOnUnknownNodes}}).
2, We should remove code about  {{-directlyAccessNodeLabelStore}} in this patch.
3, We should modify document and remove  {{-directlyAccessNodeLabelStore}}.
Agree?
 

> Use CliParser to parse options in RMAdminCLI
> --------------------------------------------
>
>                 Key: YARN-5697
>                 URL: https://issues.apache.org/jira/browse/YARN-5697
>             Project: Hadoop YARN
>          Issue Type: Improvement
>    Affects Versions: 2.8.0
>            Reporter: Tao Jie
>            Assignee: Tao Jie
>             Fix For: 2.8.0
>
>         Attachments: YARN-5697.001.patch, YARN-5697.002.patch, YARN-5697.003.patch
>
>
> As discussed in YARN-4855, it is better to use CliParser rather than args to parse command
line options in RMAdminCli.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message