public class DefaultAllocatedSlotPool extends Object implements AllocatedSlotPool
AllocatedSlotPool implementation.AllocatedSlotPool.AllocatedSlotsAndReservationStatus, AllocatedSlotPool.FreeSlotInfo| 构造器和说明 |
|---|
DefaultAllocatedSlotPool() |
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
Collection<AllocatedSlotPool.FreeSlotInfo> |
getFreeSlotsInformation()
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.
|
public void addSlots(Collection<org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot> slots, long currentTime)
AllocatedSlotPooladdSlots 在接口中 AllocatedSlotPoolslots - slots to add to the slot poolcurrentTime - currentTime when the slots have been added to the slot poolpublic Optional<org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot> removeSlot(AllocationID allocationId)
AllocatedSlotPoolremoveSlot 在接口中 AllocatedSlotPoolallocationId - allocationId identifying the slot to remove from the slot poolOptional.empty()public AllocatedSlotPool.AllocatedSlotsAndReservationStatus removeSlots(ResourceID owner)
AllocatedSlotPoolremoveSlots 在接口中 AllocatedSlotPoolowner - owner identifies the TaskExecutor whose slots shall be removedpublic boolean containsSlots(ResourceID owner)
AllocatedSlotPoolcontainsSlots 在接口中 AllocatedSlotPoolowner - owner for which to check whether the slot pool contains slotstrue if the slot pool contains a slot from the given owner; otherwise falsepublic boolean containsSlot(AllocationID allocationId)
AllocatedSlotPoolcontainsSlot 在接口中 AllocatedSlotPoolallocationId - allocationId identifying the slot for which to check whether it is
containedtrue if the slot pool contains the slot with the given allocationId;
otherwise falsepublic boolean containsFreeSlot(AllocationID allocationId)
AllocatedSlotPoolAllocationID and if it is
free.containsFreeSlot 在接口中 AllocatedSlotPoolallocationId - allocationId specifies the slot to check fortrue if the slot pool contains a free slot registered under the given
allocation id; otherwise falsepublic org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot reserveFreeSlot(AllocationID allocationId)
AllocatedSlotPoolreserveFreeSlot 在接口中 AllocatedSlotPoolallocationId - allocationId identifying the free slot to reserveAllocatedSlot which has been reservedpublic Optional<org.apache.flink.runtime.jobmaster.slotpool.AllocatedSlot> freeReservedSlot(AllocationID allocationId, long currentTime)
AllocatedSlotPoolfreeReservedSlot 在接口中 AllocatedSlotPoolallocationId - 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().public Optional<SlotInfo> getSlotInformation(AllocationID allocationID)
AllocatedSlotPoolgetSlotInformation 在接口中 AllocatedSlotPoolOptional.empty()public Collection<AllocatedSlotPool.FreeSlotInfo> getFreeSlotsInformation()
AllocatedSlotPoolgetFreeSlotsInformation 在接口中 AllocatedSlotPoolpublic Collection<? extends SlotInfo> getAllSlotsInformation()
AllocatedSlotPoolgetAllSlotsInformation 在接口中 AllocatedSlotPoolCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.