I am using HBase version 2.0.2. I am planning to enable JMX for the same By following Below Url.
https://hbase.apache.org/metrics.html
I have added the below lines in HBase-env.sh file
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="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.port=10101"
export HBASE_REGIONSERVER_OPTS="$HBASE_JMX_OPTS -Dcom.sun.management.jmxremote.port=10102"
After restarting the HBase from Ambari Again Changes are clearing automatically. I have edited the file using root user and HBase user also. but still, JMX is not enabled. But HBase is starting.
You need to edit hbase-env from Ambari. Any file changes made outside Ambari will be overwritten