MAPREDUCE-5033. mapred shell script should respect usage flags (--help -help -h). Contributed by Andrew Wang.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1450585 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Aaron Myers 2013-02-27 02:43:27 +00:00
parent 680c612ca4
commit ba7b51eec1
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -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