hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Wittenauer (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HADOOP-3281) bin/hadoop script should check class name before running java
Date Sun, 14 Dec 2014 17:11:13 GMT

     [ https://issues.apache.org/jira/browse/HADOOP-3281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Allen Wittenauer resolved HADOOP-3281.
    Resolution: Won't Fix

I'm going to close this as won't fix.  A few reasons:

1) Users actually really like being able to use arbitrary classes on the CLI.

2) As the hadoop code base gets more complex, it's going to be an increasingly long time to
analyze the classpath to see if a method exists.

3) A lot of recent changes in shell code in trunk/3.x and the requirement that classes passed
need to belong to a package have greatly reduced the amount of times this particular problem
is hit.

> bin/hadoop script should check class name before running java
> -------------------------------------------------------------
>                 Key: HADOOP-3281
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3281
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: scripts
>            Reporter: Tsz Wo Nicholas Sze
>            Assignee: Edward J. Yoon
>         Attachments: 3281.patch, 3281_v01.patch
> When the first parameter ($1) cannot be matched with one of existing hadoop commnads,
the parameter will be considered as a class name and the script will pass it to java.  For
> {noformat}
> bash-3.2$ ./bin/hadoop -version
> java version "1.5.0_14"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
> Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode)
> bash-3.2$ ./bin/hadoop -help   
> Usage: java [-options] class [args...]
>            (to execute a class)
>    or  java [-options] -jar jarfile [args...]
>            (to execute a jar file)
> ...
> {noformat}
> The behavior above is confusing.  We should check whether the parameter is a valid class
name before passing it to java.

This message was sent by Atlassian JIRA

View raw message