Class ResourceManagerPartitionTrackerImpl
java.lang.Object
org.apache.flink.runtime.io.network.partition.ResourceManagerPartitionTrackerImpl
- All Implemented Interfaces:
ResourceManagerPartitionTracker
public class ResourceManagerPartitionTrackerImpl
extends Object
implements ResourceManagerPartitionTracker
Default
ResourceManagerPartitionTracker implementation.
Internal tracking info must only be updated upon reception of a ClusterPartitionReport, as the task executor state is the source of truth.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceManagerPartitionTrackerImpl(TaskExecutorClusterPartitionReleaser taskExecutorClusterPartitionReleaser) -
Method Summary
Modifier and TypeMethodDescriptionReturns all the shuffle descriptors of cluster partitions for the intermediate dataset.Returns all data sets for which partitions are being tracked.voidprocessTaskExecutorClusterPartitionReport(ResourceID taskExecutorId, ClusterPartitionReport clusterPartitionReport) ProcessesClusterPartitionReportof a task executor.voidprocessTaskExecutorShutdown(ResourceID taskExecutorId) Processes the shutdown of task executor.releaseClusterPartitions(IntermediateDataSetID dataSetId) Issues a release calls to all task executors that are hosting partitions of the given data set.
-
Constructor Details
-
ResourceManagerPartitionTrackerImpl
public ResourceManagerPartitionTrackerImpl(TaskExecutorClusterPartitionReleaser taskExecutorClusterPartitionReleaser)
-
-
Method Details
-
processTaskExecutorClusterPartitionReport
public void processTaskExecutorClusterPartitionReport(ResourceID taskExecutorId, ClusterPartitionReport clusterPartitionReport) Description copied from interface:ResourceManagerPartitionTrackerProcessesClusterPartitionReportof a task executor. Updates the tracking information for the respective task executor. Any partition no longer being hosted on the task executor is considered lost, corrupting the corresponding data set. For any such data set this method issues partition release calls to all task executors that are hosting partitions of this data set.- Specified by:
processTaskExecutorClusterPartitionReportin interfaceResourceManagerPartitionTracker- Parameters:
taskExecutorId- origin of the reportclusterPartitionReport- partition report
-
processTaskExecutorShutdown
Description copied from interface:ResourceManagerPartitionTrackerProcesses the shutdown of task executor. Removes all tracking information for the given executor, determines datasets that may be corrupted by the shutdown (and implied loss of partitions). For any such data set this method issues partition release calls to all task executors that are hosting partitions of this data set, and issues release calls.- Specified by:
processTaskExecutorShutdownin interfaceResourceManagerPartitionTracker- Parameters:
taskExecutorId- task executor that shut down
-
releaseClusterPartitions
Description copied from interface:ResourceManagerPartitionTrackerIssues a release calls to all task executors that are hosting partitions of the given data set.- Specified by:
releaseClusterPartitionsin interfaceResourceManagerPartitionTracker- Parameters:
dataSetId- data set to release
-
getClusterPartitionShuffleDescriptors
public List<ShuffleDescriptor> getClusterPartitionShuffleDescriptors(IntermediateDataSetID dataSetID) Description copied from interface:ResourceManagerPartitionTrackerReturns all the shuffle descriptors of cluster partitions for the intermediate dataset.- Specified by:
getClusterPartitionShuffleDescriptorsin interfaceResourceManagerPartitionTracker- Parameters:
dataSetID- The id of the intermediate dataset.- Returns:
- the shuffle descriptors.
-
listDataSets
Description copied from interface:ResourceManagerPartitionTrackerReturns all data sets for which partitions are being tracked.- Specified by:
listDataSetsin interfaceResourceManagerPartitionTracker- Returns:
- tracked datasets
-