Search in sources :

Example 1 with IterableUtils

use of org.apache.flink.util.IterableUtils in project flink by apache.

the class DefaultExecutionGraph method releasePartitionGroups.

private void releasePartitionGroups(final List<ConsumedPartitionGroup> releasablePartitionGroups) {
    if (releasablePartitionGroups.size() > 0) {
        // Remove the cache of ShuffleDescriptors when ConsumedPartitionGroups are released
        for (ConsumedPartitionGroup releasablePartitionGroup : releasablePartitionGroups) {
            IntermediateResult totalResult = checkNotNull(intermediateResults.get(releasablePartitionGroup.getIntermediateDataSetID()));
            totalResult.clearCachedInformationForPartitionGroup(releasablePartitionGroup);
        }
        final List<ResultPartitionID> releasablePartitionIds = releasablePartitionGroups.stream().flatMap(IterableUtils::toStream).map(this::createResultPartitionId).collect(Collectors.toList());
        partitionTracker.stopTrackingAndReleasePartitions(releasablePartitionIds);
    }
}
Also used : ConsumedPartitionGroup(org.apache.flink.runtime.scheduler.strategy.ConsumedPartitionGroup) IterableUtils(org.apache.flink.util.IterableUtils) ResultPartitionID(org.apache.flink.runtime.io.network.partition.ResultPartitionID) IntermediateResultPartitionID(org.apache.flink.runtime.jobgraph.IntermediateResultPartitionID)

Aggregations

ResultPartitionID (org.apache.flink.runtime.io.network.partition.ResultPartitionID)1 IntermediateResultPartitionID (org.apache.flink.runtime.jobgraph.IntermediateResultPartitionID)1 ConsumedPartitionGroup (org.apache.flink.runtime.scheduler.strategy.ConsumedPartitionGroup)1 IterableUtils (org.apache.flink.util.IterableUtils)1