Class JobMasterPartitionTrackerImpl
- java.lang.Object
-
- org.apache.flink.runtime.io.network.partition.AbstractPartitionTracker<ResourceID,ResultPartitionDeploymentDescriptor>
-
- org.apache.flink.runtime.io.network.partition.JobMasterPartitionTrackerImpl
-
- All Implemented Interfaces:
JobMasterPartitionTracker
,PartitionTracker<ResourceID,ResultPartitionDeploymentDescriptor>
public class JobMasterPartitionTrackerImpl extends AbstractPartitionTracker<ResourceID,ResultPartitionDeploymentDescriptor> implements JobMasterPartitionTracker
Utility for tracking partitions and issuing release calls to task executors and shuffle masters.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.runtime.io.network.partition.AbstractPartitionTracker
partitionInfos, partitionTable
-
-
Constructor Summary
Constructors Constructor Description JobMasterPartitionTrackerImpl(JobID jobId, ShuffleMaster<?> shuffleMaster, PartitionTrackerFactory.TaskExecutorGatewayLookup taskExecutorGatewayLookup)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connectToResourceManager(ResourceManagerGateway resourceManagerGateway)
Collection<ResultPartitionDeploymentDescriptor>
getAllTrackedPartitions()
Gets all the partitions under tracking.List<ShuffleDescriptor>
getClusterPartitionShuffleDescriptors(IntermediateDataSetID intermediateDataSetID)
Get the shuffle descriptors of the cluster partitions ordered by partition number.void
startTrackingPartition(ResourceID producingTaskExecutorId, ResultPartitionDeploymentDescriptor resultPartitionDeploymentDescriptor)
Starts the tracking of the given partition for the given task executor ID.CompletableFuture<Void>
stopTrackingAndPromotePartitions(Collection<ResultPartitionID> resultPartitionIds)
Promotes the given partitions, and stops the tracking of partitions that were promoted.void
stopTrackingAndReleasePartitions(Collection<ResultPartitionID> resultPartitionIds, boolean releaseOnShuffleMaster)
Releases the given partitions and stop the tracking of partitions that were released.-
Methods inherited from class org.apache.flink.runtime.io.network.partition.AbstractPartitionTracker
isPartitionTracked, isTrackingPartitionsFor, stopTrackingPartitions, stopTrackingPartitionsFor
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.runtime.io.network.partition.JobMasterPartitionTracker
getAllTrackedClusterPartitions, getAllTrackedNonClusterPartitions, stopTrackingAndReleasePartitions
-
Methods inherited from interface org.apache.flink.runtime.io.network.partition.PartitionTracker
isPartitionTracked, isTrackingPartitionsFor, stopTrackingPartitions, stopTrackingPartitionsFor
-
-
-
-
Constructor Detail
-
JobMasterPartitionTrackerImpl
public JobMasterPartitionTrackerImpl(JobID jobId, ShuffleMaster<?> shuffleMaster, PartitionTrackerFactory.TaskExecutorGatewayLookup taskExecutorGatewayLookup)
-
-
Method Detail
-
startTrackingPartition
public void startTrackingPartition(ResourceID producingTaskExecutorId, ResultPartitionDeploymentDescriptor resultPartitionDeploymentDescriptor)
Description copied from interface:JobMasterPartitionTracker
Starts the tracking of the given partition for the given task executor ID.- Specified by:
startTrackingPartition
in interfaceJobMasterPartitionTracker
- Parameters:
producingTaskExecutorId
- ID of task executor on which the partition is producedresultPartitionDeploymentDescriptor
- deployment descriptor of the partition
-
stopTrackingAndReleasePartitions
public void stopTrackingAndReleasePartitions(Collection<ResultPartitionID> resultPartitionIds, boolean releaseOnShuffleMaster)
Description copied from interface:JobMasterPartitionTracker
Releases the given partitions and stop the tracking of partitions that were released. The boolean flag indicates whether we need to notify the ShuffleMaster to release all external resources or not.- Specified by:
stopTrackingAndReleasePartitions
in interfaceJobMasterPartitionTracker
-
stopTrackingAndPromotePartitions
public CompletableFuture<Void> stopTrackingAndPromotePartitions(Collection<ResultPartitionID> resultPartitionIds)
Description copied from interface:JobMasterPartitionTracker
Promotes the given partitions, and stops the tracking of partitions that were promoted.- Specified by:
stopTrackingAndPromotePartitions
in interfaceJobMasterPartitionTracker
- Parameters:
resultPartitionIds
- ID of the partition containing both job partitions and cluster partitions.- Returns:
- Future that will be completed if the partitions are promoted.
-
getAllTrackedPartitions
public Collection<ResultPartitionDeploymentDescriptor> getAllTrackedPartitions()
Description copied from interface:JobMasterPartitionTracker
Gets all the partitions under tracking.- Specified by:
getAllTrackedPartitions
in interfaceJobMasterPartitionTracker
-
connectToResourceManager
public void connectToResourceManager(ResourceManagerGateway resourceManagerGateway)
- Specified by:
connectToResourceManager
in interfaceJobMasterPartitionTracker
-
getClusterPartitionShuffleDescriptors
public List<ShuffleDescriptor> getClusterPartitionShuffleDescriptors(IntermediateDataSetID intermediateDataSetID)
Description copied from interface:JobMasterPartitionTracker
Get the shuffle descriptors of the cluster partitions ordered by partition number.- Specified by:
getClusterPartitionShuffleDescriptors
in interfaceJobMasterPartitionTracker
-
-