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

svn commit: r1550994 - /hbase/branches/0.98/bin/hbase

Author: tedyu
Date: Sun Dec 15 02:58:38 2013
New Revision: 1550994

URL: http://svn.apache.org/r1550994
Log:
HBASE-10164 Allow heapsize of different units to be passed as HBASE_HEAPSIZE


Modified:
    hbase/branches/0.98/bin/hbase

Modified: hbase/branches/0.98/bin/hbase
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/bin/hbase?rev=1550994&r1=1550993&r2=1550994&view=diff
==============================================================================
--- hbase/branches/0.98/bin/hbase (original)
+++ hbase/branches/0.98/bin/hbase Sun Dec 15 02:58:38 2013
@@ -112,8 +112,15 @@ fi
 
 # check envvars which might override default args
 if [ "$HBASE_HEAPSIZE" != "" ]; then
+  SUFFIX="m"
+  if [ "${HBASE_HEAPSIZE: -1}" == "m" ] || [ "${HBASE_HEAPSIZE: -1}" == "M" ]; then
+    SUFFIX=""
+  fi
+  if [ "${HBASE_HEAPSIZE: -1}" == "g" ] || [ "${HBASE_HEAPSIZE: -1}" == "G" ]; then
+    SUFFIX=""
+  fi
   #echo "run with heapsize $HBASE_HEAPSIZE"
-  JAVA_HEAP_MAX="-Xmx""$HBASE_HEAPSIZE""m"
+  JAVA_HEAP_MAX="-Xmx""$HBASE_HEAPSIZE""$SUFFIX"
   #echo $JAVA_HEAP_MAX
 fi