Created 06-01-2016 12:45 AM
We need to add proxyuser properties to hdfs-site.xml during installation of our product.
CM REST API allows only update of existing property.
Does anyone know how to add property without GUI?
I tried the gollowing statement, but it fails:
curl -iv -X PUT -H "Content-Type:application/json" -H "Accept:application/json" -d '{"items":[{ "name": "ztsps_hadoop_proxyuser_groups_list","value": "*", "required": false, "default": "*", "displayName": "PS Proxy User Hosts", "description" : "PS user groups", "relatedName": "hadoop.proxyuser.ztsps.groups", "validationState" : "OK", "validationWarningsSuppressed" : false}]}' http://admin:admin@10.1.0.1:7180/api/v12/clusters/cluster/services/hdfs/config
It returns:
{
"message" : "Unknown configuration attribute 'ztsps_hadoop_proxyuser_groups_list'."
* Connection #0 to host 10.1.0.1 left intact
* Closing connection #0
}
Any help will be greatly appreciated,
Igor Kiselev.
Created 06-06-2016 08:42 AM
Created 06-02-2016 12:49 AM
Created 06-02-2016 12:56 PM
Harsh,
thank you very much for your response. I looked at the doc and it instructs how to add property through GUI.
We are looking for command line capability. Does it exist? Anything, REST API or some script(Ambari has one)?
Please, let me know even if the only way is GUI. I would need to rethink our approach, if Cloudera does not provide command line capability to add properties.
I will really appreciate your answer, since it will spare me from fruitless research attemts and will save me time.
Regards,
Igor Kiselev.
Created 06-02-2016 05:08 PM
Created 06-03-2016 12:33 AM
Harsh,
thank you very much. I was glad to find out after reading your response that solution that I came to right one while waiting for the response.
May I ask you another question. I also need to modify value of mapreduce.application.classpath property. It is in mapred-site.xml. I cannot find API ways to do this. I cannot even retrieve any mapred properties with API. There is no mapred service. Only yarn. Could you, please, help.
Or should I open another topic?
Regards,
Igor Kiselev.
Created 06-03-2016 01:42 AM
Created 06-03-2016 11:37 AM
Harsh,
thank you again and yes, I am looking for mapreduce_application_classpath. I need to append the value. Unfortunately curl -X GET -i http://admin:admin@10.1.0.1:7180/api/v12/clusters/cluster/services/yarn/config?view=full does not return this property at all. And there is no mapred service.
How I can get and modify this value through API?
As usual, your answer will be greatly appreaciated. This looks like my last problem.
Regards,
Igor Kiselev.
Created 06-06-2016 08:42 AM
Created 06-09-2016 11:10 AM
Harsh,
thank you very much for all your help. I found how how to create and use roles through API.
Everything works.
Regards,
Igor Kiselev.
Created 06-10-2016 12:38 AM
Created 07-27-2018 11:21 AM
Is there some place where the Cloudera property / configuration grouping is documented for the API?
I am trying to set up a script using the RESTful API that can repeatedly, consistently configure a complete Cloudera cluster. For instance, given a cluster with only (say) ten hosts configured but no services (yet), how would I use the API to configure and set up the HDFS NameNode, SecondaryNameNode, DataNodes, Gateway, etc? I can figure out the parameters, but can't figure out how to assign roles.
thanks
Created on 05-05-2019 07:29 AM - edited 05-05-2019 07:31 AM
Hi Harsh, In my case, i am trying to fetch all mapreduce related properties. But in the yarn, there is no role of type Gateway for my cluster. So is there any other way to fetch mapreduce properties?
Also if i try to fetch mapreduce-site.xm file from other roles like node manager or resourcemanager, it is just givivng the xml file with 2 properties only:
mapreduce.jobhistory.webapp.address
mapreduce.jobhistory.webapp.https.address
Could you please explain what could be the reason for that?
And how can i fetch all the properties.
Created 05-05-2019 06:08 PM
Created 05-05-2019 07:47 PM
@Harsh J Thanks for the reply. Yes http://cm-host.com:7180/api/v15/clusters/MyClusterName/services/YARN-1/roleConfigGroups/YARN-1-GATEW... api is giving all the mapreduce properties.
So If i want to fetch all defined mapreduce properties,can i use this Api or it does have any pre-requisites?
By prerequisites i mean, as in my cluster there was no role of gateway type for YARN service, even then using above api is giving me all mapred properties.
Also does it require any privileges to access this api?
Created 05-05-2019 08:58 PM