hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Wittenauer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11150) hadoop command should accept CLASSNAME without package name
Date Mon, 29 Sep 2014 05:35:34 GMT

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

Allen Wittenauer commented on HADOOP-11150:
-------------------------------------------

This is an incomplete fix, as this now causes things like "hadoop -jar" or "hadoop thisisnotacommand"
to generate a stack trace instead of usage, defeating the purpose of the original code. See
HADOOP-11092.

It should be noted that, AFAIK, all of the code that ships with Hadoop is in a package. The
current code breaks exactly one situation:  someone has injected Hadoop's classpath with their
own jars where the main method is not in a package. While it's certainly possible, it's also
unlikely in the vast majority of cases and probably not worth the much larger frustration
of going through the entire java launch sequence just to be told you typo'd.

That said, HADOOP-11092 should probably be marked as an incompatible change with a release
note that basically says if you are doing the above situation, sorry, but it won't work anymore;
stick it in a package.


> hadoop command should accept CLASSNAME without package name
> -----------------------------------------------------------
>
>                 Key: HADOOP-11150
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11150
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: scripts
>            Reporter: Masatake Iwasaki
>            Assignee: Masatake Iwasaki
>            Priority: Minor
>         Attachments: HADOOP-11150-0.patch
>
>
> hadoop_validate_classname checks whether the classname contains ".". It is possible that
classname without package is used in some examples or tutorials.



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

Mime
View raw message