Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.6.0
    • client
    • None

    Description

      There is an off-by-one issue in RMAdminCLI.java (line 457):

      port = Integer.valueOf(nodeIdStr.substring(nodeIdStr.indexOf(":")));

      should probably be:

      port = Integer.valueOf(nodeIdStr.substring(nodeIdStr.indexOf(":")+1));

      Currently attempting to add a label to a node with a port specified looks like this:

      [yarn@ip-10-0-0-66 ~]$ yarn rmadmin -replaceLabelsOnNode node.example.com:45454,test-label
      replaceLabelsOnNode: For input string: ":45454"
      Usage: yarn rmadmin [-replaceLabelsOnNode [node1:port,label1,label2 node2:port,label1,label2]]

      It appears to be trying to parse the ':' as part of the integer because the substring index is off.

      Attachments

        1. YARN-2723.20141023.1.patch
          3 kB
          Naganarasimha G R
        2. yarn-2723.20141023.2.patch
          2 kB
          Naganarasimha G R

        Activity

          People

            Naganarasimha Naganarasimha G R
            tweek Phil D'Amore
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: