Created on 10-27-2015 04:57 AM - edited 09-16-2022 02:46 AM
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
Created 10-27-2015 09:47 AM
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".
Created 10-27-2015 09:47 AM
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".
Created 07-17-2018 12:02 PM
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
Created 07-17-2018 12:30 PM
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.
Created 07-17-2018 02:10 PM
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
Created 07-17-2018 03:27 PM
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.
Created 07-18-2018 04:18 AM
Created 07-18-2018 02:31 PM
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.