Package org.apache.flink.runtime.slots
Class DefaultRequirementMatcher
- java.lang.Object
-
- org.apache.flink.runtime.slots.DefaultRequirementMatcher
-
- All Implemented Interfaces:
RequirementMatcher
public class DefaultRequirementMatcher extends Object implements RequirementMatcher
Default implementation ofRequirementMatcher. This matcher finds the first requirement that a) is not unfulfilled and B) matches the resource profile.
-
-
Constructor Summary
Constructors Constructor Description DefaultRequirementMatcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<ResourceProfile>match(ResourceProfile resourceProfile, ResourceCounter totalRequirements, Function<ResourceProfile,Integer> numAssignedResourcesLookup)Attempts to match the given resource profile with one of the given requirements.
-
-
-
Method Detail
-
match
public Optional<ResourceProfile> match(ResourceProfile resourceProfile, ResourceCounter totalRequirements, Function<ResourceProfile,Integer> numAssignedResourcesLookup)
Description copied from interface:RequirementMatcherAttempts to match the given resource profile with one of the given requirements.- Specified by:
matchin interfaceRequirementMatcher- Parameters:
resourceProfile- resource profile to matchtotalRequirements- the total requirementsnumAssignedResourcesLookup- a lookup for how many resources have already been assigned to a requirement- Returns:
- matching requirement profile, if one exists
-
-