Index: src/docs/src/documentation/content/xdocs/metrics.xml =================================================================== --- src/docs/src/documentation/content/xdocs/metrics.xml (revision 892652) +++ src/docs/src/documentation/content/xdocs/metrics.xml (working copy) @@ -123,48 +123,20 @@
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

Add the lines:

-JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false" -JMX_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote.password.file=$HBASE_HOME/conf/jmxremote.passwd" -JMX_OPTS="$JMX_OPTS -Dcom.sun.management.jmxremote.access.file=$HBASE_HOME/conf/jmxremote.access" +HBASE_JMX_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false" +HBASE_JMX_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.password.file=$HBASE_HOME/conf/jmxremote.passwd" +HBASE_JMX_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.access.file=$HBASE_HOME/conf/jmxremote.access" -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" +export HBASE_MASTER_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.port=10101" +export HBASE_REGIONSERVER_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.port=10102"