Another option is using configs.sh script

# /var/lib/ambari-server/resources/scripts/configs.sh
Usage: configs.sh [-u userId] [-p password] [-port port] [-s] <ACTION> 
<AMBARI_HOST> <CLUSTER_NAME> <CONFIG_TYPE> [CONFIG_FILENAME | CONFIG_KEY 
[CONFIG_VALUE]]

       [-u userId]: Optional user ID to use for authentication. Default is 
'admin'.
       [-p password]: Optional password to use for authentication. Default is 
'admin'.
       [-port port]: Optional port number for Ambari server. Default is '8080'. 
Provide empty string to not use port.
       [-s]: Optional support of SSL. Default is 'false'. Provide empty string 
to not use SSL.
       <ACTION>: One of 'get', 'set', 'delete'. 'Set' adds/updates as necessary.
       <AMBARI_HOST>: Server external host name
       <CLUSTER_NAME>: Name given to cluster. Ex: 'c1'
       <CONFIG_TYPE>: One of the various configuration types in Ambari. 
Ex:global, core-site, hdfs-site, mapred-queue-acls, etc.
       [CONFIG_FILENAME]: File where entire configurations are saved to, or 
read from. Only applicable to 'get' and 'set' actions
       [CONFIG_KEY]: Key that has to be set or deleted. Not necessary for 'get' 
action.
       [CONFIG_VALUE]: Optional value to be set. Not necessary for 'get' or 
'delete' actions.

Something like
configs.sh delete localhost myclustername config-name 
spark.yarn.applicationMaster.waitTries?

?

________________________________
From: Olivier Renault <[email protected]>
Sent: Wednesday, September 30, 2015 6:10 PM
To: [email protected]; [email protected]
Subject: Re: Removing hard-coded configuration keys for services


You can remove a service using the API. You'll find the steps at the following 
url.

https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+components+on+a+host

Thanks,
Olivier



On Wed, Sep 30, 2015 at 7:46 AM -0700, "Eirik Thorsnes" 
<[email protected]<mailto:[email protected]>> wrote:

Hi,

I've a cluster with Ambari 2.1.1 and HDP 2.3 stack. I've upgraded the
Spark service manually to version 1.5.x from 1.3.

I want to remove the (now deprecated) configuration key
"spark.yarn.applicationMaster.waitTries" and replace it with another key.

Since the key is missing the delete button in the ambari-interface, how
can I remove it? Do I have to do it manually in the db, or are there
better ways?

Regards,
Eirik

--
Eirik Thorsnes

Reply via email to