Enable NodeManager restart if you want active containers to keep running in the event that the NodeManger shuts down. By default, NodeManager restart is not enabled.
When the NodeManager restart is enabled, it stores the container state of active containers in a recovery directory;when the NodeManager restarts, it retrieves the container state from the recovery directory.
If you do not enable NodeManager restart, active containers are shut down when the NodeManager shuts down and containers need to be reallocated when the NodeManager starts again.
Configuring NodeManager Restart
To configure NodeManager restart, you must enable the NodeManager recovery and also specify a port that can be dedicated to run the NodeManager service.
Add the following parameters to the yarn-site.xml on each NodeManager node:
yarn.nodemanager.addressto include a port that is dedicated to run the NodeManager on this node.
yarn.nodemanager.recovery.dirto a different recovery directory for this node. By default, the recovery directory is set to
recoverywhich resolves to
- Restart the NodeManager Service.
For more information, see Starting, Stopping, and Restarting Services.