Enum SimpleRequestSlotMatchingStrategy
- java.lang.Object
-
- java.lang.Enum<SimpleRequestSlotMatchingStrategy>
-
- org.apache.flink.runtime.jobmaster.slotpool.SimpleRequestSlotMatchingStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<SimpleRequestSlotMatchingStrategy>,RequestSlotMatchingStrategy
public enum SimpleRequestSlotMatchingStrategy extends Enum<SimpleRequestSlotMatchingStrategy> implements RequestSlotMatchingStrategy
Simple implementation of theRequestSlotMatchingStrategythat matches the pending requests in order as long as the resource profile can be fulfilled.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.jobmaster.slotpool.RequestSlotMatchingStrategy
RequestSlotMatchingStrategy.RequestSlotMatch
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<RequestSlotMatchingStrategy.RequestSlotMatch>matchRequestsAndSlots(Collection<? extends PhysicalSlot> slots, Collection<org.apache.flink.runtime.jobmaster.slotpool.PendingRequest> pendingRequests)Match the given slots with the given collection of pending requests.StringtoString()static SimpleRequestSlotMatchingStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static SimpleRequestSlotMatchingStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final SimpleRequestSlotMatchingStrategy INSTANCE
-
-
Method Detail
-
values
public static SimpleRequestSlotMatchingStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SimpleRequestSlotMatchingStrategy c : SimpleRequestSlotMatchingStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SimpleRequestSlotMatchingStrategy valueOf(String name)
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
public String toString()
- Overrides:
toStringin classEnum<SimpleRequestSlotMatchingStrategy>
-
-