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 "Brock Noland (JIRA)" <ji...@apache.org> on 2011/05/24 03:22:47 UTC

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

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
            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

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

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044055#comment-13044055 ] 

Hadoop QA commented on HADOOP-7325:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12481405/hadoop-illegal-class-name-1.patch
  against trunk revision 1130833.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 system test framework.  The patch passed system test framework compile.

Test results: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/572//testReport/
Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/572//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/572//console

This message is automatically generated.

> 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, hadoop-illegal-class-name-1.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

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

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins updated HADOOP-7325:
--------------------------------

    Assignee: Brock Noland  (was: Eli Collins)

> 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
>             Fix For: 0.22.0
>
>         Attachments: hadoop-illegal-class-name-0.patch, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

        

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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045365#comment-13045365 ] 

Hudson commented on HADOOP-7325:
--------------------------------

Integrated in Hadoop-Common-trunk #712 (See [https://builds.apache.org/job/Hadoop-Common-trunk/712/])
    HADOOP-7325. The hadoop command should not accept class names starting with a hyphen. Contributed by Brock Noland.

todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1132769
Files : 
* /hadoop/common/trunk/bin/hadoop
* /hadoop/common/trunk/CHANGES.txt


> 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
>             Fix For: 0.22.0
>
>         Attachments: hadoop-illegal-class-name-0.patch, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

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

Posted by "Eli Collins (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eli Collins reassigned HADOOP-7325:
-----------------------------------

    Assignee: Eli Collins  (was: Brock Noland)

> 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: Eli Collins
>            Priority: Minor
>             Fix For: 0.22.0
>
>         Attachments: hadoop-illegal-class-name-0.patch, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

        

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

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ 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

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

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HADOOP-7325:
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.22.0
           Status: Resolved  (was: Patch Available)

Committed to trunk and 0.22. Thanks, Brock! Please do file patches for bin/hdfs and bin/mapred in those projects as well.

> 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
>             Fix For: 0.22.0
>
>         Attachments: hadoop-illegal-class-name-0.patch, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

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

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brock Noland updated HADOOP-7325:
---------------------------------

    Attachment: hadoop-illegal-class-name-2.patch

Slightly too agressive on comment deletion. I think the first comment was useful. Updated.

> 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, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

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

Posted by "Aaron T. Myers (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aaron T. Myers updated HADOOP-7325:
-----------------------------------

    Status: Patch Available  (was: Open)

Hitting 'submit patch' so Hudson will run the pre-commit hooks.

> 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

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

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brock Noland updated HADOOP-7325:
---------------------------------

    Attachment: hadoop-illegal-class-name-0.patch

Attached implements requested improvement.

> 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
>            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

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

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048805#comment-13048805 ] 

Brock Noland commented on HADOOP-7325:
--------------------------------------

Looking at the hdfs and mapred commands, they do not seem to allow the "command" to be a direct classname and also have unknown command handling built in, so I do not think they need to be updated. If someone disagrees, please share!

{code}
elif [ "$COMMAND" = "groups" ] ; then
  CLASS=org.apache.hadoop.hdfs.tools.GetGroups
else
  echo $COMMAND - invalid command
  print_usage
  exit
{code}

> 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
>             Fix For: 0.22.0
>
>         Attachments: hadoop-illegal-class-name-0.patch, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

        

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

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040390#comment-13040390 ] 

Hadoop QA commented on HADOOP-7325:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12480193/hadoop-illegal-class-name-0.patch
  against trunk revision 1128385.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 system test framework.  The patch passed system test framework compile.

Test results: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/535//testReport/
Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/535//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/535//console

This message is automatically generated.

> 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

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

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048835#comment-13048835 ] 

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

Sounds right to me. Thanks for looking.

> 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
>             Fix For: 0.22.0
>
>         Attachments: hadoop-illegal-class-name-0.patch, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

        

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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045118#comment-13045118 ] 

Hudson commented on HADOOP-7325:
--------------------------------

Integrated in Hadoop-Common-trunk-Commit #643 (See [https://builds.apache.org/hudson/job/Hadoop-Common-trunk-Commit/643/])
    HADOOP-7325. The hadoop command should not accept class names starting with a hyphen. Contributed by Brock Noland.

todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1132769
Files : 
* /hadoop/common/trunk/bin/hadoop
* /hadoop/common/trunk/CHANGES.txt


> 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
>             Fix For: 0.22.0
>
>         Attachments: hadoop-illegal-class-name-0.patch, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

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

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HADOOP-7325:
--------------------------------

    Hadoop Flags: [Reviewed]

+1

> 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
>             Fix For: 0.22.0
>
>         Attachments: hadoop-illegal-class-name-0.patch, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

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

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044068#comment-13044068 ] 

Hadoop QA commented on HADOOP-7325:
-----------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12481408/hadoop-illegal-class-name-2.patch
  against trunk revision 1130833.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 system test framework.  The patch passed system test framework compile.

Test results: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/574//testReport/
Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/574//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/574//console

This message is automatically generated.

> 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, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

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

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045146#comment-13045146 ] 

Hudson commented on HADOOP-7325:
--------------------------------

Integrated in Hadoop-Common-22-branch #63 (See [https://builds.apache.org/hudson/job/Hadoop-Common-22-branch/63/])
    HADOOP-7325. The hadoop command should not accept class names starting with a hyphen. Contributed by Brock Noland.

todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1132768
Files : 
* /hadoop/common/branches/branch-0.22/bin/hadoop
* /hadoop/common/branches/branch-0.22/CHANGES.txt


> 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
>             Fix For: 0.22.0
>
>         Attachments: hadoop-illegal-class-name-0.patch, hadoop-illegal-class-name-1.patch, hadoop-illegal-class-name-2.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

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

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon reassigned HADOOP-7325:
-----------------------------------

    Assignee: Brock Noland

> 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

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

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-7325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brock Noland updated HADOOP-7325:
---------------------------------

    Attachment: hadoop-illegal-class-name-1.patch

nit's resolved.

> 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, hadoop-illegal-class-name-1.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