public class PreviousAllocationSlotSelectionStrategy extends Object implements SlotSelectionStrategy
SlotSelectionStrategy
that is based on previous allocations and
falls back to using location preference hints if there is no previous allocation.SlotSelectionStrategy.SlotInfoAndLocality
Modifier and Type | Method and Description |
---|---|
static PreviousAllocationSlotSelectionStrategy |
create() |
static PreviousAllocationSlotSelectionStrategy |
create(SlotSelectionStrategy fallbackSlotSelectionStrategy) |
Optional<SlotSelectionStrategy.SlotInfoAndLocality> |
selectBestSlotForProfile(FreeSlotInfoTracker freeSlotInfoTracker,
SlotProfile slotProfile)
Selects the best
SlotInfo w.r.t. a certain selection criterion from the provided list
of available slots and considering the given SlotProfile that describes the
requirements. |
public Optional<SlotSelectionStrategy.SlotInfoAndLocality> selectBestSlotForProfile(@Nonnull FreeSlotInfoTracker freeSlotInfoTracker, @Nonnull SlotProfile slotProfile)
SlotSelectionStrategy
SlotInfo
w.r.t. a certain selection criterion from the provided list
of available slots and considering the given SlotProfile
that describes the
requirements.selectBestSlotForProfile
in interface SlotSelectionStrategy
freeSlotInfoTracker
- a list of the available slots together with their remaining
resources to select from.slotProfile
- a slot profile, describing requirements for the slot selection.public static PreviousAllocationSlotSelectionStrategy create()
public static PreviousAllocationSlotSelectionStrategy create(SlotSelectionStrategy fallbackSlotSelectionStrategy)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.