Merge -r 1333230:1333231 from trunk to branch. FIXES: HADOOP-8214

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1333233 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alejandro Abdelnur 2012-05-02 22:45:04 +00:00
parent 7a6493914b
commit 3faa2881f9
2 changed files with 10 additions and 6 deletions

View File

@ -150,6 +150,8 @@ Release 2.0.0 - UNRELEASED
HADOOP-8185. Update namenode -format documentation and add -nonInteractive and -force. (Arpit Gupta via atm)
HADOOP-8214. make hadoop script recognize a full set of deprecated commands (rvs via tucu)
OPTIMIZATIONS
BUG FIXES

View File

@ -50,15 +50,16 @@ fi
COMMAND=$1
case $COMMAND in
#hdfs commands
namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt)
namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt|oiv|dfsgroups)
echo "DEPRECATED: Use of this script to execute hdfs command is deprecated." 1>&2
echo "Instead use the hdfs command for it." 1>&2
echo "" 1>&2
#try to locate hdfs and if present, delegate to it.
shift
if [ -f "${HADOOP_HDFS_HOME}"/bin/hdfs ]; then
exec "${HADOOP_HDFS_HOME}"/bin/hdfs $*
exec "${HADOOP_HDFS_HOME}"/bin/hdfs ${COMMAND/dfsgroups/groups} $*
elif [ -f "${HADOOP_PREFIX}"/bin/hdfs ]; then
exec "${HADOOP_PREFIX}"/bin/hdfs $*
exec "${HADOOP_PREFIX}"/bin/hdfs ${COMMAND/dfsgroups/groups} $*
else
echo "HADOOP_HDFS_HOME not found!"
exit 1
@ -66,15 +67,16 @@ case $COMMAND in
;;
#mapred commands for backwards compatibility
pipes|job|queue)
pipes|job|queue|mrgroups|mradmin|jobtracker|tasktracker)
echo "DEPRECATED: Use of this script to execute mapred command is deprecated." 1>&2
echo "Instead use the mapred command for it." 1>&2
echo "" 1>&2
#try to locate mapred and if present, delegate to it.
shift
if [ -f "${HADOOP_MAPRED_HOME}"/bin/mapred ]; then
exec "${HADOOP_MAPRED_HOME}"/bin/mapred $*
exec "${HADOOP_MAPRED_HOME}"/bin/mapred ${COMMAND/mrgroups/groups} $*
elif [ -f "${HADOOP_PREFIX}"/bin/mapred ]; then
exec "${HADOOP_PREFIX}"/bin/mapred $*
exec "${HADOOP_PREFIX}"/bin/mapred ${COMMAND/mrgroups/groups} $*
else
echo "HADOOP_MAPRED_HOME not found!"
exit 1