public class BlocklistDeclarativeSlotPool extends DefaultDeclarativeSlotPool
DeclarativeSlotPool implementation that supports blocklist. This implementation will
avoid allocating slots that located on blocked nodes. The core idea is to keep the slot pool in
such a state: there is no slot in slot pool that is free (no task assigned) and located on
blocked nodes.DeclarativeSlotPool.NewSlotsListener, DeclarativeSlotPool.NoOpNewSlotsListenerlog, slotPool| 限定符和类型 | 方法和说明 |
|---|---|
ResourceCounter |
freeReservedSlot(AllocationID allocationId,
Throwable cause,
long currentTime)
Frees the reserved slot identified by the given allocationId.
|
Collection<SlotOffer> |
offerSlots(Collection<? extends SlotOffer> offers,
TaskManagerLocation taskManagerLocation,
TaskManagerGateway taskManagerGateway,
long currentTime)
Offers slots to this slot pool.
|
Collection<SlotOffer> |
registerSlots(Collection<? extends SlotOffer> slots,
TaskManagerLocation taskManagerLocation,
TaskManagerGateway taskManagerGateway,
long currentTime)
Registers the given set of slots at the slot pool.
|
containsFreeSlot, containsSlots, decreaseResourceRequirementsBy, getAllSlotsInformation, getFreeSlotsInformation, getResourceRequirements, increaseResourceRequirementsBy, registerNewSlotsListener, releaseIdleSlots, releaseSlot, releaseSlots, reserveFreeSlot, setResourceRequirementspublic Collection<SlotOffer> offerSlots(Collection<? extends SlotOffer> offers, TaskManagerLocation taskManagerLocation, TaskManagerGateway taskManagerGateway, long currentTime)
DeclarativeSlotPoolofferSlots 在接口中 DeclarativeSlotPoolofferSlots 在类中 DefaultDeclarativeSlotPooloffers - offers containing the list of slots offered to this slot pooltaskManagerLocation - taskManagerLocation is the location of the offering TaskExecutortaskManagerGateway - taskManagerGateway is the gateway to talk to the offering
TaskExecutorcurrentTime - currentTime is the time the slots are being offeredpublic Collection<SlotOffer> registerSlots(Collection<? extends SlotOffer> slots, TaskManagerLocation taskManagerLocation, TaskManagerGateway taskManagerGateway, long currentTime)
DeclarativeSlotPoolThe difference from DeclarativeSlotPool.offerSlots(java.util.Collection<? extends org.apache.flink.runtime.taskexecutor.slot.SlotOffer>, org.apache.flink.runtime.taskmanager.TaskManagerLocation, org.apache.flink.runtime.jobmanager.slots.TaskManagerGateway, long) is that this method allows accepting slots which
exceed the currently required, but the DeclarativeSlotPool.offerSlots(java.util.Collection<? extends org.apache.flink.runtime.taskexecutor.slot.SlotOffer>, org.apache.flink.runtime.taskmanager.TaskManagerLocation, org.apache.flink.runtime.jobmanager.slots.TaskManagerGateway, long) only accepts those slots that are
currently required.
registerSlots 在接口中 DeclarativeSlotPoolregisterSlots 在类中 DefaultDeclarativeSlotPoolslots - slots to registertaskManagerLocation - taskManagerLocation is the location of the offering TaskExecutortaskManagerGateway - taskManagerGateway is the gateway to talk to the offering
TaskExecutorcurrentTime - currentTime is the time the slots are being offeredpublic ResourceCounter freeReservedSlot(AllocationID allocationId, @Nullable Throwable cause, long currentTime)
DeclarativeSlotPoolWhether the freed slot is returned to the owning TaskExecutor is implementation dependent.
freeReservedSlot 在接口中 DeclarativeSlotPoolfreeReservedSlot 在类中 DefaultDeclarativeSlotPoolallocationId - allocationId identifying the slot to releasecause - cause for releasing the slot; can be nullcurrentTime - currentTime when the slot was releasedCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.