Support Questions

Find answers, ask questions, and share your expertise

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

avatar
Contributor

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

avatar
Rising Star

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.

View solution in original post

2 REPLIES 2

avatar
Rising Star

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.

avatar
Contributor
Curious.. can't we set the values for Hbase, HDFS, etc using the configuration file with the "Configs {} section after we identify the services?