MAPREDUCE-3283. mapred classpath CLI does not display the complete classpath. Contributed by Varun Saxena.

This commit is contained in:
cnauroth 2015-01-21 13:50:39 -08:00
parent c0af72c7f7
commit 0742591335
3 changed files with 13 additions and 4 deletions

View File

@ -307,6 +307,9 @@ Release 2.7.0 - UNRELEASED
MAPREDUCE-6206. TestAggregatedTransferRate fails on non-US systems (Jens
Rabe via jlowe)
MAPREDUCE-3283. mapred classpath CLI does not display the complete classpath
(Varun Saxena via cnauroth)
Release 2.6.0 - 2014-11-18
INCOMPATIBLE CHANGES

View File

@ -78,9 +78,7 @@ case ${COMMAND} in
HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
;;
classpath)
hadoop_finalize
echo "${CLASSPATH}"
exit 0
hadoop_do_classpath_subcommand "$@"
;;
distcp)
CLASS=org.apache.hadoop.tools.DistCp

View File

@ -95,6 +95,14 @@ if "%1" == "--loglevel" (
@rem add modules to CLASSPATH
set CLASSPATH=%CLASSPATH%;%HADOOP_MAPRED_HOME%\modules\*
if %mapred-command% == classpath (
if not defined mapred-command-arguments (
@rem No need to bother starting up a JVM for this simple case.
@echo %CLASSPATH%
exit /b
)
)
call :%mapred-command% %mapred-command-arguments%
set java_arguments=%JAVA_HEAP_MAX% %HADOOP_OPTS% -classpath %CLASSPATH% %CLASS% %mapred-command-arguments%
call %JAVA% %java_arguments%
@ -103,7 +111,7 @@ goto :eof
:classpath
@echo %CLASSPATH%
set CLASS=org.apache.hadoop.util.Classpath
goto :eof
:job