Package org.apache.flink.runtime.shuffle
Interface JobShuffleContext
-
- All Known Implementing Classes:
JobShuffleContextImpl
public interface JobShuffleContext
Job level shuffle context which can offer some job information like job ID and through it, the shuffle plugin notify the job to stop tracking the lost result partitions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JobID
getJobId()
CompletableFuture<Collection<PartitionWithMetrics>>
getPartitionWithMetrics(Duration timeout, Set<ResultPartitionID> expectedPartitions)
Retrieves specified partitions and their metrics (identified byexpectedPartitions
), the metrics include sizes of sub-partitions in a result partition.void
notifyPartitionRecoveryStarted()
Notifies that the recovery process of result partitions has started.CompletableFuture<?>
stopTrackingAndReleasePartitions(Collection<ResultPartitionID> partitionIds)
Notifies the job to stop tracking and release the target result partitions, which means these partitions will be removed and will be reproduced if used afterwards.
-
-
-
Method Detail
-
stopTrackingAndReleasePartitions
CompletableFuture<?> stopTrackingAndReleasePartitions(Collection<ResultPartitionID> partitionIds)
Notifies the job to stop tracking and release the target result partitions, which means these partitions will be removed and will be reproduced if used afterwards.
-
getPartitionWithMetrics
CompletableFuture<Collection<PartitionWithMetrics>> getPartitionWithMetrics(Duration timeout, Set<ResultPartitionID> expectedPartitions)
Retrieves specified partitions and their metrics (identified byexpectedPartitions
), the metrics include sizes of sub-partitions in a result partition.- Parameters:
timeout
- The timeout used for retrieve the specified partitions.expectedPartitions
- The set of identifiers for the result partitions whose metrics are to be fetched.- Returns:
- A future will contain a collection of the partitions with their metrics that could be retrieved from the expected partitions within the specified timeout period.
-
notifyPartitionRecoveryStarted
void notifyPartitionRecoveryStarted()
Notifies that the recovery process of result partitions has started.
-
-