public class DefaultSlotTracker extends Object
| 构造器和说明 |
|---|
DefaultSlotTracker() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addSlot(SlotID slotId,
ResourceProfile resourceProfile,
TaskExecutorConnection taskManagerConnection,
org.apache.flink.api.common.JobID assignedJob)
Adds the given slot to this tracker.
|
Collection<TaskManagerSlotInformation> |
getFreeSlots()
Returns a view over free slots.
|
Collection<TaskExecutorConnection> |
getTaskExecutorsWithAllocatedSlotsForJob(org.apache.flink.api.common.JobID jobId)
Returns all task executors that have at least 1 pending/completed allocation for the given
job.
|
void |
notifyAllocationComplete(SlotID slotId,
org.apache.flink.api.common.JobID jobId)
Notifies the tracker that the allocation for the given slot, for the given job, has completed
successfully.
|
void |
notifyAllocationStart(SlotID slotId,
org.apache.flink.api.common.JobID jobId)
Notifies the tracker that the allocation for the given slot, for the given job, has started.
|
void |
notifyFree(SlotID slotId)
Notifies the tracker that the given slot was freed.
|
boolean |
notifySlotStatus(Iterable<SlotStatus> slotStatuses)
Notifies the tracker about the slot statuses.
|
void |
registerSlotStatusUpdateListener(org.apache.flink.runtime.resourcemanager.slotmanager.SlotStatusUpdateListener slotStatusUpdateListener)
Registers the given listener with this tracker.
|
void |
removeSlots(Iterable<SlotID> slotsToRemove)
Removes the given set of slots from the slot manager.
|
public void registerSlotStatusUpdateListener(org.apache.flink.runtime.resourcemanager.slotmanager.SlotStatusUpdateListener slotStatusUpdateListener)
slotStatusUpdateListener - listener to registerpublic void addSlot(SlotID slotId, ResourceProfile resourceProfile, TaskExecutorConnection taskManagerConnection, @Nullable org.apache.flink.api.common.JobID assignedJob)
slotId - ID of the slotresourceProfile - resource of the slottaskManagerConnection - connection to the hosting task executorassignedJob - job that the slot is allocated for, or null if it is freepublic void removeSlots(Iterable<SlotID> slotsToRemove)
slotsToRemove - identifying the slots to remove from the slot managerpublic void notifyFree(SlotID slotId)
slotId - slot being freedpublic void notifyAllocationStart(SlotID slotId, org.apache.flink.api.common.JobID jobId)
slotId - slot being allocatedjobId - job for which the slot is being allocatedpublic void notifyAllocationComplete(SlotID slotId, org.apache.flink.api.common.JobID jobId)
slotId - slot being allocatedjobId - job for which the slot is being allocatedpublic boolean notifySlotStatus(Iterable<SlotStatus> slotStatuses)
slotStatuses - slot statuespublic Collection<TaskManagerSlotInformation> getFreeSlots()
public Collection<TaskExecutorConnection> getTaskExecutorsWithAllocatedSlotsForJob(org.apache.flink.api.common.JobID jobId)
jobId - the job for which the task executors must have a slotCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.