Class AllToAllBlockingResultInfo
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.adaptivebatch.AllToAllBlockingResultInfo
-
- All Implemented Interfaces:
IntermediateResultInfo
,BlockingResultInfo
public class AllToAllBlockingResultInfo extends Object
Information of All-To-All result.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
numOfPartitions
protected int
numOfSubpartitions
protected Map<Integer,long[]>
subpartitionBytesByPartitionIndex
The subpartition bytes map.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Long>
getAggregatedSubpartitionBytes()
long
getNumBytesProduced()
Return the num of bytes produced(numBytesProduced) by the producer.long
getNumBytesProduced(IndexRange partitionIndexRange, IndexRange subpartitionIndexRange)
Return the aggregated num of bytes according to the index range for partition and subpartition.int
getNumPartitions()
Get number of partitions for this result.int
getNumSubpartitions(int partitionIndex)
Get number of subpartitions for the given partition.IntermediateDataSetID
getResultId()
Get the intermediate result id.boolean
isBroadcast()
Whether it is a broadcast result.boolean
isPointwise()
Whether it is a pointwise result.void
recordPartitionInfo(int partitionIndex, ResultPartitionBytes partitionBytes)
Record the information of the result partition.void
resetPartitionInfo(int partitionIndex)
Reset the information of the result partition.
-
-
-
Method Detail
-
isBroadcast
public boolean isBroadcast()
Description copied from interface:IntermediateResultInfo
Whether it is a broadcast result.- Returns:
- whether it is a broadcast result
-
isPointwise
public boolean isPointwise()
Description copied from interface:IntermediateResultInfo
Whether it is a pointwise result.- Returns:
- whether it is a pointwise result
-
getNumPartitions
public int getNumPartitions()
Description copied from interface:IntermediateResultInfo
Get number of partitions for this result.- Returns:
- the number of partitions in this result
-
getNumSubpartitions
public int getNumSubpartitions(int partitionIndex)
Description copied from interface:IntermediateResultInfo
Get number of subpartitions for the given partition.- Parameters:
partitionIndex
- the partition index- Returns:
- the number of subpartitions of the partition
-
getNumBytesProduced
public long getNumBytesProduced()
Description copied from interface:BlockingResultInfo
Return the num of bytes produced(numBytesProduced) by the producer.The difference between numBytesProduced and numBytesOut : numBytesProduced represents the number of bytes actually produced, and numBytesOut represents the number of bytes sent to downstream tasks. In unicast scenarios, these two values should be equal. In broadcast scenarios, numBytesOut should be (N * numBytesProduced), where N refers to the number of subpartitions.
- Returns:
- the num of bytes produced by the producer
-
getNumBytesProduced
public long getNumBytesProduced(IndexRange partitionIndexRange, IndexRange subpartitionIndexRange)
Description copied from interface:BlockingResultInfo
Return the aggregated num of bytes according to the index range for partition and subpartition.- Parameters:
partitionIndexRange
- range of the index of the consumed partition.subpartitionIndexRange
- range of the index of the consumed subpartition.- Returns:
- aggregated bytes according to the index ranges.
-
recordPartitionInfo
public void recordPartitionInfo(int partitionIndex, ResultPartitionBytes partitionBytes)
Description copied from interface:BlockingResultInfo
Record the information of the result partition.- Specified by:
recordPartitionInfo
in interfaceBlockingResultInfo
- Parameters:
partitionIndex
- the intermediate result partition indexpartitionBytes
- theResultPartitionBytes
of the partition
-
resetPartitionInfo
public void resetPartitionInfo(int partitionIndex)
Description copied from interface:BlockingResultInfo
Reset the information of the result partition.- Specified by:
resetPartitionInfo
in interfaceBlockingResultInfo
- Parameters:
partitionIndex
- the intermediate result partition index
-
getResultId
public IntermediateDataSetID getResultId()
Description copied from interface:IntermediateResultInfo
Get the intermediate result id.- Specified by:
getResultId
in interfaceIntermediateResultInfo
- Returns:
- the intermediate result id
-
-