Class ConsumedPartitionGroup
java.lang.Object
org.apache.flink.runtime.scheduler.strategy.ConsumedPartitionGroup
- All Implemented Interfaces:
Iterable<IntermediateResultPartitionID>
public class ConsumedPartitionGroup
extends Object
implements Iterable<IntermediateResultPartitionID>
Group of consumed
IntermediateResultPartitionIDs. One such a group corresponds to one
ConsumerVertexGroup.-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ConsumedPartitionGroupfromMultiplePartitions(int numConsumers, List<IntermediateResultPartitionID> resultPartitions, ResultPartitionType resultPartitionType) static ConsumedPartitionGroupfromSinglePartition(int numConsumers, IntermediateResultPartitionID resultPartition, ResultPartitionType resultPartitionType) getFirst()Get the ID of IntermediateDataSet this ConsumedPartitionGroup belongs to.intintIn dynamic graph cases, the number of consumers of ConsumedPartitionGroup can be different even if they contain the same IntermediateResultPartition.booleanisEmpty()iterator()intintvoidsetConsumerVertexGroup(ConsumerVertexGroup consumerVertexGroup) intsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
fromMultiplePartitions
public static ConsumedPartitionGroup fromMultiplePartitions(int numConsumers, List<IntermediateResultPartitionID> resultPartitions, ResultPartitionType resultPartitionType) -
fromSinglePartition
public static ConsumedPartitionGroup fromSinglePartition(int numConsumers, IntermediateResultPartitionID resultPartition, ResultPartitionType resultPartitionType) -
iterator
- Specified by:
iteratorin interfaceIterable<IntermediateResultPartitionID>
-
getResultPartitionsInOrder
-
size
public int size() -
isEmpty
public boolean isEmpty() -
getNumConsumers
public int getNumConsumers()In dynamic graph cases, the number of consumers of ConsumedPartitionGroup can be different even if they contain the same IntermediateResultPartition. -
getFirst
-
getIntermediateDataSetID
Get the ID of IntermediateDataSet this ConsumedPartitionGroup belongs to. -
partitionUnfinished
public int partitionUnfinished() -
partitionFinished
public int partitionFinished() -
getNumberOfUnfinishedPartitions
public int getNumberOfUnfinishedPartitions() -
areAllPartitionsFinished
public boolean areAllPartitionsFinished() -
getResultPartitionType
-
getConsumerVertexGroup
-
setConsumerVertexGroup
-