Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HBase configuration via Cloudera Manager

Solved Go to solution

HBase configuration via Cloudera Manager

Rising Star

Hi

 

I need to add rows:

<property>

<name>hfile.format.version</name>

<value>3</value>

</property>

into hbase-site.xml

 

How can I do it via ClouderaManager?

 

I am using CDH 5.4.7.

 

In case I add thow rows directly /etc/hbase/conf/hbase-site.xml it does not affect hbase.

 

Br, Margusja

1 ACCEPTED SOLUTION

Accepted Solutions

Re: HBase configuration via Cloudera Manager

Contributor

Through CM,

 

Go to HBase >> Configuration and search for hbase-site.

You should see a HBase Advanced Configuration Snippet (Safety Valve).

 

Enter the xml in these depending on wherever you want (RegionServer, Master, REST etc).

 

Through CM, all the non-defaults that you want to add to the hbase-site.xml must be done through the "Safety Valve".

 

7 REPLIES 7

Re: HBase configuration via Cloudera Manager

Contributor

Through CM,

 

Go to HBase >> Configuration and search for hbase-site.

You should see a HBase Advanced Configuration Snippet (Safety Valve).

 

Enter the xml in these depending on wherever you want (RegionServer, Master, REST etc).

 

Through CM, all the non-defaults that you want to add to the hbase-site.xml must be done through the "Safety Valve".

 

Re: HBase configuration via Cloudera Manager

Explorer

HI

I want to do the same but with command line is it possible ?

 

So I want to add some properties in hbase-site.xml but with command line like curl or others.

 

Is it possible with some API or anything else ?

 

Thank you very much

Re: HBase configuration via Cloudera Manager

Super Guru

@yassine24,

 

Yes, you can use the API.  Try searching the community for "safety valve api" and you will get some hits.  I don't have specific examples off-hand.

 

Cloudera Manager API docs are here:

 

https://cloudera.github.io/cm_api/

 

For Python and Java, thre are examples included with the API download.

Re: HBase configuration via Cloudera Manager

Explorer

Thanks for answering

 

I was trying to use cm_api in python.

But I didn't find any function to update the hbase-site.xml. 

I found the way to update some parameters but not in one shot, I had to modifiy the parameters for the master alone, for regionserver alone, and they were some parameters I didn't find them with the Api.

But with Advanced Configuration Snippet safety valve from the CM UI, it's more easily because I can update the hbase-site.xml in one shot but manually not automatically unfortunately...

 

I want to update the hbase-site.xml in one shot with a function from an APi or anything else

 

Thank you sir

Re: HBase configuration via Cloudera Manager

Super Guru

@yassine24,

 

I'm still not quite sure what you are trying to do exactly.

 

There is no function that will update specific configuration parameters.  Rather, you would need to update attributes for particular services and roles.  For example, "hbase_service_config_safety_valve" is the attribute for service level safety valve for Hbase.

 

You can see it and other service-level attributes with the following REST api:

 

cm_host:cm_port/api/v19/clusters/Cluster 1/services/HBASE-1/config?view=full

 

The above assumes your cluster is named "Cluster 1" and your Hbase service is HBASE-1.  Adjust for your configuration as necessary.

 

 

 

Re: HBase configuration via Cloudera Manager

Explorer
Thanks

It is what I wanted to do.
And how can I modifiy the hbase_service_config_safety_valve" with the Api.
I didn't find setter ou anything else in python.

Thank you very much

Re: HBase configuration via Cloudera Manager

Super Guru

@yassine24,

 

Basic information about how to query and update Service config via python:

 

http://cloudera.github.io/cm_api/docs/python-client/#configuring-services-and-roles

 

Also, I pulled this from the Community ... it shows how to update an hdfs safety valve via REST API:

 

curl -iv -X PUT -H "Content-Type:application/json" -H "Accept:application/json" -d '{"items":[{ "name": "core_site_safety_valve","value": "<property><name>hadoop.proxyuser.ztsps.users</name><value>*</value></property><property><name>hadoop.proxyuser.ztsps.groups</name><value>*</value></property>"}]}' http://admin:admin@10.1.0.1:7180/api/v12/clusters/cluster/services/hdfs/config

 

You can try using the above information to update the safety valve for hbase_service_config_safety_valve.

 

NOTE that when updating the safety valve, what you update will replace what was there.  If you want to "add" a property to the safety valve, you need to include all the properties you want as an end result.