From e91bb84c8afad2ef1752a3b41755defcc30c0815 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 11 Sep 2009 22:17:05 +0000 Subject: [PATCH] HBASE-1687 bin/hbase script doesn't allow for different memory settings for each daemon type git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@814056 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ bin/hbase | 4 +++ .../documentation/content/xdocs/metrics.xml | 32 ++----------------- 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 9f45300fc6d..50095ae2ba9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -39,6 +39,8 @@ Release 0.21.0 - Unreleased HBASE-1800 Too many ZK connections HBASE-1819 Update to 0.20.1 hadoop and zk 3.2.1 HBASE-1820 Update jruby from 1.2 to 1.3.1 + HBASE-1687 bin/hbase script doesn't allow for different memory settings for + each daemon type OPTIMIZATIONS diff --git a/bin/hbase b/bin/hbase index f079b301ece..d62342735b7 100755 --- a/bin/hbase +++ b/bin/hbase @@ -188,16 +188,20 @@ if [ "$COMMAND" = "shell" ] ; then CLASS="org.jruby.Main ${HBASE_HOME}/bin/hirb.rb" 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" elif [ "$COMMAND" = "rest" ] ; then CLASS='org.apache.hadoop.hbase.rest.Dispatcher' elif [ "$COMMAND" = "thrift" ] ; then CLASS='org.apache.hadoop.hbase.thrift.ThriftServer' + HBASE_OPTS="$HBASE_OPTS $HBASE_THRIFT_OPTS" elif [ "$COMMAND" = "migrate" ] ; then CLASS='org.apache.hadoop.hbase.util.Migrate' elif [ "$COMMAND" = "zookeeper" ] ; then CLASS='org.apache.hadoop.hbase.zookeeper.HQuorumPeer' + HBASE_OPTS="$HBASE_OPTS $HBASE_ZOOKEEPER_OPTS" else CLASS=$COMMAND fi diff --git a/src/docs/src/documentation/content/xdocs/metrics.xml b/src/docs/src/documentation/content/xdocs/metrics.xml index b01d7bd06cc..a0080a41555 100644 --- a/src/docs/src/documentation/content/xdocs/metrics.xml +++ b/src/docs/src/documentation/content/xdocs/metrics.xml @@ -123,8 +123,8 @@ controlRole readwrite
Configure JMX in HBase startup

- Finally, edit the $HBASE_HOME/conf/hbase-env.sh and - $HBASE_HOME/bin/hbase scripts for JMX support: + Finally, edit the $HBASE_HOME/conf/hbase-env.sh + script to add JMX support:

$HBASE_HOME/conf/hbase-env.sh
@@ -139,34 +139,6 @@ export HBASE_MASTER_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote.port=10101" export HBASE_REGIONSERVER_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote.port=10102" -
$HBASE_HOME/bin/hbase
-
-

Towards the end of the script, replace the lines:

- - # figure out which class to run -if [ "$COMMAND" = "shell" ] ; then - CLASS="org.jruby.Main ${HBASE_HOME}/bin/hirb.rb" -elif [ "$COMMAND" = "master" ] ; then - CLASS='org.apache.hadoop.hbase.master.HMaster' -elif [ "$COMMAND" = "regionserver" ] ; then - CLASS='org.apache.hadoop.hbase.regionserver.HRegionServer' - -

- with the lines: (adding the "HBASE_OPTS=..." lines for "master" and - "regionserver" commands) -

- - # figure out which class to run -if [ "$COMMAND" = "shell" ] ; then - CLASS="org.jruby.Main ${HBASE_HOME}/bin/hirb.rb" -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" - -

After restarting the processes you want to monitor, you should now be