public interface AllocatedSlotPool
AllocatedSlots
.Modifier and Type | Interface and Description |
---|---|
static interface |
AllocatedSlotPool.AllocatedSlotsAndReservationStatus
A collection of
AllocatedSlots and their reservation status. |
static interface |
AllocatedSlotPool.FreeSlotInfo
Information about a free slot.
|
Modifier and Type | Method and Description |
---|---|
void |
addSlots(Collection<org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot> slots,
long currentTime)
Adds the given collection of slots to the slot pool.
|
boolean |
containsFreeSlot(AllocationID allocationId)
Checks whether the slot pool contains a slot with the given
AllocationID and if it is
free. |
boolean |
containsSlot(AllocationID allocationId)
Checks whether the slot pool contains a slot with the given allocationId.
|
boolean |
containsSlots(ResourceID owner)
Checks whether the slot pool contains at least one slot belonging to the specified owner.
|
Optional<org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot> |
freeReservedSlot(AllocationID allocationId,
long currentTime)
Frees the reserved slot, adding it back into the set of free slots.
|
Collection<? extends SlotInfo> |
getAllSlotsInformation()
Returns information about all slots in this pool.
|
FreeSlotInfoTracker |
getFreeSlotInfoTracker()
Returns information about all currently free slots.
|
Optional<SlotInfo> |
getSlotInformation(AllocationID allocationID)
Returns slot information specified by the given allocationId.
|
Optional<org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot> |
removeSlot(AllocationID allocationId)
Removes the slot with the given allocationId from the slot pool.
|
AllocatedSlotPool.AllocatedSlotsAndReservationStatus |
removeSlots(ResourceID owner)
Removes all slots belonging to the owning TaskExecutor identified by owner.
|
org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot |
reserveFreeSlot(AllocationID allocationId)
Reserves the free slot specified by the given allocationId.
|
void addSlots(Collection<org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot> slots, long currentTime)
slots
- slots to add to the slot poolcurrentTime
- currentTime when the slots have been added to the slot poolIllegalStateException
- if the slot pool already contains a to be added slotOptional<org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot> removeSlot(AllocationID allocationId)
allocationId
- allocationId identifying the slot to remove from the slot poolOptional.empty()
AllocatedSlotPool.AllocatedSlotsAndReservationStatus removeSlots(ResourceID owner)
owner
- owner identifies the TaskExecutor whose slots shall be removedboolean containsSlots(ResourceID owner)
owner
- owner for which to check whether the slot pool contains slotstrue
if the slot pool contains a slot from the given owner; otherwise false
boolean containsSlot(AllocationID allocationId)
allocationId
- allocationId identifying the slot for which to check whether it is
containedtrue
if the slot pool contains the slot with the given allocationId;
otherwise false
boolean containsFreeSlot(AllocationID allocationId)
AllocationID
and if it is
free.allocationId
- allocationId specifies the slot to check fortrue
if the slot pool contains a free slot registered under the given
allocation id; otherwise false
org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot reserveFreeSlot(AllocationID allocationId)
allocationId
- allocationId identifying the free slot to reserveAllocatedSlot
which has been reservedIllegalStateException
- if there is no free slot with the given allocationIdOptional<org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot> freeReservedSlot(AllocationID allocationId, long currentTime)
allocationId
- identifying the reserved slot to freedcurrentTime
- currentTime when the slot has been freedAllocatedSlot
if there was an allocated with the given
allocationId; otherwise Optional.empty()
.Optional<SlotInfo> getSlotInformation(AllocationID allocationID)
Optional.empty()
FreeSlotInfoTracker getFreeSlotInfoTracker()
Collection<? extends SlotInfo> getAllSlotsInformation()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.