Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
-
None
Description
If a custom resource is defined with a default unit value (base unit) and a node reports its total capability in a different unit (e.g. M) then ClusterNodeTracker.getMaxAllowedAllocation returns the max allocation resource in the base unit, so the reported resource unit is not respected.
The issue is when the updateMaxResources method is called (i.e. NM node is registered), the unit of the node's resources is not checked. In this method, we need to convert the reported value to the unit defined by RM for the individual resource types.
I also wanted to add a testcase where memory has G as its unit, but it was not possible easily without hacky code so I only added a testcase that verifies custom resource values.
Attachments
Attachments
Issue Links
- is related to
-
YARN-7159 Normalize unit of resource objects in RM to avoid unit conversion in critical path
- Resolved