hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1450585 - in /hadoop/common/branches/branch-2/hadoop-mapreduce-project: CHANGES.txt bin/mapred
Date Wed, 27 Feb 2013 02:43:27 GMT
Author: atm
Date: Wed Feb 27 02:43:27 2013
New Revision: 1450585

URL: http://svn.apache.org/r1450585
Log:
MAPREDUCE-5033. mapred shell script should respect usage flags (--help -help -h). Contributed
by Andrew Wang.

Modified:
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-mapreduce-project/bin/mapred

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt?rev=1450585&r1=1450584&r2=1450585&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/CHANGES.txt Wed Feb 27 02:43:27
2013
@@ -8,6 +8,9 @@ Release 2.0.4-beta - UNRELEASED
 
   IMPROVEMENTS
 
+    MAPREDUCE-5033. mapred shell script should respect usage flags
+    (--help -help -h). (Andrew Wang via atm)
+
   OPTIMIZATIONS
 
   BUG FIXES

Modified: hadoop/common/branches/branch-2/hadoop-mapreduce-project/bin/mapred
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-mapreduce-project/bin/mapred?rev=1450585&r1=1450584&r2=1450585&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-mapreduce-project/bin/mapred (original)
+++ hadoop/common/branches/branch-2/hadoop-mapreduce-project/bin/mapred Wed Feb 27 02:43:27
2013
@@ -50,6 +50,14 @@ fi
 COMMAND=$1
 shift
 
+case $COMMAND in
+  # usage flags
+  --help|-help|-h)
+    print_usage
+    exit
+    ;;
+esac
+
 if [ "$COMMAND" = "job" ] ; then
   CLASS=org.apache.hadoop.mapred.JobClient
 elif [ "$COMMAND" = "queue" ] ; then



Mime
View raw message