hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1550994 - /hbase/branches/0.98/bin/hbase
Date Sun, 15 Dec 2013 02:58:39 GMT
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
 



Mime
View raw message