Class FineGrainedTaskManagerTracker
java.lang.Object
org.apache.flink.runtime.resourcemanager.slotmanager.FineGrainedTaskManagerTracker
- All Implemented Interfaces:
ClusterResourceStatisticsProvider
Implementation of
TaskManagerTracker supporting fine-grained resource management.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPendingTaskManager(PendingTaskManager pendingTaskManager) voidaddTaskManager(TaskExecutorConnection taskExecutorConnection, ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile) voidaddUnWantedTaskManager(InstanceID instanceId) voidclear()voidclearPendingAllocationsOfJob(org.apache.flink.api.common.JobID jobId) getAllocatedOrPendingSlot(AllocationID allocationId) Get profile of total free resources.getFreeResourceOf(InstanceID instanceId) Get profile of free resources from the TaskManager with the given instance id.intGet total number of free slots.intgetNumberFreeSlotsOf(InstanceID instanceId) Get number of free slots from the TaskManager with the given instance id.intGet total number of registered slots.intgetNumberRegisteredSlotsOf(InstanceID instanceId) Get number of registered slots from the TaskManager with the given instance id.Get profile of total pending resources.getPendingTaskManagersByTotalAndDefaultSlotResourceProfile(ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile) Get profile of total registered resources.getRegisteredResourceOf(InstanceID instanceId) Get profile of registered resources from the TaskManager with the given instance id.getRegisteredTaskManager(InstanceID instanceId) Collection<? extends TaskManagerInfo>getTaskManagersWithAllocatedSlotsForJob(org.apache.flink.api.common.JobID jobId) voidnotifySlotStatus(AllocationID allocationId, org.apache.flink.api.common.JobID jobId, InstanceID instanceId, ResourceProfile resourceProfile, org.apache.flink.runtime.resourcemanager.slotmanager.SlotState slotState) Map<org.apache.flink.api.common.JobID,ResourceCounter> removePendingTaskManager(PendingTaskManagerId pendingTaskManagerId) voidremoveTaskManager(InstanceID instanceId) voidreplaceAllPendingAllocations(Map<PendingTaskManagerId, Map<org.apache.flink.api.common.JobID, ResourceCounter>> pendingSlotAllocations)
-
Constructor Details
-
FineGrainedTaskManagerTracker
public FineGrainedTaskManagerTracker()
-
-
Method Details
-
replaceAllPendingAllocations
public void replaceAllPendingAllocations(Map<PendingTaskManagerId, Map<org.apache.flink.api.common.JobID, ResourceCounter>> pendingSlotAllocations) -
clearPendingAllocationsOfJob
public void clearPendingAllocationsOfJob(org.apache.flink.api.common.JobID jobId) -
addTaskManager
public void addTaskManager(TaskExecutorConnection taskExecutorConnection, ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile) -
removeTaskManager
-
addUnWantedTaskManager
-
getUnWantedTaskManager
-
addPendingTaskManager
-
removePendingTaskManager
public Map<org.apache.flink.api.common.JobID,ResourceCounter> removePendingTaskManager(PendingTaskManagerId pendingTaskManagerId) -
getTaskManagersWithAllocatedSlotsForJob
public Collection<TaskManagerInfo> getTaskManagersWithAllocatedSlotsForJob(org.apache.flink.api.common.JobID jobId) -
notifySlotStatus
public void notifySlotStatus(AllocationID allocationId, org.apache.flink.api.common.JobID jobId, InstanceID instanceId, ResourceProfile resourceProfile, org.apache.flink.runtime.resourcemanager.slotmanager.SlotState slotState) -
getRegisteredTaskManagers
-
getRegisteredTaskManager
-
getAllocatedOrPendingSlot
-
getPendingTaskManagers
-
getPendingTaskManagersByTotalAndDefaultSlotResourceProfile
public Collection<PendingTaskManager> getPendingTaskManagersByTotalAndDefaultSlotResourceProfile(ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile) -
getNumberRegisteredSlots
public int getNumberRegisteredSlots()Description copied from interface:ClusterResourceStatisticsProviderGet total number of registered slots.- Specified by:
getNumberRegisteredSlotsin interfaceClusterResourceStatisticsProvider
-
getNumberRegisteredSlotsOf
Description copied from interface:ClusterResourceStatisticsProviderGet number of registered slots from the TaskManager with the given instance id.- Specified by:
getNumberRegisteredSlotsOfin interfaceClusterResourceStatisticsProvider
-
getNumberFreeSlots
public int getNumberFreeSlots()Description copied from interface:ClusterResourceStatisticsProviderGet total number of free slots.- Specified by:
getNumberFreeSlotsin interfaceClusterResourceStatisticsProvider
-
getNumberFreeSlotsOf
Description copied from interface:ClusterResourceStatisticsProviderGet number of free slots from the TaskManager with the given instance id.- Specified by:
getNumberFreeSlotsOfin interfaceClusterResourceStatisticsProvider
-
getRegisteredResource
Description copied from interface:ClusterResourceStatisticsProviderGet profile of total registered resources.- Specified by:
getRegisteredResourcein interfaceClusterResourceStatisticsProvider
-
getRegisteredResourceOf
Description copied from interface:ClusterResourceStatisticsProviderGet profile of registered resources from the TaskManager with the given instance id.- Specified by:
getRegisteredResourceOfin interfaceClusterResourceStatisticsProvider
-
getFreeResource
Description copied from interface:ClusterResourceStatisticsProviderGet profile of total free resources.- Specified by:
getFreeResourcein interfaceClusterResourceStatisticsProvider
-
getFreeResourceOf
Description copied from interface:ClusterResourceStatisticsProviderGet profile of free resources from the TaskManager with the given instance id.- Specified by:
getFreeResourceOfin interfaceClusterResourceStatisticsProvider
-
getPendingResource
Description copied from interface:ClusterResourceStatisticsProviderGet profile of total pending resources.- Specified by:
getPendingResourcein interfaceClusterResourceStatisticsProvider
-
clear
public void clear()
-