Support Questions

Find answers, ask questions, and share your expertise

Customize Hbase JVM settings in CDH-5.4.2

avatar
New Contributor

I am trying to enable tje JVM settings for monitoring of HBase performance. Initially I thought this would be a simple change, but I was wrong.

 

The documentation briefly mentions that the conf files for Hbase follow Hadoop conventions, but that is probably the case if CDH cluster is installed 

directly without the Cloudera manager.

 

Acorrding to the documentation http://archive.cloudera.com/cdh5/cdh/5/hbase/book.html#jmx_config

the hbase-env.sh file should be modified with these settings 

 

export HBASE_JMX_BASE="-Dcom.sun.management.jmxremote.authenticate=true                  \
                       -Dcom.sun.management.jmxremote.password.file=your_password_file   \
                       -Dcom.sun.management.jmxremote.access.file=your_access_file"

export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS $HBASE_JMX_BASE "
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS $HBASE_JMX_BASE "

The question is which hbase-env.sh should be modified.  The problem is that the CDH agent is dynamically managing the configuration of Hbase,

and it seems not to use the /etc/hbase/conf file or 

/opt/cloudera/parcels/CDH-5.4.2-1.cdh5.4.2.p0.2/etc/hbase/conf.dist/hbase-env.sh

 

 From what I've seen the CDH client dynamically generates the config file for Supervisord, the process managing Hbase servers, and also the property files

under /var/run/cloudera-scm-agent/process/ directory.  Supervisord sets the environment and invokse the Hbase start-up script. 

 

The question is how to overide the settings that normally would go into hbase-env.sh?

 

I am using CHD 5.4.2 on CentOS 6.6 x86_64, and jdk1.7.0_67

 

Thanks

 

Dimitar

 

 

 

1 ACCEPTED SOLUTION

avatar
New Contributor

It worked, thanks!

 

For the benefits of the others not familiar with the security valve role,

the following env settings were added under Advanced > HBase Service Environment Advanced Configuration Snippet (Safety Valve)

HBASE_MASTER_OPTS=-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10101
HBASE_REGIONSERVER_OPTS=-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10102

 The usual shell variable substitution is not working in this scenario. Each env variable needs to be explicitly defined. 

View solution in original post

3 REPLIES 3

avatar
Cloudera Employee
You can pass those env settings via safety valve. From Cloudera Manager UI, go to hbase configuration page, and find property 'HBase Service Environment Advanced Configuration Snippet (Safety Valve)', add key-value pairs there, save the value, and restart the service.

The settings will impact all roles of the service except client configuration.

avatar
New Contributor

It worked, thanks!

 

For the benefits of the others not familiar with the security valve role,

the following env settings were added under Advanced > HBase Service Environment Advanced Configuration Snippet (Safety Valve)

HBASE_MASTER_OPTS=-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10101
HBASE_REGIONSERVER_OPTS=-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=10102

 The usual shell variable substitution is not working in this scenario. Each env variable needs to be explicitly defined. 

avatar
New Contributor

Hi Experts

 

I was trying to do simlilar change i.e. change Java option manually, however my problem is bit different.  I need to reduce value of parameter "Java Heap Size of HBase RegionServer in Bytes"  - only on 1 region server because this host has less memory allocated compare to others.  I want this parameter to be in effect  only for one host but region server role consistes of 3 hosts

 

 

Thanks in advance