public interface SlotStatusSyncer
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
allocateSlot(InstanceID instanceId,
JobID jobId,
String targetAddress,
ResourceProfile resourceProfile)
Allocate a slot from the task manager.
|
void |
close()
Close this syncer, clear all the state.
|
void |
freeInactiveSlots(JobID jobId)
Frees all currently inactive slot allocated for the given job.
|
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.
|
void initialize(org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerTracker taskManagerTracker, ResourceTracker resourceTracker, ResourceManagerId resourceManagerId, Executor mainThreadExecutor)
taskManagerTracker
- track the state of task managers and slotsresourceTracker
- track the state of resource declarationresourceManagerId
- for slot allocationmainThreadExecutor
- to handle the request futurevoid close()
CompletableFuture<Void> allocateSlot(InstanceID instanceId, JobID jobId, String targetAddress, ResourceProfile resourceProfile)
instanceId
- 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 failsvoid freeSlot(AllocationID allocationId)
allocationId
- of the given slot.boolean reportSlotStatus(InstanceID instanceId, SlotReport slotReport)
instanceId
- of the task managerslotReport
- reportedvoid freeInactiveSlots(JobID jobId)
jobId
- of the jobCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.