Class FineGrainedTaskManagerRegistration
java.lang.Object
org.apache.flink.runtime.resourcemanager.slotmanager.FineGrainedTaskManagerRegistration
- All Implemented Interfaces:
TaskManagerInfo
A FineGrainedTaskManagerRegistration represents a TaskManager. It maintains states of the
TaskManager needed in
FineGrainedSlotManager.-
Constructor Summary
ConstructorsConstructorDescriptionFineGrainedTaskManagerRegistration(TaskExecutorConnection taskManagerConnection, ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile) -
Method Summary
Modifier and TypeMethodDescriptionvoidfreeSlot(AllocationID allocationId) Get allocated slots information.Get the available resource.intGet the default number of slots.Get the default slot resource profile.longGet the timestamp when the last time becoming idle.Get the instanceId of this task manager.Get the taskExecutorConnection.Get the total resource.booleanisIdle()Check whether this task manager is idle.voidnotifyAllocation(AllocationID allocationId, FineGrainedTaskManagerSlot taskManagerSlot) voidnotifyAllocationComplete(AllocationID allocationId)
-
Constructor Details
-
FineGrainedTaskManagerRegistration
public FineGrainedTaskManagerRegistration(TaskExecutorConnection taskManagerConnection, ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile)
-
-
Method Details
-
getTaskExecutorConnection
Description copied from interface:TaskManagerInfoGet the taskExecutorConnection.- Specified by:
getTaskExecutorConnectionin interfaceTaskManagerInfo- Returns:
- the taskExecutorConnection
-
getInstanceId
Description copied from interface:TaskManagerInfoGet the instanceId of this task manager.- Specified by:
getInstanceIdin interfaceTaskManagerInfo- Returns:
- the instanceId
-
getAllocatedSlots
Description copied from interface:TaskManagerInfoGet allocated slots information.- Specified by:
getAllocatedSlotsin interfaceTaskManagerInfo- Returns:
- allocated slots information mapped by its allocationId
-
getAvailableResource
Description copied from interface:TaskManagerInfoGet the available resource.- Specified by:
getAvailableResourcein interfaceTaskManagerInfo- Returns:
- the available resource
-
getDefaultSlotResourceProfile
Description copied from interface:TaskManagerInfoGet the default slot resource profile.- Specified by:
getDefaultSlotResourceProfilein interfaceTaskManagerInfo- Returns:
- the default slot resource profile
-
getTotalResource
Description copied from interface:TaskManagerInfoGet the total resource.- Specified by:
getTotalResourcein interfaceTaskManagerInfo- Returns:
- the total resource
-
getDefaultNumSlots
public int getDefaultNumSlots()Description copied from interface:TaskManagerInfoGet the default number of slots.- Specified by:
getDefaultNumSlotsin interfaceTaskManagerInfo- Returns:
- the default number of slots
-
getIdleSince
public long getIdleSince()Description copied from interface:TaskManagerInfoGet the timestamp when the last time becoming idle.- Specified by:
getIdleSincein interfaceTaskManagerInfo- Returns:
- the timestamp when the last time becoming idle
-
isIdle
public boolean isIdle()Description copied from interface:TaskManagerInfoCheck whether this task manager is idle.- Specified by:
isIdlein interfaceTaskManagerInfo- Returns:
- whether this task manager is idle
-
freeSlot
-
notifyAllocationComplete
-
notifyAllocation
-