HBASE-13120 Allow disabling hadoop classpath and native library lookup (Siddharth Wagle)

This commit is contained in:
Enis Soztutar 2015-02-27 16:27:40 -08:00
parent ade44d754d
commit 287d08447f
1 changed files with 10 additions and 7 deletions

View File

@ -214,6 +214,8 @@ if [ "$HBASE_LIBRARY_PATH" != "" ]; then
fi
#If avail, add Hadoop to the CLASSPATH and to the JAVA_LIBRARY_PATH
# Allow this functionality to be disabled
if [ "$HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP" != "true" ] ; then
HADOOP_IN_PATH=$(PATH="${HADOOP_HOME:-${HADOOP_PREFIX}}/bin:$PATH" which hadoop 2>/dev/null)
if [ -f ${HADOOP_IN_PATH} ]; then
HADOOP_JAVA_LIBRARY_PATH=$(HADOOP_CLASSPATH="$CLASSPATH" ${HADOOP_IN_PATH} \
@ -223,6 +225,7 @@ if [ -f ${HADOOP_IN_PATH} ]; then
fi
CLASSPATH=$(append_path "${CLASSPATH}" `${HADOOP_IN_PATH} classpath 2>/dev/null`)
fi
fi
# Add user-specified CLASSPATH last
if [ "$HBASE_CLASSPATH" != "" ]; then