Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page adds to the over all guide How-To Define Stacks and Services and focuses on various aspects of adding a config property.

...

A config property is generally added to a Service and is associated with a config type.

For example, 

<property><name>zookeeper.znode.parent</name><value>/hbase-unsecure</value></property>

Code: https://github.com/apache/ambari/blob/branch-2.4/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/configuration/hbase-site.xml#L508

Where should the property be added?

Identify the service version that the property is valid for. Ensure that the version is already defined in common-services. If not, then add a new version to the common-service. Do not add config properties directly in the stack versions unless the config property is only valid for a specific stack (e.g. HDP-2.4)

E.g https://github.com/apache/ambari/blob/branch-2.4/ambari-server/src/main/resources/common-services/KAFKA/0.9.0/configuration/kafka-broker.xml#L27-L32 added to KAFKA/0.9.0 and not KAFKA/0.8.1. KAFKA in HDP-2.3 derives from KAFKA/0.9.0 https://github.com/apache/ambari/blob/branch-2.4/ambari-server/src/main/resources/stacks/HDP/2.3/services/KAFKA/metainfo.xml#L24

If the property is not valid starting a higher config version then ensure that the property is deleted in the higher version. E.g. https://github.com/apache/ambari/blob/branch-2.4/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.2.5/configuration/application-properties.xml#L226-L230

Note: It is not typical to just remove config properties from a released stack definition. If you absolutely must then ensure that there is corresponding Ambari upgrade code to remove the config property as well.

What is the value of the property

What should happen on Ambari upgrade

What should happen on Stack upgrade

Display characteristics of the config property

See - Enhanced Configs