Details
Description
NodeManagerMetrics.java
public void addResource(Resource res) { availableMB = availableMB + res.getMemorySize(); availableGB.incr((int)Math.floor(availableMB/1024d)); availableVCores.incr(res.getVirtualCores()); }
When the node resource was updated through RM-NM heartbeat, the NM metric will get wrong value.
The root cause of this issue is that new resource has been added to availableMB, so not needed to increase for availableGB again.