Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-17917

ResourceInformationReflector#getExternalResources should ignore the external resource with a value of 0

    XMLWordPrintableJSON

Details

    Description

      Background: In FLINK-17390, we leverage WorkerSpecContainerResourceAdapter.InternalContainerResource to handle container matching logic. In FLINK-17407, we introduce external resources in WorkerSpecContainerResourceAdapter.InternalContainerResource.
      On containers returned by Yarn, we try to get the corresponding worker specs by:

      • Convert the container to InternalContainerResource
      • Get the WorkerResourceSpec from containerResourceToWorkerSpecs map.

      Problem: Container mismatch could happen in the below scenario:

      • Flink does not allocate any external resources, the externalResources of InternalContainerResource is an empty map.
      • The returned container contains all the resources (with a value of 0) defined in Yarn's resource-types.xml. The externalResources of InternalContainerResource has one or more entries with a value of 0.
      • These two InternalContainerResource do not match.

      To solve this problem, we could ignore all the external resources with a value of 0 in "ResourceInformationReflector#getExternalResources".

      cc trohrmann Could you assign this to me?

      Attachments

        Issue Links

          Activity

            People

              guoyangze Yangze Guo
              guoyangze Yangze Guo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: