Class ResourceManagerPartitionTrackerImpl
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.ResourceManagerPartitionTrackerImpl
-
- All Implemented Interfaces:
ResourceManagerPartitionTracker
public class ResourceManagerPartitionTrackerImpl extends Object implements ResourceManagerPartitionTracker
DefaultResourceManagerPartitionTrackerimplementation.Internal tracking info must only be updated upon reception of a
ClusterPartitionReport, as the task executor state is the source of truth.
-
-
Constructor Summary
Constructors Constructor Description ResourceManagerPartitionTrackerImpl(TaskExecutorClusterPartitionReleaser taskExecutorClusterPartitionReleaser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ShuffleDescriptor>getClusterPartitionShuffleDescriptors(IntermediateDataSetID dataSetID)Returns all the shuffle descriptors of cluster partitions for the intermediate dataset.Map<IntermediateDataSetID,DataSetMetaInfo>listDataSets()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.CompletableFuture<Void>releaseClusterPartitions(IntermediateDataSetID dataSetId)Issues a release calls to all task executors that are hosting partitions of the given data set.
-
-
-
Constructor Detail
-
ResourceManagerPartitionTrackerImpl
public ResourceManagerPartitionTrackerImpl(TaskExecutorClusterPartitionReleaser taskExecutorClusterPartitionReleaser)
-
-
Method Detail
-
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
public void processTaskExecutorShutdown(ResourceID taskExecutorId)
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
public CompletableFuture<Void> releaseClusterPartitions(IntermediateDataSetID dataSetId)
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
public Map<IntermediateDataSetID,DataSetMetaInfo> listDataSets()
Description copied from interface:ResourceManagerPartitionTrackerReturns all data sets for which partitions are being tracked.- Specified by:
listDataSetsin interfaceResourceManagerPartitionTracker- Returns:
- tracked datasets
-
-