Ambari allows users to apply host specific configuration for components via configuration groups. When Ambari deploys a cluster, it includes all hosts into the default group for a given component.

For example, for a four node cluster, node1 ~ node4.mydomain.com, where each node has Hadoop DataNode deployed, you should see all four nodes in the HDFS Default (4) group, where HDFS indicates the service name and (4) indicates the number of hosts included in the group.

This post describes how to override component configurations for subset of hosts via configuration groups. We use IBM Open Platform with Apache Hadoop version 4.1 as the Ambari example.

Create Configuration Groups

The first step of overriding component configurations against a subset of hosts is to have a configuration group that only contains the hosts required. Once the configuration group is created, you can change the configuration values for the group.

This section uses HDFS as the service to show how to create configuration group and assign hosts.

  1. On the Ambari web UI, click on a service, then click Configs tab to show the configuration page.
  2. Click the Manage Config Groups link to open the Manage HDFS Configuration Groups wizard dialog. You will notice the group list on the left only has one group HDFS Default (4), and all four nodes are displayed in the host list on the right hand side.
  3. Click the + button under the group list to open the Create New Configuration Group wizard. Type in a name and description for the description. Click OK to close the wizard dialog.

  4. From the group list, select the group created in the previous step. You will notice the host list on the right hand side is empty.(0) indicates there are no hosts included in the configuration group selected.
    Click the + button under the host name to open the Select Configuration Group Hosts wizard page where you can multi-select hosts to include in the configuration group. Click Save to add hosts to the configuration group.

    If you want to view a subset of the hosts you can filter the hosts by selecting a component type shown in the Components drop-down list.

  5. Click Save on the Create New Configuration Group wizard to close the wizard and create the configuration group.You will see the new hosts included in the configuration group.

Override Configurations

Once you have created the configuration group and assign some hosts to the group, you are ready to override configuration values.

This section uses HDFS Hadoop maximum Java heap size property as an example to describes how to override configuration values.

  1. On the HDFS’s configuration page, from the Group drop-down list, select the configuration group created in the previous section. You will see the configuration values displayed are identical to the ones in the default group. Configuration groups show full list of configuration properties. You can choose which ones to overide.
  2. Click the Override button next to the property you want to set a new value. Enter a new value in the text box shown below the default value.
    You will not be able to save the configuration changes unless you specify a value that’s different from the default value.
  3. Click Save on the top of the configuration page to save the configuration. Enter a description for the change in the Save Configuration wizard and click Save again.
    Ambari web UI opens up a new wizard dialog with the save configuration result.
  4. Restart HDFS to have the configuration change take effect.
    Ambari web UI shows different configuration values defined in various groups when it displays the default group.

In this post, we describe how you can override component configuration on a subset of hosts. This is a very useful and straight forward way to apply host specific configuration values when a cluster is a heterogeneous mixture of hosts. You can also re-assign hosts from the non-default configuration groups to the default group or the other non-default configuration groups.

Join The Discussion

Your email address will not be published. Required fields are marked *