Description
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:
$ hadoop -fs ls /
The -fs is passed directly to the JVM and the JVM fails to start:
$ ./bin/hadoop -fs ls / Unrecognized option: -fs Could not create the Java virtual machine.
Which is confusing and typically requires explanation. The attached patch improves that behavior:
$ ./bin/hadoop -fs ls /
Error: No command named `-fs' was found. Perhaps you meant `hadoop fs'
The only risk I can see is if someone is abusing the implementation of hadoop command doing something like so:
$ ./bin/hadoop -Xmx1g org.apache.hadoop.util.RunJar RunJar jarFile [mainClass] args...
The hadoop command does not appear to advertise allowing JVM options before the classname.
Attachments
Attachments
Issue Links
- incorporates
-
HADOOP-7491 hadoop command should respect HADOOP_OPTS when given a class name
- Closed
Attached implements requested improvement.