From a55ae9e988d1cd4547d90f4a916120ac650a6e65 Mon Sep 17 00:00:00 2001 From: Jason Darrell Lowe Date: Wed, 17 Jul 2013 00:31:52 +0000 Subject: [PATCH] svn merge -c 1503957 FIXES: MAPREDUCE-5380. Invalid mapred command should return non-zero exit code. Contributed by Stephen Chu git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1503958 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-mapreduce-project/CHANGES.txt | 6 ++++++ hadoop-mapreduce-project/bin/mapred | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 6947a404b65..e1b409bcf8c 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -21,6 +21,9 @@ Release 2.3.0 - UNRELEASED MAPREDUCE-5358. MRAppMaster throws invalid transitions for JobImpl (Devaraj K via jlowe) + MAPREDUCE-5380. Invalid mapred command should return non-zero exit code + (Stephen Chu via jlowe) + Release 2.2.0 - UNRELEASED INCOMPATIBLE CHANGES @@ -1097,6 +1100,9 @@ Release 0.23.10 - UNRELEASED MAPREDUCE-3193. FileInputFormat doesn't read files recursively in the input path dir (Devaraj K via jlowe) + MAPREDUCE-5380. Invalid mapred command should return non-zero exit code + (Stephen Chu via jlowe) + Release 0.23.9 - 2013-07-08 INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/bin/mapred b/hadoop-mapreduce-project/bin/mapred index 2ced1b4cba8..1c68a9fd897 100755 --- a/hadoop-mapreduce-project/bin/mapred +++ b/hadoop-mapreduce-project/bin/mapred @@ -83,7 +83,7 @@ elif [ "$COMMAND" = "mradmin" ] \ echo "Sorry, the $COMMAND command is no longer supported." echo "You may find similar functionality with the \"yarn\" shell command." print_usage - exit + exit 1 elif [ "$COMMAND" = "distcp" ] ; then CLASS=org.apache.hadoop.tools.DistCp CLASSPATH=${CLASSPATH}:${TOOL_PATH} @@ -95,7 +95,7 @@ elif [ "$COMMAND" = "archive" ] ; then else echo $COMMAND - invalid command print_usage - exit + exit 1 fi # for developers, add mapred classes to CLASSPATH