HADOOP-9193. hadoop script can inadvertently expand wildcard arguments when delegating to hdfs script. Contributed by Andy Isaacson.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1434452 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2013-01-16 22:29:58 +00:00
parent 9ceae3b844
commit ca90a0af40
2 changed files with 7 additions and 4 deletions

View File

@ -250,6 +250,9 @@ Release 2.0.3-alpha - Unreleased
HADOOP-8589 ViewFs tests fail when tests and home dirs are nested. HADOOP-8589 ViewFs tests fail when tests and home dirs are nested.
(sanjay Radia) (sanjay Radia)
HADOOP-9193. hadoop script can inadvertently expand wildcard arguments
when delegating to hdfs script. (Andy Isaacson via todd)
Release 2.0.2-alpha - 2012-09-07 Release 2.0.2-alpha - 2012-09-07
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -58,9 +58,9 @@ case $COMMAND in
#try to locate hdfs and if present, delegate to it. #try to locate hdfs and if present, delegate to it.
shift shift
if [ -f "${HADOOP_HDFS_HOME}"/bin/hdfs ]; then if [ -f "${HADOOP_HDFS_HOME}"/bin/hdfs ]; then
exec "${HADOOP_HDFS_HOME}"/bin/hdfs ${COMMAND/dfsgroups/groups} $* exec "${HADOOP_HDFS_HOME}"/bin/hdfs ${COMMAND/dfsgroups/groups} "$@"
elif [ -f "${HADOOP_PREFIX}"/bin/hdfs ]; then elif [ -f "${HADOOP_PREFIX}"/bin/hdfs ]; then
exec "${HADOOP_PREFIX}"/bin/hdfs ${COMMAND/dfsgroups/groups} $* exec "${HADOOP_PREFIX}"/bin/hdfs ${COMMAND/dfsgroups/groups} "$@"
else else
echo "HADOOP_HDFS_HOME not found!" echo "HADOOP_HDFS_HOME not found!"
exit 1 exit 1
@ -75,9 +75,9 @@ case $COMMAND in
#try to locate mapred and if present, delegate to it. #try to locate mapred and if present, delegate to it.
shift shift
if [ -f "${HADOOP_MAPRED_HOME}"/bin/mapred ]; then if [ -f "${HADOOP_MAPRED_HOME}"/bin/mapred ]; then
exec "${HADOOP_MAPRED_HOME}"/bin/mapred ${COMMAND/mrgroups/groups} $* exec "${HADOOP_MAPRED_HOME}"/bin/mapred ${COMMAND/mrgroups/groups} "$@"
elif [ -f "${HADOOP_PREFIX}"/bin/mapred ]; then elif [ -f "${HADOOP_PREFIX}"/bin/mapred ]; then
exec "${HADOOP_PREFIX}"/bin/mapred ${COMMAND/mrgroups/groups} $* exec "${HADOOP_PREFIX}"/bin/mapred ${COMMAND/mrgroups/groups} "$@"
else else
echo "HADOOP_MAPRED_HOME not found!" echo "HADOOP_MAPRED_HOME not found!"
exit 1 exit 1