When you install an HDP cluster using ambari, it selects an optimum value of the configuration parameter for each of the services in the cluster. But you may have a requirement to change these default values. You can use ambari to change these settings pretty easily.
Viewing the current Service Config Properties
To view the config properties of a particular service (HDFS for example), goto Services > HDFS > Configs.
You would find the Basic and Advanced config properties here.
Changing Service Config Properties
In addition to modifying a large number of properties, making changes to a property often requires restarting daemons (and dependent daemons) across the entire cluster. Ambari makes this process easy for us.
For the example in this post, let’s change a Config property for HDFS service. We will change the
dfs.heartbeat.interval from 3 seconds to 4 seconds. This determines the datanode heartbeat interval in seconds.
When the property is changed the “save” button becomes activated. A save/notes window will then be displayed. It is highly recommended that historical notes concerning the change be added to this window. For example, I have added the description of the change I made.
Once the new property is changed, an orange Restart button will appear at the top left of the window. The new property will not take effect until the required services are restarted. The Restart button provides two options: Restart All and Restart DataNodes. To be safe, the Restart All should be used.
We will use the Restart All option to restart all the affected service. Please confirm the restart on the pop-up window.
You can view the progress is the progress window pop-up.
Ambari keeps track of all the changes made to the Service Config Properties. Every time you change any config property a new Version is created. You can revert back to a previous version anytime. Reverting back to a previous version also creates a new version.
As you can see in the above screenshot, we have the V4 version with the comment we provided while changing the Config Property.
Reverting back to a pervious version config
You can revert back to an older config by hovering over the version name. As shown in the example below, we have 2 options:
1. Compare config versions.
2. Make older config as current config.
Let’s make V3 as the current config to revert back the changes we did earlier in this post. Use the button “Make V3 current” to revert back to version “V3”. Provide an appropriate description for this change in the next pop-up window.
Similar to changing the service config properties, we have to take the restart of all the affected service components here as well.
You can monitor the service restart progress in the pop-up window and can also view the logs if individual services.