hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira AJISAKA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11545) ArrayIndexOutOfBoundsException is thrown with hadoop credential list -provider
Date Fri, 13 Feb 2015 21:37:12 GMT

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

Akira AJISAKA commented on HADOOP-11545:
----------------------------------------

Thanks for updating the patch. Some comments:
* Would you return -1 in {{init()}}? You can fix it by changing the return type of {{checkArgs(int,
int)}} to boolean, and checking the returned value in {{init()}}.
* I prefer {{checkArgs(int, String[])}} to {{checkArgs(int, int)}} since the name of the method
is to check the number of "arguments". 

{code}
-    public static final String USAGE = "create <alias> [-provider] [-help]";
+    public static final String USAGE =
+        "create alias [-v value][-provider provider-path]";
{code}
* alias should be <alias> because users don't type "create alias".

> ArrayIndexOutOfBoundsException is thrown with hadoop credential list -provider
> ------------------------------------------------------------------------------
>
>                 Key: HADOOP-11545
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11545
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.6.0
>            Reporter: Brahma Reddy Battula
>            Assignee: Brahma Reddy Battula
>         Attachments: HADOOP-11545-002.patch, HADOOP-11545-003.patch, HDFS-11545-001.patch
>
>
> Scenario:
> ========
> Please run the following command . dn't give the provider path.
> {noformat}
> [hdfs@host194 bin]$ ./hadoop credential list -provider
> java.lang.ArrayIndexOutOfBoundsException: 2
>         at org.apache.hadoop.security.alias.CredentialShell.init(CredentialShell.java:117)
>         at org.apache.hadoop.security.alias.CredentialShell.run(CredentialShell.java:63)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
>         at org.apache.hadoop.security.alias.CredentialShell.main(CredentialShell.java:427)
> {noformat}



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

Mime
View raw message