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,14 +214,17 @@ if [ "$HBASE_LIBRARY_PATH" != "" ]; then
fi fi
#If avail, add Hadoop to the CLASSPATH and to the JAVA_LIBRARY_PATH #If avail, add Hadoop to the CLASSPATH and to the JAVA_LIBRARY_PATH
HADOOP_IN_PATH=$(PATH="${HADOOP_HOME:-${HADOOP_PREFIX}}/bin:$PATH" which hadoop 2>/dev/null) # Allow this functionality to be disabled
if [ -f ${HADOOP_IN_PATH} ]; then if [ "$HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP" != "true" ] ; then
HADOOP_JAVA_LIBRARY_PATH=$(HADOOP_CLASSPATH="$CLASSPATH" ${HADOOP_IN_PATH} \ HADOOP_IN_PATH=$(PATH="${HADOOP_HOME:-${HADOOP_PREFIX}}/bin:$PATH" which hadoop 2>/dev/null)
org.apache.hadoop.hbase.util.GetJavaProperty java.library.path 2>/dev/null) if [ -f ${HADOOP_IN_PATH} ]; then
if [ -n "$HADOOP_JAVA_LIBRARY_PATH" ]; then HADOOP_JAVA_LIBRARY_PATH=$(HADOOP_CLASSPATH="$CLASSPATH" ${HADOOP_IN_PATH} \
JAVA_LIBRARY_PATH=$(append_path "${JAVA_LIBRARY_PATH}" "$HADOOP_JAVA_LIBRARY_PATH") org.apache.hadoop.hbase.util.GetJavaProperty java.library.path 2>/dev/null)
if [ -n "$HADOOP_JAVA_LIBRARY_PATH" ]; then
JAVA_LIBRARY_PATH=$(append_path "${JAVA_LIBRARY_PATH}" "$HADOOP_JAVA_LIBRARY_PATH")
fi
CLASSPATH=$(append_path "${CLASSPATH}" `${HADOOP_IN_PATH} classpath 2>/dev/null`)
fi fi
CLASSPATH=$(append_path "${CLASSPATH}" `${HADOOP_IN_PATH} classpath 2>/dev/null`)
fi fi
# Add user-specified CLASSPATH last # Add user-specified CLASSPATH last