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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0, 3.1.1
    • capacity scheduler
    • 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.

      Attachments

        1. YARN-8528.001.patch
          8 kB
          Abandoned Account

        Activity

          People

            wuzang Abandoned Account
            wuzang Abandoned Account
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: