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

Final states in ContainerAllocation might be modified externally causing unexpected allocation results

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0, 3.1.1
    • Component/s: capacity scheduler
    • Labels:
      None
    • Hadoop Flags:
      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: