public class FineGrainedSlotManager extends Object implements SlotManager
SlotManager supporting fine-grained resource management.| 构造器和说明 |
|---|
FineGrainedSlotManager(org.apache.flink.util.concurrent.ScheduledExecutor scheduledExecutor,
SlotManagerConfiguration slotManagerConfiguration,
SlotManagerMetricGroup slotManagerMetricGroup,
ResourceTracker resourceTracker,
org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerTracker taskManagerTracker,
SlotStatusSyncer slotStatusSyncer,
ResourceAllocationStrategy resourceAllocationStrategy,
org.apache.flink.api.common.time.Time requirementCheckDelay) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearResourceRequirements(org.apache.flink.api.common.JobID jobId)
Notifies the slot manager that the resource requirements for the given job should be cleared.
|
void |
close()
Closes the slot manager.
|
void |
freeSlot(SlotID slotId,
AllocationID allocationId)
Free the given slot from the given allocation.
|
Collection<SlotInfo> |
getAllocatedSlotsOf(InstanceID instanceID) |
ResourceProfile |
getFreeResource() |
ResourceProfile |
getFreeResourceOf(InstanceID instanceID) |
int |
getNumberFreeSlots() |
int |
getNumberFreeSlotsOf(InstanceID instanceId) |
int |
getNumberRegisteredSlots() |
int |
getNumberRegisteredSlotsOf(InstanceID instanceId) |
ResourceProfile |
getRegisteredResource() |
ResourceProfile |
getRegisteredResourceOf(InstanceID instanceID) |
Map<WorkerResourceSpec,Integer> |
getRequiredResources()
Get number of workers SlotManager requested from
ResourceActions that are not yet
fulfilled. |
long |
getTaskManagerIdleSince(InstanceID instanceId) |
void |
processResourceRequirements(ResourceRequirements resourceRequirements)
Notifies the slot manager about the resource requirements of a job.
|
boolean |
registerTaskManager(TaskExecutorConnection taskExecutorConnection,
SlotReport initialSlotReport,
ResourceProfile totalResourceProfile,
ResourceProfile defaultSlotResourceProfile)
Registers a new task manager at the slot manager.
|
boolean |
reportSlotStatus(InstanceID instanceId,
SlotReport slotReport)
Reports the current slot allocations for a task manager identified by the given instance id.
|
void |
setFailUnfulfillableRequest(boolean failUnfulfillableRequest) |
void |
start(ResourceManagerId newResourceManagerId,
Executor newMainThreadExecutor,
ResourceActions newResourceActions)
Starts the slot manager with the given leader id and resource manager actions.
|
void |
suspend()
Suspends the component.
|
boolean |
unregisterTaskManager(InstanceID instanceId,
Exception cause)
Unregisters the task manager identified by the given instance id and its associated slots
from the slot manager.
|
public FineGrainedSlotManager(org.apache.flink.util.concurrent.ScheduledExecutor scheduledExecutor,
SlotManagerConfiguration slotManagerConfiguration,
SlotManagerMetricGroup slotManagerMetricGroup,
ResourceTracker resourceTracker,
org.apache.flink.runtime.resourcemanager.slotmanager.TaskManagerTracker taskManagerTracker,
SlotStatusSyncer slotStatusSyncer,
ResourceAllocationStrategy resourceAllocationStrategy,
org.apache.flink.api.common.time.Time requirementCheckDelay)
public void setFailUnfulfillableRequest(boolean failUnfulfillableRequest)
setFailUnfulfillableRequest 在接口中 SlotManagerpublic void start(ResourceManagerId newResourceManagerId, Executor newMainThreadExecutor, ResourceActions newResourceActions)
start 在接口中 SlotManagernewResourceManagerId - to use for communication with the task managersnewMainThreadExecutor - to use to run code in the ResourceManager's main threadnewResourceActions - to use for resource (de-)allocationspublic void suspend()
suspend 在接口中 SlotManagerpublic void close()
throws Exception
close 在接口中 AutoCloseableException - if the close operation failspublic void clearResourceRequirements(org.apache.flink.api.common.JobID jobId)
SlotManagerclearResourceRequirements 在接口中 SlotManagerjobId - job for which to clear the requirementspublic void processResourceRequirements(ResourceRequirements resourceRequirements)
SlotManagerprocessResourceRequirements 在接口中 SlotManagerresourceRequirements - resource requirements of a jobpublic boolean registerTaskManager(TaskExecutorConnection taskExecutorConnection, SlotReport initialSlotReport, ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile)
registerTaskManager 在接口中 SlotManagertaskExecutorConnection - for the new task managerinitialSlotReport - for the new task managertotalResourceProfile - of the new task managerdefaultSlotResourceProfile - of the new task managerpublic boolean unregisterTaskManager(InstanceID instanceId, Exception cause)
SlotManagerunregisterTaskManager 在接口中 SlotManagerinstanceId - identifying the task manager to unregistercause - for unregistering the TaskManagerpublic boolean reportSlotStatus(InstanceID instanceId, SlotReport slotReport)
reportSlotStatus 在接口中 SlotManagerinstanceId - identifying the task manager for which to report the slot statusslotReport - containing the status for all of its slotspublic void freeSlot(SlotID slotId, AllocationID allocationId)
freeSlot 在接口中 SlotManagerslotId - identifying the slot to free, will be ignoredallocationId - with which the slot is presumably allocatedpublic int getNumberRegisteredSlots()
getNumberRegisteredSlots 在接口中 SlotManagerpublic int getNumberRegisteredSlotsOf(InstanceID instanceId)
getNumberRegisteredSlotsOf 在接口中 SlotManagerpublic int getNumberFreeSlots()
getNumberFreeSlots 在接口中 SlotManagerpublic int getNumberFreeSlotsOf(InstanceID instanceId)
getNumberFreeSlotsOf 在接口中 SlotManagerpublic Map<WorkerResourceSpec,Integer> getRequiredResources()
SlotManagerResourceActions that are not yet
fulfilled.getRequiredResources 在接口中 SlotManagerpublic ResourceProfile getRegisteredResource()
getRegisteredResource 在接口中 SlotManagerpublic ResourceProfile getRegisteredResourceOf(InstanceID instanceID)
getRegisteredResourceOf 在接口中 SlotManagerpublic ResourceProfile getFreeResource()
getFreeResource 在接口中 SlotManagerpublic ResourceProfile getFreeResourceOf(InstanceID instanceID)
getFreeResourceOf 在接口中 SlotManagerpublic Collection<SlotInfo> getAllocatedSlotsOf(InstanceID instanceID)
getAllocatedSlotsOf 在接口中 SlotManager@VisibleForTesting public long getTaskManagerIdleSince(InstanceID instanceId)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.