MAPREDUCE-2682. Add "mapred classpath" command to print classpath for MR applications. Contributed by vinodkv.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1145889 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Murthy 2011-07-13 07:17:53 +00:00
parent e2a53a37dd
commit 654705b882
2 changed files with 13 additions and 0 deletions

View File

@ -13,6 +13,9 @@ Trunk (unreleased changes)
NEW FEATURES
MAPREDUCE-2682. Add "mapred classpath" command to print classpath
for MR applications. (vinodkv via acmurthy)
MAPREDUCE-2107. [Gridmix] Total heap usage emulation in Gridmix.
(Amar Kamat and Ravi Gummadi via amarrk)

View File

@ -34,6 +34,8 @@ function print_usage(){
echo " pipes run a Pipes job"
echo " job manipulate MapReduce jobs"
echo " queue get information regarding JobQueues"
echo " classpath prints the class path needed for running"
echo " mapreduce subcommands"
echo " groups get the groups which users belong to"
echo ""
echo "Most commands print help when invoked w/o parameters."
@ -66,6 +68,8 @@ elif [ "$COMMAND" = "pipes" ] ; then
elif [ "$COMMAND" = "sampler" ] ; then
CLASS=org.apache.hadoop.mapred.lib.InputSampler
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
elif [ "$COMMAND" = "classpath" ] ; then
echo -n
elif [ "$COMMAND" = "groups" ] ; then
CLASS=org.apache.hadoop.mapred.tools.GetGroups
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
@ -105,5 +109,11 @@ done
if $cygwin; then
CLASSPATH=`cygpath -p -w "$CLASSPATH"`
fi
if [ "$COMMAND" = "classpath" ] ; then
echo $CLASSPATH
exit
fi
export CLASSPATH
exec "$JAVA" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@"