public class PointwiseBlockingResultInfo extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
numOfPartitions |
protected int |
numOfSubpartitions |
protected Map<Integer,long[]> |
subpartitionBytesByPartitionIndex
The subpartition bytes map.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected final int numOfPartitions
protected final int numOfSubpartitions
public boolean isBroadcast()
IntermediateResultInfopublic boolean isPointwise()
IntermediateResultInfopublic int getNumPartitions()
IntermediateResultInfopublic int getNumSubpartitions(int partitionIndex)
IntermediateResultInfopartitionIndex - the partition indexpublic long getNumBytesProduced()
BlockingResultInfoThe 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.
public long getNumBytesProduced(IndexRange partitionIndexRange, IndexRange subpartitionIndexRange)
BlockingResultInfopartitionIndexRange - range of the index of the consumed partition.subpartitionIndexRange - range of the index of the consumed subpartition.public IntermediateDataSetID getResultId()
IntermediateResultInfogetResultId in interface IntermediateResultInfopublic void recordPartitionInfo(int partitionIndex,
ResultPartitionBytes partitionBytes)
BlockingResultInforecordPartitionInfo in interface BlockingResultInfopartitionIndex - the intermediate result partition indexpartitionBytes - the ResultPartitionBytes of the partitionpublic void resetPartitionInfo(int partitionIndex)
BlockingResultInforesetPartitionInfo in interface BlockingResultInfopartitionIndex - the intermediate result partition indexCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.