hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1550996 - /hbase/trunk/bin/hbase
Date Sun, 15 Dec 2013 02:59:24 GMT
Author: tedyu
Date: Sun Dec 15 02:59:24 2013
New Revision: 1550996

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


Modified:
    hbase/trunk/bin/hbase

Modified: hbase/trunk/bin/hbase
URL: http://svn.apache.org/viewvc/hbase/trunk/bin/hbase?rev=1550996&r1=1550995&r2=1550996&view=diff
==============================================================================
--- hbase/trunk/bin/hbase (original)
+++ hbase/trunk/bin/hbase Sun Dec 15 02:59:24 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
 



Mime
View raw message