Enum PreferredAllocationRequestSlotMatchingStrategy
java.lang.Object
java.lang.Enum<PreferredAllocationRequestSlotMatchingStrategy>
org.apache.flink.runtime.jobmaster.slotpool.PreferredAllocationRequestSlotMatchingStrategy
- All Implemented Interfaces:
Serializable,Comparable<PreferredAllocationRequestSlotMatchingStrategy>,RequestSlotMatchingStrategy
public enum PreferredAllocationRequestSlotMatchingStrategy
extends Enum<PreferredAllocationRequestSlotMatchingStrategy>
implements RequestSlotMatchingStrategy
RequestSlotMatchingStrategy that takes the preferred allocations into account. The
strategy will try to fulfill the preferred allocations and if this is not possible, then it will
fall back to SimpleRequestSlotMatchingStrategy.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.runtime.jobmaster.slotpool.RequestSlotMatchingStrategy
RequestSlotMatchingStrategy.RequestSlotMatch -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionmatchRequestsAndSlots(Collection<? extends PhysicalSlot> slots, Collection<org.apache.flink.runtime.jobmaster.slotpool.PendingRequest> pendingRequests) Match the given slots with the given collection of pending requests.toString()Returns the enum constant of this type with the specified name.values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
matchRequestsAndSlots
public Collection<RequestSlotMatchingStrategy.RequestSlotMatch> matchRequestsAndSlots(Collection<? extends PhysicalSlot> slots, Collection<org.apache.flink.runtime.jobmaster.slotpool.PendingRequest> pendingRequests) Description copied from interface:RequestSlotMatchingStrategyMatch the given slots with the given collection of pending requests.- Specified by:
matchRequestsAndSlotsin interfaceRequestSlotMatchingStrategy- Parameters:
slots- slots to matchpendingRequests- slot requests to match- Returns:
- resulting matches of this operation
-
toString
- Overrides:
toStringin classEnum<PreferredAllocationRequestSlotMatchingStrategy>
-