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.

Howto use CM API to reset values from standard configuration/distribution?

Solved Go to solution

Howto use CM API to reset values from standard configuration/distribution?

Explorer

Having configured a base system on AWS with CM, I want to programtically update the environment - hoefully through the use of the configuration file, to update specific paramaters.

 

I found the API relevant names, example, hbase_regionserver_msginterval and want to change this from the default to 25.

 

How is this to be done?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Howto use CM API to reset values from standard configuration/distribution?

Cloudera Employee

Hello,

 

Perform the following:

 

1. SSH to your instance of Cloudera Manager.

 

2. After the proper modifications, enter the following command:

 

curl -X PUT -H "Content-Type:application/json" -u admin:admin -d '{ "items": [ { "name": "hbase_regionserver_msginterval", "value": "25" } ] }' 'http://localhost:7180/api/v10/clusters/Cluster%201/services/HBASE-1/roleConfigGroups/HBASE-1-REGIONSERVER-BASE/config'

 

Proper modifications:

 

- If your credentials are not "admin:admin," then replace "admin:admin" with the credentials you are using.

 

- If your cluster name is not "Cluster 1,"  then change "Cluster%201" to the name of your cluster.  If you don't know the name of your cluster, issue the following command:

 

  

curl -u admin:admin 'http://localhost:7180/api/v10/clusters'

 

- If your HBASE service name is not "HBASE-1," then change it to the name you are using.   If you do not know the name of your HBASE service, issue the following command:

 

  

curl -u admin:admin 'http://localhost:7180/api/v10/clusters/Cluster%201/services' | grep displayName

 

- If your RoleConfigGroupName is not "HBASE-1-REGIONSERVER-BASE," then change it to the name you are using.  If you do not know your RoleConfigGroupName, then enter the following command:

 

 

curl -u admin:admin 'http://localhost:7180/api/v10/clusters/Cluster%201/services/HBASE-1/roleConfigGroups' | grep name

  

3. Go to the home page of Cloudera Manager.  On the page, you should see a stale configuration icon next to the HBASE service.  Click the icon to refresh the configuration.

2 REPLIES 2
Highlighted

Re: Howto use CM API to reset values from standard configuration/distribution?

Cloudera Employee

Hello,

 

Perform the following:

 

1. SSH to your instance of Cloudera Manager.

 

2. After the proper modifications, enter the following command:

 

curl -X PUT -H "Content-Type:application/json" -u admin:admin -d '{ "items": [ { "name": "hbase_regionserver_msginterval", "value": "25" } ] }' 'http://localhost:7180/api/v10/clusters/Cluster%201/services/HBASE-1/roleConfigGroups/HBASE-1-REGIONSERVER-BASE/config'

 

Proper modifications:

 

- If your credentials are not "admin:admin," then replace "admin:admin" with the credentials you are using.

 

- If your cluster name is not "Cluster 1,"  then change "Cluster%201" to the name of your cluster.  If you don't know the name of your cluster, issue the following command:

 

  

curl -u admin:admin 'http://localhost:7180/api/v10/clusters'

 

- If your HBASE service name is not "HBASE-1," then change it to the name you are using.   If you do not know the name of your HBASE service, issue the following command:

 

  

curl -u admin:admin 'http://localhost:7180/api/v10/clusters/Cluster%201/services' | grep displayName

 

- If your RoleConfigGroupName is not "HBASE-1-REGIONSERVER-BASE," then change it to the name you are using.  If you do not know your RoleConfigGroupName, then enter the following command:

 

 

curl -u admin:admin 'http://localhost:7180/api/v10/clusters/Cluster%201/services/HBASE-1/roleConfigGroups' | grep name

  

3. Go to the home page of Cloudera Manager.  On the page, you should see a stale configuration icon next to the HBASE service.  Click the icon to refresh the configuration.

Re: Howto use CM API to reset values from standard configuration/distribution?

Explorer
Curious.. can't we set the values for Hbase, HDFS, etc using the configuration file with the "Configs {} section after we identify the services?
Don't have an account?
Coming from Hortonworks? Activate your account here