[
https://issues.apache.org/jira/browse/HBASE-1687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735918#action_12735918
]
stack commented on HBASE-1687:
------------------------------
I tried this.
I added defaults to hbase-env.sh and to test uncommented some:
{code}
Index: conf/hbase-env.sh
===================================================================
--- conf/hbase-env.sh (revision 798386)
+++ conf/hbase-env.sh (working copy)
@@ -23,6 +23,7 @@
# The java implementation to use. Java 1.6 required.
# export JAVA_HOME=/usr/java/jdk1.6.0/
+export
JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/"
# Extra Java CLASSPATH elements. Optional.
# export HBASE_CLASSPATH=
@@ -30,6 +31,17 @@
# The maximum amount of heap to use, in MB. Default is 1000.
# export HBASE_HEAPSIZE=1000
+# Heap to give regionserver. Default is HBASE_HEAPSIZE.
+# export HBASE_REGIONSERVER_OPTS=${HBASE_HEAPSIZE}
+
+# Heap to give master. Default is HBASE_HEAPSIZE.
+# export HBASE_MASTER_OPTS=${HBASE_HEAPSIZE}
+export HBASE_MASTER_OPTS="-Xmx513m -Xms513m"
+
+# Heap to give master. Default is HBASE_HEAPSIZE.
+# export HBASE_QUORUMPEER_OPTS=${HBASE_HEAPSIZE}
+export HBASE_QUORUMPEER_OPTS="-Xmx514m -Xms514m"
+
# Extra Java runtime options.
# Below are what we set by default. May only work with SUN JVM.
# For more on why as well as other possible settings,
{code}
In my process listing I see that the HBASE_HEAPSIZE always comes afterward so
if java takes last -Xms, then it will always take default. So we could swap
HBASE_HEAPSIZE and HBASE_REGIONSERVER_OPTS, etc.? Is that the idea ? As is it
don't seem to be too useful.
> bin/hbase script doesn't allow for different memory settings for each daemon
> type
> ---------------------------------------------------------------------------------
>
> Key: HBASE-1687
> URL: https://issues.apache.org/jira/browse/HBASE-1687
> Project: Hadoop HBase
> Issue Type: Bug
> Reporter: Fernando
> Attachments: hbase, hbase-script.diff
>
>
> bin/hbase assumes that all daemon types ( master, regionserver ), all use the
> same memory settings.. (HBASE_HEAPSIZE).
> 1) I propose adding daemon specific OPTS much like hadoop already has (
> HBASE_MASTER_OPTS, HBASE_REGIONSERVER_OPTS ).
> So in bin/hbase, we would merge in the daemon specific opts within the case
> statement as such:
> elif [ "$COMMAND" = "master" ] ; then
> CLASS='org.apache.hadoop.hbase.master.HMaster'
> HBASE_OPTS="$HBASE_OPTS $HBASE_MASTER_OPTS"
> elif [ "$COMMAND" = "regionserver" ] ; then
> CLASS='org.apache.hadoop.hbase.regionserver.HRegionServer'
> HBASE_OPTS="$HBASE_OPTS $HBASE_REGIONSERVER_OPTS"
> the new environment variables can then be added to hbase-env.sh as empty:
> export HBASE_MASTER_OPTS=""
> export HBASE_REGIONSERVER=""
> ..etc
> 2) I propose changes to that script to allow overriding the default memory (
> HBASE_HEAPSIZE ), with daemon specific OPTS (HBASE_MASTER_OPTS, etc ).
> Basically at the bottom of the bin/hbase script, it will check to see if the
> user has already set "-Xmx" in the HBASE_OPTS variable.. if so, then it will
> ignore the JAVA_HEAP_SIZE variable..
> as such:
> # run it
> if [[ $HBASE_OPTS == *-Xmx* ]]; then
> exec "$JAVA" $HBASE_OPTS -classpath "$CLASSPATH" $CLASS "$@"
> else
> exec "$JAVA" $JAVA_HEAP_MAX $HBASE_OPTS -classpath "$CLASSPATH" $CLASS "$@"
> fi
> I will attach the file as I have modified it..
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.