From 984c80dffc1e4732ffa9d8ff98555be5138a3fc6 Mon Sep 17 00:00:00 2001 From: Arun Murthy Date: Tue, 7 Feb 2012 01:50:23 +0000 Subject: [PATCH] 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 --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ hadoop-mapreduce-project/bin/mapred | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 8c97df2b1a5..5c83092f840 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -691,6 +691,9 @@ Release 0.23.1 - Unreleased MAPREDUCE-3697. Support binary compatibility for Counters after 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 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/bin/mapred b/hadoop-mapreduce-project/bin/mapred index 5ade3dabf43..898e053afdf 100755 --- a/hadoop-mapreduce-project/bin/mapred +++ b/hadoop-mapreduce-project/bin/mapred @@ -37,6 +37,8 @@ function print_usage(){ echo " mapreduce subcommands" echo " groups get the groups which users belong to" echo " historyserver run job history servers as a standalone daemon" + echo " distcp copy file or directories recursively" + echo " archive -archiveName NAME -p * create a hadoop archive" echo "" 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." print_usage 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 echo $COMMAND - invalid command print_usage