When using the hadoop command HADOOP_OPTS and HADOOP_CLIENT_OPTS options are not passeed through.
hadoop command - do not accept class names starting with a hyphen
I've committed this. Thanks atm.
Thanks atm. I concur. Btw verified by hand that HADOOP_OPTS is now respected since Hudson won't pick up on this.
common $ export HADOOP_OPTS="-INVALID"
common $ ./bin/hadoop org.apache.hadoop.hdfs.tools.HDFSConcat
Unrecognized option: -INVALID
Could not create the Java virtual machine.
+1, patch looks good to me.
No idea why we didn't do this in the first place. Probably just an oversight.
Anyone know why we didn't do this from the start? I can't think of a reason why you wouldn't want to respect HADOOP_OPTS and HADOOP_CLIENT_OPTS when using bin/hadoop to run a class.
Before HADOOP-7325 users could specify options on the command line before the class name (instead of using HADOOP_OPTS), but can no longer do so because class name that start with "-" are no longer accepted.