What is a config-type?

String representing a group of configurations. Example: core-site, hdfs-site, yarn-site, etc. When configurations are saved in Ambari, they are persisted within a version of config-type which is immutable. If you change and save HDFS core-site configs 4 times, you will have 4 versions of config-type core-site. Also, when a service's configs are saved, only the changed config-types are updated. The supported types of config files are xml, env and properties.

Adding / modifying config properties in a config-type.

There are a number of supported property and value attributes in the XML schema of an Ambari managed config type. These attributes can be useful in specifying type , constraints, upgrade related choices, validations etc. A config property in a config-type looks like this.

<property require-input="false">
<name>dfs.namenode.checkpoint.dir</name>
<value>/hadoop/hdfs/namesecondary</value>
<description>Determines where on the local filesystem the DFS secondary
  name node should store the temporary images to merge.
  If this is a comma-delimited list of directories then the image is
  replicated in all of the directories for redundancy.
</description>
<display-name>SecondaryNameNode Checkpoint directories</display-name>
<filename>hdfs-site.xml</filename>
<deleted>false</deleted>
<on-ambari-upgrade add="false" delete="false" update="false"/>
<on-stack-upgrade merge="true"/>
<property-type></property-type>
<value-attributes>
  <type>directories</type>
  <overridable>false</overridable>
  <keystore>false</keystore>
</value-attributes>
<depends-on/>
<property_depended_by/>
<used-by/>
</property>

The corresponding Java class that maps these property definitions is https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/java/org/apache/ambari/server/state/PropertyInfo.java. The following table discusses the supported basic and advanced attributes. 

Property KeyExplanationMandatory (M) or Optional (O)Sample / Expected values
require-input
   
name
   
value
   
description
   
display-name
   
filename
   
deleted
   
on-ambari-upgrade
   
on-stack-upgrade
   
property-type
   
value-attributes
   
depends-on
   
used-by
   

 

The set of supported value-attributes in Ambari are explained below.

Value AttributeExplanationSample / Allowed value
type
  
overridable
  
keystore