Package org.apache.flink.runtime.shuffle
Class JobShuffleContextImpl
java.lang.Object
org.apache.flink.runtime.shuffle.JobShuffleContextImpl
- All Implemented Interfaces:
JobShuffleContext
The default implementation of
JobShuffleContext.-
Constructor Summary
ConstructorsConstructorDescriptionJobShuffleContextImpl(org.apache.flink.api.common.JobID jobId, JobMasterGateway jobMasterGateway) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.api.common.JobIDgetJobId()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.voidNotifies that the recovery process of result partitions has started.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.
-
Constructor Details
-
JobShuffleContextImpl
public JobShuffleContextImpl(org.apache.flink.api.common.JobID jobId, JobMasterGateway jobMasterGateway)
-
-
Method Details
-
getJobId
public org.apache.flink.api.common.JobID getJobId()- Specified by:
getJobIdin interfaceJobShuffleContext- Returns:
- the corresponding
JobID.
-
stopTrackingAndReleasePartitions
public CompletableFuture<?> stopTrackingAndReleasePartitions(Collection<ResultPartitionID> partitionIds) Description copied from interface:JobShuffleContextNotifies 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.- Specified by:
stopTrackingAndReleasePartitionsin interfaceJobShuffleContext
-
getPartitionWithMetrics
public CompletableFuture<Collection<PartitionWithMetrics>> getPartitionWithMetrics(Duration timeout, Set<ResultPartitionID> expectedPartitions) Description copied from interface:JobShuffleContextRetrieves specified partitions and their metrics (identified byexpectedPartitions), the metrics include sizes of sub-partitions in a result partition.- Specified by:
getPartitionWithMetricsin interfaceJobShuffleContext- 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
public void notifyPartitionRecoveryStarted()Description copied from interface:JobShuffleContextNotifies that the recovery process of result partitions has started.- Specified by:
notifyPartitionRecoveryStartedin interfaceJobShuffleContext
-