public class DefaultSlotStatusSyncer extends Object implements SlotStatusSyncer
SlotStatusSyncer for fine-grained slot management.| 构造器和说明 |
|---|
DefaultSlotStatusSyncer(org.apache.flink.api.common.time.Time taskManagerRequestTimeout) |
| 限定符和类型 | 方法和说明 |
|---|---|
CompletableFuture<Void> |
allocateSlot(InstanceID instanceId,
org.apache.flink.api.common.JobID jobId,
String targetAddress,
ResourceProfile resourceProfile)
Allocate a slot from the task manager.
|
void |
close()
Close this syncer, clear all the state.
|
void |
freeSlot(AllocationID allocationId)
Free the given slot.
|
void |
initialize(org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerTracker taskManagerTracker,
ResourceTracker resourceTracker,
ResourceManagerId resourceManagerId,
Executor mainThreadExecutor)
Initialize this syncer.
|
boolean |
reportSlotStatus(InstanceID instanceId,
SlotReport slotReport)
Reconcile the slot status with the slot report.
|
public DefaultSlotStatusSyncer(org.apache.flink.api.common.time.Time taskManagerRequestTimeout)
public void initialize(org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerTracker taskManagerTracker,
ResourceTracker resourceTracker,
ResourceManagerId resourceManagerId,
Executor mainThreadExecutor)
SlotStatusSyncerinitialize 在接口中 SlotStatusSyncertaskManagerTracker - track the state of task managers and slotsresourceTracker - track the state of resource declarationresourceManagerId - for slot allocationmainThreadExecutor - to handle the request futurepublic void close()
SlotStatusSyncerclose 在接口中 SlotStatusSyncerpublic CompletableFuture<Void> allocateSlot(InstanceID instanceId, org.apache.flink.api.common.JobID jobId, String targetAddress, ResourceProfile resourceProfile)
SlotStatusSyncerallocateSlot 在接口中 SlotStatusSyncerinstanceId - of the task managerjobId - of the slottargetAddress - of the jobresourceProfile - of the slotCompletableFuture of the slot allocation, which will be completed
exceptionally if the allocation failspublic void freeSlot(AllocationID allocationId)
SlotStatusSyncerfreeSlot 在接口中 SlotStatusSyncerallocationId - of the given slot.public boolean reportSlotStatus(InstanceID instanceId, SlotReport slotReport)
SlotStatusSyncerreportSlotStatus 在接口中 SlotStatusSyncerinstanceId - of the task managerslotReport - reportedCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.