Created 08-11-2017 06:46 AM
How to know the configuration type for parameter in ambari cluster by API
examples of configuration type - core-site, hdfs-site, mapred-queue-acls
lets say I want to find the configuration type for the parameter - "mapreduce.map.memory.mb” , in this case configuration type is mapred-site
Created 08-11-2017 06:54 AM
Using Amabri API you can try the following:
curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/configurations?type=hdfs-site
Then get the latest version tag from the above call and then use that version in the API call.
curl -iv -u admin:admin -H "X-Requested-By: ambari" -X GET http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/configurations?type=hdfs-site&tag=vers...
.
Created 08-11-2017 07:13 AM
from some reason I get - { "status" : 404, "message" : "The requested resource doesn't exist: Cluster not found, clusterName=plain_ambari" ( when I run this - curl -u admin:admin -H "X-Requested-By: ambari" -X GET http://ambarir02.urs.com:8080/api/v1/clusters/plain_ambari
Created 08-11-2017 07:23 AM
ok now I get all mapreduce.map.memory.mb parameters but not the config type ( I used grep to match them ) , still not get the config type for the parameter
Created 08-11-2017 07:36 AM
the main target is to find the config type because one of the script ( config.sh) arguments is the config type , so when we want to change the parameter value by the script we need the config type , but I not have the config type info , so how to know the config type when we want to change the parameter ?
Created 08-11-2017 10:08 AM
any new suggestion?