Class FineGrainedTaskManagerRegistration
- java.lang.Object
-
- org.apache.flink.runtime.resourcemanager.slotmanager.FineGrainedTaskManagerRegistration
-
- All Implemented Interfaces:
TaskManagerInfo
public class FineGrainedTaskManagerRegistration extends Object implements TaskManagerInfo
A FineGrainedTaskManagerRegistration represents a TaskManager. It maintains states of the TaskManager needed inFineGrainedSlotManager.
-
-
Constructor Summary
Constructors Constructor Description FineGrainedTaskManagerRegistration(TaskExecutorConnection taskManagerConnection, ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfreeSlot(AllocationID allocationId)Map<AllocationID,TaskManagerSlotInformation>getAllocatedSlots()Get allocated slots information.ResourceProfilegetAvailableResource()Get the available resource.intgetDefaultNumSlots()Get the default number of slots.ResourceProfilegetDefaultSlotResourceProfile()Get the default slot resource profile.longgetIdleSince()Get the timestamp when the last time becoming idle.InstanceIDgetInstanceId()Get the instanceId of this task manager.TaskExecutorConnectiongetTaskExecutorConnection()Get the taskExecutorConnection.ResourceProfilegetTotalResource()Get the total resource.booleanisIdle()Check whether this task manager is idle.voidnotifyAllocation(AllocationID allocationId, FineGrainedTaskManagerSlot taskManagerSlot)voidnotifyAllocationComplete(AllocationID allocationId)
-
-
-
Constructor Detail
-
FineGrainedTaskManagerRegistration
public FineGrainedTaskManagerRegistration(TaskExecutorConnection taskManagerConnection, ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile)
-
-
Method Detail
-
getTaskExecutorConnection
public TaskExecutorConnection getTaskExecutorConnection()
Description copied from interface:TaskManagerInfoGet the taskExecutorConnection.- Specified by:
getTaskExecutorConnectionin interfaceTaskManagerInfo- Returns:
- the taskExecutorConnection
-
getInstanceId
public InstanceID getInstanceId()
Description copied from interface:TaskManagerInfoGet the instanceId of this task manager.- Specified by:
getInstanceIdin interfaceTaskManagerInfo- Returns:
- the instanceId
-
getAllocatedSlots
public Map<AllocationID,TaskManagerSlotInformation> getAllocatedSlots()
Description copied from interface:TaskManagerInfoGet allocated slots information.- Specified by:
getAllocatedSlotsin interfaceTaskManagerInfo- Returns:
- allocated slots information mapped by its allocationId
-
getAvailableResource
public ResourceProfile getAvailableResource()
Description copied from interface:TaskManagerInfoGet the available resource.- Specified by:
getAvailableResourcein interfaceTaskManagerInfo- Returns:
- the available resource
-
getDefaultSlotResourceProfile
public ResourceProfile getDefaultSlotResourceProfile()
Description copied from interface:TaskManagerInfoGet the default slot resource profile.- Specified by:
getDefaultSlotResourceProfilein interfaceTaskManagerInfo- Returns:
- the default slot resource profile
-
getTotalResource
public ResourceProfile 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
public void freeSlot(AllocationID allocationId)
-
notifyAllocationComplete
public void notifyAllocationComplete(AllocationID allocationId)
-
notifyAllocation
public void notifyAllocation(AllocationID allocationId, FineGrainedTaskManagerSlot taskManagerSlot)
-
-