Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-9246

NPE when executing a command yarn node -status or -states without additional arguments

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.0
    • Component/s: client
    • Labels:
      None

      Description

      yarn node command should not print NPE even if there are some missing arguments.

      ubuntu@ip-172-31-0-78:~/hadoop-3.3.0-SNAPSHOT$ ./bin/yarn node -states
      Missing argument for options
      usage: node
       -all Works with -list to list all nodes.
       -help Displays help for all commands.
       -list List all running nodes. Supports optional use of
       -states to filter nodes based on node state, all -all
       to list all nodes, -showDetails to display more
       details about each node.
       -showDetails Works with -list to show more details about each node.
       -states <States> Works with -list to filter nodes based on input
       comma-separated list of node states. The valid node
       state can be one of the following:
       NEW,RUNNING,UNHEALTHY,DECOMMISSIONED,LOST,REBOOTED,DEC
       OMMISSIONING,SHUTDOWN.
       -status <NodeId> Prints the status report of the node.
      Exception in thread "main" java.lang.NullPointerException
       at org.apache.hadoop.yarn.client.cli.YarnCLI.stop(YarnCLI.java:75)
       at org.apache.hadoop.yarn.client.cli.NodeCLI.main(NodeCLI.java:63)
      ubuntu@ip-172-31-0-78:~/hadoop-3.3.0-SNAPSHOT$ ./bin/yarn node -status
      Missing argument for options
      usage: node
       -all Works with -list to list all nodes.
       -help Displays help for all commands.
       -list List all running nodes. Supports optional use of
       -states to filter nodes based on node state, all -all
       to list all nodes, -showDetails to display more
       details about each node.
       -showDetails Works with -list to show more details about each node.
       -states <States> Works with -list to filter nodes based on input
       comma-separated list of node states. The valid node
       state can be one of the following:
       NEW,RUNNING,UNHEALTHY,DECOMMISSIONED,LOST,REBOOTED,DEC
       OMMISSIONING,SHUTDOWN.
       -status <NodeId> Prints the status report of the node.
      Exception in thread "main" java.lang.NullPointerException
       at org.apache.hadoop.yarn.client.cli.YarnCLI.stop(YarnCLI.java:75)
       at org.apache.hadoop.yarn.client.cli.NodeCLI.main(NodeCLI.java:63)
      ubuntu@ip-172-31-0-78:~/hadoop-3.3.0-SNAPSHOT$
      

        Attachments

        1. YARN-9246.001.patch
          0.8 kB
          Masahiro Tanaka
        2. YARN-9246.002.patch
          0.8 kB
          Masahiro Tanaka

          Activity

            People

            • Assignee:
              masatana Masahiro Tanaka
              Reporter:
              masatana Masahiro Tanaka
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: