You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2013/10/12 23:03:40 UTC

svn commit: r1531594 - /hbase/trunk/bin/hbase

Author: stack
Date: Sat Oct 12 21:03:39 2013
New Revision: 1531594

URL: http://svn.apache.org/r1531594
Log:
HBASE-9745 Append HBASE_CLASSPATH to end of Java classpath and use another env var for prefix

Modified:
    hbase/trunk/bin/hbase

Modified: hbase/trunk/bin/hbase
URL: http://svn.apache.org/viewvc/hbase/trunk/bin/hbase?rev=1531594&r1=1531593&r2=1531594&view=diff
==============================================================================
--- hbase/trunk/bin/hbase (original)
+++ hbase/trunk/bin/hbase Sat Oct 12 21:03:39 2013
@@ -31,11 +31,14 @@
 #
 #   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. 
 #                    Default is 1000.
 #
 #   HBASE_LIBRARY_PATH  HBase additions to JAVA_LIBRARY_PATH for adding
-#                    native libaries.
+#                    native libraries.
 #
 #   HBASE_OPTS       Extra Java runtime options.
 #
@@ -169,11 +172,6 @@ for f in $HBASE_HOME/lib/*.jar; do
   CLASSPATH=${CLASSPATH}:$f;
 done
 
-# Add user-specified CLASSPATH first
-if [ "$HBASE_CLASSPATH" != "" ]; then
-  CLASSPATH=${HBASE_CLASSPATH}:${CLASSPATH}
-fi
-
 # default log directory & file
 if [ "$HBASE_LOG_DIR" = "" ]; then
   HBASE_LOG_DIR="$HBASE_HOME/logs"
@@ -223,6 +221,16 @@ if [ -d "${HBASE_HOME}/build/native" -o 
   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
 if $cygwin; then
   JAVA_LIBRARY_PATH=`cygpath -p "$JAVA_LIBRARY_PATH"`