hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1132768 - in /hadoop/common/branches/branch-0.22: CHANGES.txt bin/hadoop
Date Mon, 06 Jun 2011 20:58:09 GMT
Author: todd
Date: Mon Jun  6 20:58:09 2011
New Revision: 1132768

URL: http://svn.apache.org/viewvc?rev=1132768&view=rev
Log:
HADOOP-7325. The hadoop command should not accept class names starting with a hyphen. Contributed
by Brock Noland.

Modified:
    hadoop/common/branches/branch-0.22/CHANGES.txt
    hadoop/common/branches/branch-0.22/bin/hadoop

Modified: hadoop/common/branches/branch-0.22/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/CHANGES.txt?rev=1132768&r1=1132767&r2=1132768&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/CHANGES.txt Mon Jun  6 20:58:09 2011
@@ -257,6 +257,9 @@ Release 0.22.0 - Unreleased
     HADOOP-7335. Force entropy to come from non-true random for tests.
     (todd via eli)
 
+    HADOOP-7325. The hadoop command should not accept class names starting with
+    a hyphen. (Brock Noland via todd)
+
   OPTIMIZATIONS
 
     HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).

Modified: hadoop/common/branches/branch-0.22/bin/hadoop
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/bin/hadoop?rev=1132768&r1=1132767&r2=1132768&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/bin/hadoop (original)
+++ hadoop/common/branches/branch-0.22/bin/hadoop Mon Jun  6 20:58:09 2011
@@ -108,6 +108,10 @@ case $COMMAND in
       CLASS=org.apache.hadoop.tools.HadoopArchives
       CLASSPATH=${CLASSPATH}:${TOOL_PATH}
       HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
+    elif [[ "$COMMAND" = -*  ]] ; then
+        # class and package names cannot begin with a -
+        echo "Error: No command named \`$COMMAND' was found. Perhaps you meant \`hadoop ${COMMAND#-}'"
+        exit 1
     else
       CLASS=$COMMAND
     fi



Mime
View raw message