[
https://issues.apache.org/jira/browse/HADOOP-3281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Edward J. Yoon updated HADOOP-3281:
-----------------------------------
Attachment: 3281_v01.patch
{code}
[EMAIL PROTECTED] hadoop]# bin/hadoop
Usage: hadoop [--config confdir] COMMAND
where COMMAND is one of:
namenode -format format the DFS filesystem
...
[EMAIL PROTECTED] hadoop]# bin/hadoop org.apache.hadoop.Tester arg1 arg2
org.apache.hadoop.Tester: command/class not found
[EMAIL PROTECTED] hadoop]# bin/hadoop tester
tester: command/class not found
[EMAIL PROTECTED] hadoop]# bin/hadoop org.apache.hadoop.dfs.NNBenchs
org.apache.hadoop.dfs.NNBenchs: command/class not found
[EMAIL PROTECTED] hadoop]# bin/hadoop org.apache.hadoop.dfs.NNBench
NameNode Benchmark 0.4
08/05/02 11:05:11 INFO dfs.NNBench: Test Inputs:
08/05/02 11:05:11 INFO dfs.NNBench: Test Operation: none
08/05/02 11:05:11 INFO dfs.NNBench: Start time: 2008-05-02
11:07:11,219
...
[EMAIL PROTECTED] hadoop]# bin/hadoop dfs -ls /
Found 6 items
1 212752 2008-05-02 10:52 -rw-r--r-- root supergroup /CHANGES.txt
...
{code}
> bin/hadoop script should check class name before running java
> -------------------------------------------------------------
>
> Key: HADOOP-3281
> URL: https://issues.apache.org/jira/browse/HADOOP-3281
> Project: Hadoop Core
> Issue Type: Bug
> Components: scripts
> Reporter: Tsz Wo (Nicholas), SZE
> Assignee: Edward J. Yoon
> Fix For: 0.18.0
>
> 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 examples,
> {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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.