Class DefaultRequirementMatcher

java.lang.Object
org.apache.flink.runtime.slots.DefaultRequirementMatcher
All Implemented Interfaces:
RequirementMatcher

public class DefaultRequirementMatcher extends Object implements RequirementMatcher
Default implementation of RequirementMatcher. This matcher finds the first requirement that a) is not unfulfilled and B) matches the resource profile.
  • Constructor Details

    • DefaultRequirementMatcher

      public DefaultRequirementMatcher()
  • Method Details

    • match

      public Optional<ResourceProfile> match(ResourceProfile resourceProfile, ResourceCounter totalRequirements, Function<ResourceProfile,Integer> numAssignedResourcesLookup)
      Description copied from interface: RequirementMatcher
      Attempts to match the given resource profile with one of the given requirements.
      Specified by:
      match in interface RequirementMatcher
      Parameters:
      resourceProfile - resource profile to match
      totalRequirements - the total requirements
      numAssignedResourcesLookup - a lookup for how many resources have already been assigned to a requirement
      Returns:
      matching requirement profile, if one exists