Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-8528

ContainerAllocation.state should be private and unchangeable

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: capacity scheduler
    • Labels:
      None

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              wuzang Xintong Song
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: