Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
ContainerAllocation.LOCALITY_SKIPPED is final static, and its .state should always be AllocationState.LOCALITY_SKIPPED. However, this variable is public and is accidentally changed to AllocationState.APP_SKIPPED in RegularContainerAllocator under certain conditions. Once that happens, all following LOCALITY_SKIPPED situations will be treated as APP_SKIPPED.
Similar risks exist for ContainerAllocation.PRIORITY_SKIPPED/APP_SKIPPED/QUEUE_SKIPPED.
ContainerAllocation.state should be private and should not be changed. If changes are needed, a new ContainerAllocation should be created.