HADOOP-9450. HADOOP_USER_CLASSPATH_FIRST is not honored; CLASSPATH is PREpended instead of APpended. Contributed by Chris Nauroth and Harsh J. (harsh)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1469214 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cd27afa71a
commit
5003e8de76
|
@ -546,6 +546,9 @@ Release 2.0.5-beta - UNRELEASED
|
|||
HADOOP-9401. CodecPool: Add counters for number of (de)compressors
|
||||
leased out. (kkambatl via tucu)
|
||||
|
||||
HADOOP-9450. HADOOP_USER_CLASSPATH_FIRST is not honored; CLASSPATH
|
||||
is PREpended instead of APpended. (Chris Nauroth and harsh via harsh)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HADOOP-9150. Avoid unnecessary DNS resolution attempts for logical URIs
|
||||
|
|
|
@ -145,18 +145,6 @@ if exist %HADOOP_COMMON_HOME%\%HADOOP_COMMON_LIB_JARS_DIR% (
|
|||
|
||||
set CLASSPATH=!CLASSPATH!;%HADOOP_COMMON_HOME%\%HADOOP_COMMON_DIR%\*
|
||||
|
||||
@rem
|
||||
@rem add user-specified CLASSPATH last
|
||||
@rem
|
||||
|
||||
if defined HADOOP_CLASSPATH (
|
||||
if defined HADOOP_USER_CLASSPATH_FIRST (
|
||||
set CLASSPATH=%HADOOP_CLASSPATH%;%CLASSPATH%;
|
||||
) else (
|
||||
set CLASSPATH=%CLASSPATH%;%HADOOP_CLASSPATH%;
|
||||
)
|
||||
)
|
||||
|
||||
@rem
|
||||
@rem default log directory % file
|
||||
@rem
|
||||
|
@ -289,4 +277,16 @@ if not "%HADOOP_MAPRED_HOME%\%MAPRED_DIR%" == "%HADOOP_YARN_HOME%\%YARN_DIR%" (
|
|||
set CLASSPATH=!CLASSPATH!;%HADOOP_MAPRED_HOME%\%MAPRED_DIR%\*
|
||||
)
|
||||
|
||||
@rem
|
||||
@rem add user-specified CLASSPATH last
|
||||
@rem
|
||||
|
||||
if defined HADOOP_CLASSPATH (
|
||||
if defined HADOOP_USER_CLASSPATH_FIRST (
|
||||
set CLASSPATH=%HADOOP_CLASSPATH%;%CLASSPATH%;
|
||||
) else (
|
||||
set CLASSPATH=%CLASSPATH%;%HADOOP_CLASSPATH%;
|
||||
)
|
||||
)
|
||||
|
||||
:eof
|
||||
|
|
|
@ -158,10 +158,6 @@ fi
|
|||
# CLASSPATH initially contains $HADOOP_CONF_DIR
|
||||
CLASSPATH="${HADOOP_CONF_DIR}"
|
||||
|
||||
if [ "$HADOOP_USER_CLASSPATH_FIRST" != "" ] && [ "$HADOOP_CLASSPATH" != "" ] ; then
|
||||
CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
|
||||
fi
|
||||
|
||||
# so that filenames w/ spaces are handled correctly in loops below
|
||||
IFS=
|
||||
|
||||
|
@ -182,11 +178,6 @@ fi
|
|||
|
||||
CLASSPATH=${CLASSPATH}:$HADOOP_COMMON_HOME/$HADOOP_COMMON_DIR'/*'
|
||||
|
||||
# add user-specified CLASSPATH last
|
||||
if [ "$HADOOP_USER_CLASSPATH_FIRST" = "" ] && [ "$HADOOP_CLASSPATH" != "" ]; then
|
||||
CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
|
||||
fi
|
||||
|
||||
# default log directory & file
|
||||
if [ "$HADOOP_LOG_DIR" = "" ]; then
|
||||
HADOOP_LOG_DIR="$HADOOP_PREFIX/logs"
|
||||
|
@ -285,3 +276,15 @@ if [ "$HADOOP_MAPRED_HOME/$MAPRED_DIR" != "$HADOOP_YARN_HOME/$YARN_DIR" ] ; then
|
|||
|
||||
CLASSPATH=${CLASSPATH}:$HADOOP_MAPRED_HOME/$MAPRED_DIR'/*'
|
||||
fi
|
||||
|
||||
# Add the user-specified CLASSPATH via HADOOP_CLASSPATH
|
||||
# Add it first or last depending on if user has
|
||||
# set env-var HADOOP_USER_CLASSPATH_FIRST
|
||||
if [ "$HADOOP_CLASSPATH" != "" ]; then
|
||||
# Prefix it if its to be preceded
|
||||
if [ "$HADOOP_USER_CLASSPATH_FIRST" != "" ]; then
|
||||
CLASSPATH=${HADOOP_CLASSPATH}:${CLASSPATH}
|
||||
else
|
||||
CLASSPATH=${CLASSPATH}:${HADOOP_CLASSPATH}
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue