tillrohrmann commented on a change in pull request #16856:
URL: https://github.com/apache/flink/pull/16856#discussion_r697255228
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/strategy/ConsumedPartitionGroup.java
##########
@@ -19,22 +19,32 @@
package org.apache.flink.runtime.scheduler.strategy;
import org.apache.flink.annotation.VisibleForTesting;
+import org.apache.flink.runtime.jobgraph.IntermediateDataSetID;
import org.apache.flink.runtime.jobgraph.IntermediateResultPartitionID;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
+import static org.apache.flink.util.Preconditions.checkArgument;
+
/** Group of consumed {@link IntermediateResultPartitionID}s. */
public class ConsumedPartitionGroup implements
Iterable<IntermediateResultPartitionID> {
private final List<IntermediateResultPartitionID> resultPartitions;
private final AtomicInteger unfinishedPartitions;
+ private final IntermediateDataSetID intermediateDataSetID;
+
private ConsumedPartitionGroup(List<IntermediateResultPartitionID>
resultPartitions) {
+ checkArgument(
+ resultPartitions.size() > 0,
+ "The size of result partitions in a ConsumedPartitionGroup
should be larger than 0.");
+
Review comment:
I am wondering whether we should also check as precondition that all
`resultPartitions` have the same `IntermediateDataSetID`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]