You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Masahiro Tanaka (JIRA)" <ji...@apache.org> on 2019/01/31 19:56:00 UTC

[jira] [Commented] (YARN-9246) NPE when executing a command yarn node -status or -states without additional arguments

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

Masahiro Tanaka commented on YARN-9246:
---------------------------------------

I also found similar issues with these commands:

{code}
ubuntu@ip-172-31-0-78:~/hadoop-3.3.0-SNAPSHOT$ ./bin/yarn top -help
usage: yarn top
 -cols <arg>     Number of columns on the terminal
 -delay <arg>    The refresh delay(in seconds), default is 3 seconds
 -help           Print usage; for help while the tool is running press 'h'
                 + Enter
 -queues <arg>   Comma separated list of queues to restrict applications
 -rows <arg>     Number of rows on the terminal
 -types <arg>    Comma separated list of types to restrict applications,
                 case sensitive(though the display is lower case)
 -users <arg>    Comma separated list of users to restrict applications

'yarn top' is a tool to help cluster administrators understand cluster usage better.
Some notes about the implementation:
  1. Fetching information for all the apps is an expensive call for the RM.
     To prevent a performance degradation, the results are cached for 5 seconds,
     irrespective of the delay value. Information about the NodeManager(s) and queue
     utilization stats are fetched at the specified delay interval. Once we have a
     better understanding of the performance impact, this might change.
  2. Since the tool is implemented in Java, you must hit Enter for key presses to
     be processed.
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.TopCLI.main(TopCLI.java:450)
ubuntu@ip-172-31-0-78:~/hadoop-3.3.0-SNAPSHOT$ ./bin/yarn queue -status
Missing argument for options
usage: queue
 -help                  Displays help for all commands.
 -status <Queue Name>   List queue information about given queue.
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.QueueCLI.main(QueueCLI.java:51)

{code}


> NPE when executing a command yarn node -status or -states without additional arguments
> --------------------------------------------------------------------------------------
>
>                 Key: YARN-9246
>                 URL: https://issues.apache.org/jira/browse/YARN-9246
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: client
>            Reporter: Masahiro Tanaka
>            Assignee: Masahiro Tanaka
>            Priority: Minor
>
> yarn node command should not print NPE even if there are some missing arguments.
> {code}
> 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$
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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