HBASE-9745 Append HBASE_CLASSPATH to end of Java classpath and use another env var for prefix

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1531594 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2013-10-12 21:03:39 +00:00
parent 30837458ee
commit ffeb4ab1e3
1 changed files with 14 additions and 6 deletions

View File

@ -31,11 +31,14 @@
# #
# HBASE_CLASSPATH Extra Java CLASSPATH entries. # HBASE_CLASSPATH Extra Java CLASSPATH entries.
# #
# HBASE_CLASSPATH_PREFIX Extra Java CLASSPATH entries that should be
# prefixed to the system classpath.
#
# HBASE_HEAPSIZE The maximum amount of heap to use, in MB. # HBASE_HEAPSIZE The maximum amount of heap to use, in MB.
# Default is 1000. # Default is 1000.
# #
# HBASE_LIBRARY_PATH HBase additions to JAVA_LIBRARY_PATH for adding # HBASE_LIBRARY_PATH HBase additions to JAVA_LIBRARY_PATH for adding
# native libaries. # native libraries.
# #
# HBASE_OPTS Extra Java runtime options. # HBASE_OPTS Extra Java runtime options.
# #
@ -169,11 +172,6 @@ for f in $HBASE_HOME/lib/*.jar; do
CLASSPATH=${CLASSPATH}:$f; CLASSPATH=${CLASSPATH}:$f;
done done
# Add user-specified CLASSPATH first
if [ "$HBASE_CLASSPATH" != "" ]; then
CLASSPATH=${HBASE_CLASSPATH}:${CLASSPATH}
fi
# default log directory & file # default log directory & file
if [ "$HBASE_LOG_DIR" = "" ]; then if [ "$HBASE_LOG_DIR" = "" ]; then
HBASE_LOG_DIR="$HBASE_HOME/logs" HBASE_LOG_DIR="$HBASE_HOME/logs"
@ -223,6 +221,16 @@ if [ -d "${HBASE_HOME}/build/native" -o -d "${HBASE_HOME}/lib/native" ]; then
fi fi
fi fi
# Add user-specified CLASSPATH last
if [ "$HBASE_CLASSPATH" != "" ]; then
CLASSPATH=${CLASSPATH}:${HBASE_CLASSPATH}
fi
# Add user-specified CLASSPATH prefix first
if [ "$HBASE_CLASSPATH_PREFIX" != "" ]; then
CLASSPATH=${HBASE_CLASSPATH_PREFIX}:${CLASSPATH}
fi
# cygwin path translation # cygwin path translation
if $cygwin; then if $cygwin; then
JAVA_LIBRARY_PATH=`cygpath -p "$JAVA_LIBRARY_PATH"` JAVA_LIBRARY_PATH=`cygpath -p "$JAVA_LIBRARY_PATH"`