Created on 03-13-2014 09:45 PM - edited 09-16-2022 01:55 AM
Dear Community,
I wanting to ammend the Cluster-wide Configuration Safety Valve for core-site.xml using a python script and Cloudera API commands, but can't fugure out how to do it.......any assistance would be greatly appreciated !
I'm using Hadoop 2.0.0-cdh4.4.0
Graham
Created 03-19-2014 10:02 PM
Hi Graham,
This is a service-level property of HDFS. The rest endpoint to find it looks like this:
http://<cm_host>:7180/api/v5/clusters/<cluster_name>/services/<hdfs_service_hame>/config?view=full
To modify it using the python api, get a handle to the HDFS service and call hdfs.update_config({"core_site_safety_valve": core_site_safety_valve_value }).
See more on using the python API here:
http://cloudera.github.io/cm_api/docs/python-client/
Thanks,
Darren
Created 03-19-2014 09:19 PM
I've managed to select the attribute 'core_site_safety_valve', from the database settings for CM Manager, but doing know how to ammend this value:
[root@cloudera ~]# cat /etc/cloudera-scm-server/db.properties
# Auto-generated by initialize_embedded_db.sh
#
# 20131007-081546
#
# These are database settings for CM Manager
#
com.cloudera.cmf.db.type=postgresql
com.cloudera.cmf.db.host=localhost:7432
com.cloudera.cmf.db.name=scm
com.cloudera.cmf.db.user=scm
com.cloudera.cmf.db.password=AkmRKUIBSJ
[root@cloudera ~]# psql -h localhost -p 7432 -U scm
Password for user scm:
psql (8.4.13)
Type "help" for help.
scm=> select value from configs where attr = 'core_site_safety_valve';
Created 03-19-2014 10:02 PM
Hi Graham,
This is a service-level property of HDFS. The rest endpoint to find it looks like this:
http://<cm_host>:7180/api/v5/clusters/<cluster_name>/services/<hdfs_service_hame>/config?view=full
To modify it using the python api, get a handle to the HDFS service and call hdfs.update_config({"core_site_safety_valve": core_site_safety_valve_value }).
See more on using the python API here:
http://cloudera.github.io/cm_api/docs/python-client/
Thanks,
Darren
Created 03-29-2014 02:21 PM
Darren,
Thanks for your prompt reply, I got this working due to your information.
Many thanks.
Graham