Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Rising Star

When an ambari agent starts, it bootstraps with the ambari server via registration. The server sends information to the agent about the components that have been enabled for auto start along with the other auto start properties in ambari.properties. The agent compares the current state of these components against the desired state, to determine if these components are to be installed, started, restarted or stopped.

These are the values ambari-server will send to ambari-agent by default unless configured in cluster-env.xml file.

"recovery_max_count": "6",

"recovery_lifetime_max_count": "1024",

"recovery_type": "AUTO_START",

"recovery_window_in_minutes": "60",

recovery_lifetime_max_count ---- The maximum number of recovery attempts of a failed component during the lifetime of an Ambari Agent instance. This is reset when the Ambari Agent is restarted.

recovery_window_in_minutes -- The length of a recovery window, in minutes, in which recovery attempts can be retried.

recovery_max_count --- The maximum number of recovery attempts of a failed component during a specified recovery window.
recovery_type ---- The type of automatic recovery of failed services and components to use.

The following are examples of valid values for recovery_type

Attribute: recovery_typeCommandsState Transitions
AUTO_STARTStartINSTALLED → STARTED
FULLInstall, Start, Restart, StopINIT → INSTALLED, INIT → STARTED, INSTALLED → STARTED, STARTED → STARTED, STARTED → INSTALLED
DEFAULTNoneAuto start feature disabled

For Example:--

If you want your host component not to auto start whenever your VM crashes and reboots then you have to change the "recovery_type": "AUTO_START" to "recovery_type": "DEFAULT"(Auto start feature disabled).

Similarly if you want to decrease the number of recovery attempt of any failed component, Then you have to change the value of recovery_max_count accordingly.

Hope this article will help!!!!!

Reference:-- https://cwiki.apache.org/confluence/display/AMBARI/Recovery%3A+auto+start+components

953 Views