HBASE-3533 Allow HBASE_LIBRARY_PATH env var to specify extra locations of native lib
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1080459 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dd21a45854
commit
30d63d550f
|
@ -97,6 +97,8 @@ Release 0.91.0 - Unreleased
|
|||
causes tests not to run via not-maven
|
||||
HBASE-3513 upgrade thrift to 0.5.0 and use mvn version
|
||||
HBASE-3620 Make HBCK utility faster
|
||||
HBASE-3533 Allow HBASE_LIBRARY_PATH env var to specify extra locations
|
||||
of native lib
|
||||
|
||||
TASK
|
||||
HBASE-3559 Move report of split to master OFF the heartbeat channel
|
||||
|
|
22
bin/hbase
22
bin/hbase
|
@ -34,6 +34,9 @@
|
|||
# HBASE_HEAPSIZE The maximum amount of heap to use, in MB.
|
||||
# Default is 1000.
|
||||
#
|
||||
# HBASE_LIBRARY_PATH HBase additions to JAVA_LIBRARY_PATH for adding
|
||||
# native libaries.
|
||||
#
|
||||
# HBASE_OPTS Extra Java runtime options.
|
||||
#
|
||||
# HBASE_CONF_DIR Alternate conf dir. Default is ${HBASE_HOME}/conf.
|
||||
|
@ -181,21 +184,26 @@ if $cygwin; then
|
|||
HBASE_HOME=`cygpath -d "$HBASE_HOME"`
|
||||
HBASE_LOG_DIR=`cygpath -d "$HBASE_LOG_DIR"`
|
||||
fi
|
||||
|
||||
function append_path() {
|
||||
if [ -z "$1" ]; then
|
||||
echo $2
|
||||
else
|
||||
echo $1:$2
|
||||
fi
|
||||
}
|
||||
|
||||
# setup 'java.library.path' for native-hadoop code if necessary
|
||||
JAVA_LIBRARY_PATH=''
|
||||
JAVA_LIBRARY_PATH="$HBASE_LIBRARY_PATH"
|
||||
if [ -d "${HBASE_HOME}/build/native" -o -d "${HBASE_HOME}/lib/native" ]; then
|
||||
JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`
|
||||
|
||||
if [ -d "$HBASE_HOME/build/native" ]; then
|
||||
JAVA_LIBRARY_PATH=${HBASE_HOME}/build/native/${JAVA_PLATFORM}/lib
|
||||
JAVA_LIBRARY_PATH=$(append_path "$JAVA_LIBRARY_PATH" ${HBASE_HOME}/build/native/${JAVA_PLATFORM}/lib)
|
||||
fi
|
||||
|
||||
if [ -d "${HBASE_HOME}/lib/native" ]; then
|
||||
if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
|
||||
JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}:${HBASE_HOME}/lib/native/${JAVA_PLATFORM}
|
||||
else
|
||||
JAVA_LIBRARY_PATH=${HBASE_HOME}/lib/native/${JAVA_PLATFORM}
|
||||
fi
|
||||
JAVA_LIBRARY_PATH=$(append_path "$JAVA_LIBRARY_PATH" ${HBASE_HOME}/lib/native/${JAVA_PLATFORM})
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue