Merge -c 1241323 from trunk to branch-0.23 to fix MAPREDUCE-3817. Fixed bin/mapred to allow running of distcp and archive jobs. Contributed by Arpit Gupta.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1241324 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2012-02-07 01:50:23 +00:00
parent cea037f414
commit 984c80dffc
2 changed files with 13 additions and 0 deletions

View File

@ -691,6 +691,9 @@ Release 0.23.1 - Unreleased
MAPREDUCE-3697. Support binary compatibility for Counters after MAPREDUCE-3697. Support binary compatibility for Counters after
MAPREDUCE-901. (mahadev via acmurthy) MAPREDUCE-901. (mahadev via acmurthy)
MAPREDUCE-3817. Fixed bin/mapred to allow running of distcp and archive
jobs. (Arpit Gupta via acmurthy)
Release 0.23.0 - 2011-11-01 Release 0.23.0 - 2011-11-01
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -37,6 +37,8 @@ function print_usage(){
echo " mapreduce subcommands" echo " mapreduce subcommands"
echo " groups get the groups which users belong to" echo " groups get the groups which users belong to"
echo " historyserver run job history servers as a standalone daemon" echo " historyserver run job history servers as a standalone daemon"
echo " distcp <srcurl> <desturl> copy file or directories recursively"
echo " archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive"
echo "" echo ""
echo "Most commands print help when invoked w/o parameters." echo "Most commands print help when invoked w/o parameters."
} }
@ -76,6 +78,14 @@ elif [ "$COMMAND" = "mradmin" ] \
echo "You may find similar functionality with the \"yarn\" shell command." echo "You may find similar functionality with the \"yarn\" shell command."
print_usage print_usage
exit exit
elif [ "$COMMAND" = "distcp" ] ; then
CLASS=org.apache.hadoop.tools.DistCp
CLASSPATH=${CLASSPATH}:${TOOL_PATH}
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
elif [ "$COMMAND" = "archive" ] ; then
CLASS=org.apache.hadoop.tools.HadoopArchives
CLASSPATH=${CLASSPATH}:${TOOL_PATH}
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
else else
echo $COMMAND - invalid command echo $COMMAND - invalid command
print_usage print_usage