- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
updating oozie-site.xml via REST api
Created on ‎05-13-2015 06:16 AM - edited ‎09-16-2022 02:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can I update oozie-site.xml using REST api?
We added our own external function to oozie.
After each installation we need to go manually and change things in oozie via the CM web interface:
- Oozie Server Configuration Safety Valve for oozie-site.xml - add two properties
- oozie.service.ActionService.executor.ext.classes - add additional value
- oozie SchemaService Workflow Extension Schemas - add additional value
i'd like to be able to do this via scripting of any kind.
So far i could not find such an option - neither in CM REST API (http://cloudera.github.io/cm_api/apidocs/v10/index.html) nor OOZIE REST API (http://archive.cloudera.com/cdh4/cdh/4/oozie/WebServicesAPI.html)
Thanks
Doron
Created ‎05-13-2015 10:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All configuration properties are in the CM REST API.
See the tutorials about using our rest API here:
http://cloudera.github.io/cm_api/
These include tutorials about how to read and set config, such as:
http://cloudera.github.io/cm_api/docs/python-client/#configuring-services-and-roles
Using the rest endpoint for configs directly is documented on the page you linked. There's a different endpoint for each concept (host, service, role config group, role, etc). The one you'd want for Oozie Server role config group is:
http://cloudera.github.io/cm_api/apidocs/v10/path__clusters_-clusterName-_services_-serviceName-_rol...
Theses configs have the keys oozie_config_safety_valve, oozie_executor_extension_classes, and oozie_workflow_extension_schemas.
The most reliable way to identify config keys is to query your live CM via the API, using the option ?view=FULL, as described in the first link above. Documentation for config values is also available here (assuming CDH5.4, you can click other links for other versions):
http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cm_props_cdh540_oozie.h...
Thanks,
Darren
Created ‎05-13-2015 10:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All configuration properties are in the CM REST API.
See the tutorials about using our rest API here:
http://cloudera.github.io/cm_api/
These include tutorials about how to read and set config, such as:
http://cloudera.github.io/cm_api/docs/python-client/#configuring-services-and-roles
Using the rest endpoint for configs directly is documented on the page you linked. There's a different endpoint for each concept (host, service, role config group, role, etc). The one you'd want for Oozie Server role config group is:
http://cloudera.github.io/cm_api/apidocs/v10/path__clusters_-clusterName-_services_-serviceName-_rol...
Theses configs have the keys oozie_config_safety_valve, oozie_executor_extension_classes, and oozie_workflow_extension_schemas.
The most reliable way to identify config keys is to query your live CM via the API, using the option ?view=FULL, as described in the first link above. Documentation for config values is also available here (assuming CDH5.4, you can click other links for other versions):
http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cm_props_cdh540_oozie.h...
Thanks,
Darren
Created ‎05-17-2015 11:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
just now got to check it and It worked!
Thanks!!
Doron
Created ‎05-26-2015 04:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I manage to create python script to change the configuration.
here is an example:
https://linuxlabrat.wordpress.com/2015/05/26/updating-cdh-configuration-using-python-and-rest-apis/
