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 configuration schema XSD can be found here - https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/resources/configuration-schema.xsd

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
name
Name of the propertyM
dfs.namenode.checkpoint.dir
value
Value of the propertyM
/hadoop/hdfs/namesecondary
description
A short description of the property.M
Determines where on the local filesystem the DFS secondary
name node should store the temporary images to merge.
display-name
Display name of the property as seen on Ambari UI.O
SecondaryNameNode Checkpoint directories
filename
Name of the file on disk to which the config-type is serializedO 
deleted
Deprecated property.O 
require-input
Does the property mandate aa value or an empty value is allowed?O true / false. Default = false.
on-ambari-upgrade

Do you want to ambari to add it to the service config when an Ambari upgrade is done?

Note : A service config change will trigger a Restart required for the service on the Ambari UI.

O
add="false" delete="false" update="false".
on-stack-upgrade
Do you want to ambari to add it to the service config when a stack upgrade is done?O
merge="true"
property-type
Type of property.O
PASSWORD,USER,UID,GROUP,GID,TEXT,ADDITIONAL_USER_PROPERTY,
NOT_MANAGED_HDFS_PATH,VALUE_FROM_PROPERTY_FILE,KERBEROS_PRINCIPAL.

Default = TEXT

value-attributes
Set of attributes for the value of the property.O<explained below>
depends-on
Used to specify dependent properties, even across config types. This is used in stack recommendations when the user changes a property, and another property needs to be updated accordingly.O
<depends-on>
<property>
<type>zoo.cfg</type>
<name>clientPort</name>
</property>
</depends-on>
property_depended_by
The reverse dependency mapping. Some other property is dependent on this property.O
<property_depended_by>
<dependedByProperties>
<name>hive.exec.orc.encoding.strategy</name>
<type>hive-site</type>
</dependedByProperties>
</property_depended_by>
used-by
 O 

 

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

Some of these are used in enhanced configs - Enhanced Configs

Value AttributeExplanationSample / Allowed value
type
Type of the value.boolean / int / float / directory / directories / content / value-list / user / password
overridable
 true / false
empty_value_valid
Is an empty value is valid?true / false
ui_only_property
 true / false
read_only
 Uneditabletrue / false
editable_only_at_install
Value can be edited only during the initial cluster install. For example, HBase table split points. true / false
show_property_name
 true / false
increment_step 
  
selection_cardinality
  
property-file-name
  
property-file-type
  
entries
  
hidden
  
entries_editable
 true / false
user-groups
  
keystore
Keystore enabled or not.true / false
maximum
Max allowed value 
minimum
Min allowed value 
unit
Unit of the valueB / MB / ms / Bytes / milliseconds /
visible
  
copy
  
  • No labels