hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wei Yan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-10927) Ran `hadoop credential` expecting usage, got NPE instead
Date Sat, 02 Aug 2014 00:07:38 GMT

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

Wei Yan commented on HADOOP-10927:
----------------------------------

This exception happened due to the following code in CredentialShell.java. The init() function
returns 0 instead of -1 if the args is empty, which causes the run() failed.
{code}
  private int init(String[] args) throws IOException {
    for (int i = 0; i < args.length; i++) { // parse command line
      .........
    }
    return 0;
  }
{code}

> Ran `hadoop credential` expecting usage, got NPE instead
> --------------------------------------------------------
>
>                 Key: HADOOP-10927
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10927
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>            Reporter: Josh Elser
>            Priority: Minor
>
> {noformat}
> $ hadoop credential
> java.lang.NullPointerException
> 	at org.apache.hadoop.security.alias.CredentialShell.run(CredentialShell.java:67)
> 	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
> 	at org.apache.hadoop.security.alias.CredentialShell.main(CredentialShell.java:420)
> {noformat}
> Ran a no-arg version of {{hadoop credential}} expecting to get the usage/help message
(like other commands act), and got the above exception instead.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message