Class PreviousAllocationSlotSelectionStrategy
- java.lang.Object
-
- org.apache.flink.runtime.jobmaster.slotpool.PreviousAllocationSlotSelectionStrategy
-
- All Implemented Interfaces:
SlotSelectionStrategy
public class PreviousAllocationSlotSelectionStrategy extends Object implements SlotSelectionStrategy
This class implements aSlotSelectionStrategythat is based on previous allocations and falls back to using location preference hints if there is no previous allocation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.runtime.jobmaster.slotpool.SlotSelectionStrategy
SlotSelectionStrategy.SlotInfoAndLocality
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PreviousAllocationSlotSelectionStrategycreate()static PreviousAllocationSlotSelectionStrategycreate(SlotSelectionStrategy fallbackSlotSelectionStrategy)Optional<SlotSelectionStrategy.SlotInfoAndLocality>selectBestSlotForProfile(FreeSlotTracker freeSlotTracker, SlotProfile slotProfile)Selects the bestSlotInfow.r.t. a certain selection criterion from the provided list of available slots and considering the givenSlotProfilethat describes the requirements.
-
-
-
Method Detail
-
selectBestSlotForProfile
public Optional<SlotSelectionStrategy.SlotInfoAndLocality> selectBestSlotForProfile(@Nonnull FreeSlotTracker freeSlotTracker, @Nonnull SlotProfile slotProfile)
Description copied from interface:SlotSelectionStrategySelects the bestSlotInfow.r.t. a certain selection criterion from the provided list of available slots and considering the givenSlotProfilethat describes the requirements.- Specified by:
selectBestSlotForProfilein interfaceSlotSelectionStrategy- Parameters:
freeSlotTracker- a list of the available slots together with their remaining resources to select from.slotProfile- a slot profile, describing requirements for the slot selection.- Returns:
- the selected slot info with the corresponding locality hint.
-
create
public static PreviousAllocationSlotSelectionStrategy create()
-
create
public static PreviousAllocationSlotSelectionStrategy create(SlotSelectionStrategy fallbackSlotSelectionStrategy)
-
-