Automatic YARN Resource Restoration
Pulse automatically restores the resource capacity of individual NodeManagers when yarn-site.xml is unavailable, the ad-events (NATS) service is unavailable, or YARN optimization is disabled for a host. This prevents incorrect resource allocation across NodeManagers with different memory and vCore configurations.
How Resource Restoration Works
The PulseYARNMetrics Agent reads the following properties from yarn-site.xml on each NodeManager:
- yarn.nodemanager.resource.memory-mb
- yarn.nodemanager.resource.cpu-vcores
Both properties must be present and have values greater than zero. After successfully reading these values, the agent stores them in memory and maintains a host-specific local copy.
If yarn-site.xml becomes unavailable or contains invalid resource values, the agent:
- Restores the resource capacity using the last known values from the in-memory cache.
- Uses the local copy if the in-memory cache is unavailable.
- Skips resource restoration if neither source contains valid resource values.
- Stops the optimization threads while keeping the agent process and configuration listener running.
The agent checks yarn-site.xml every minute and automatically resumes optimization when both resource values are valid and optimization is enabled for the host.
The agent updates the local copy only when it does not exist or when yarn-site.xml has been modified more recently than the local copy. If the resource values are missing or invalid, the agent retains the previous local copy.
Resource Restoration When a Node Agent Stops Reporting
The YARN Optimizer maintains the last known configured memory and vCore values for each NodeManager.
If the optimizer does not receive a node signal for more than five minutes and the NodeManager remains in the ResourceManager's running node list, the optimizer:
- Marks the NodeManager as stale.
- Publishes a resource update using the last known valid memory and vCore values for that NodeManager. Another agent reads and updates it on a host where an Agent is down for atleast five minutes.
If the node agent is still running, it applies the resource update. When the optimizer receives a node signal again, it automatically resumes resource state evaluation.
Note
Resource restoration is automatic and does not require manual configuration of fallback memory and vCore values in override.yml. This behavior applies to both ODP and CDP deployments.

Have a suggestion?