You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2011/06/03 22:36:47 UTC

[jira] [Commented] (HADOOP-7325) hadoop command - do not accept class names starting with a hyphen

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

Todd Lipcon commented on HADOOP-7325:
-------------------------------------

nits:
- I don't think you need the comments explaining bash [[ vs [
- if you do want to keep them, there's a typo: bra*c*ket is missing its 'c'.


> hadoop command - do not accept class names starting with a hyphen
> -----------------------------------------------------------------
>
>                 Key: HADOOP-7325
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7325
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: scripts
>            Reporter: Brock Noland
>            Assignee: Brock Noland
>            Priority: Minor
>         Attachments: hadoop-illegal-class-name-0.patch
>
>
> If this is committed I will look at patches for hdfs and mapred.
> When teaching a good portion of the students in every single class execute:
> {code}
> $ hadoop -fs ls /
> {code}
> The -fs is passed directly to the JVM and the JVM fails to start:
> {code}
> $ ./bin/hadoop -fs ls /
> Unrecognized option: -fs
> Could not create the Java virtual machine.
> {code}
> Which is confusing and typically requires explanation. The attached patch improves that behavior:
> {code}
> $ ./bin/hadoop -fs ls /
> Error: No command named `-fs' was found. Perhaps you meant `hadoop fs'
> {code}
> The only risk I can see is if someone is abusing the implementation of hadoop command doing something like so:
> {code}
> $ ./bin/hadoop -Xmx1g  org.apache.hadoop.util.RunJar
> RunJar jarFile [mainClass] args...
> {code}
> The hadoop command does not appear to advertise allowing JVM options before the classname.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira