HADOOP-7325. The hadoop command should not accept class names starting with a hyphen. Contributed by Brock Noland.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1132769 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
44a35b5d9a
commit
8336b05ec8
@ -532,6 +532,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(..).
|
||||
|
@ -109,6 +109,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
|
||||
|
Loading…
Reference in New Issue
Block a user