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()
IntermediateResultInfo
public boolean isPointwise()
IntermediateResultInfo
public int getNumPartitions()
IntermediateResultInfo
public int getNumSubpartitions(int partitionIndex)
IntermediateResultInfo
partitionIndex
- the partition indexpublic long getNumBytesProduced()
BlockingResultInfo
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.
public long getNumBytesProduced(IndexRange partitionIndexRange, IndexRange subpartitionIndexRange)
BlockingResultInfo
partitionIndexRange
- range of the index of the consumed partition.subpartitionIndexRange
- range of the index of the consumed subpartition.public IntermediateDataSetID getResultId()
IntermediateResultInfo
getResultId
in interface IntermediateResultInfo
public void recordPartitionInfo(int partitionIndex, ResultPartitionBytes partitionBytes)
BlockingResultInfo
recordPartitionInfo
in interface BlockingResultInfo
partitionIndex
- the intermediate result partition indexpartitionBytes
- the ResultPartitionBytes
of the partitionpublic void resetPartitionInfo(int partitionIndex)
BlockingResultInfo
resetPartitionInfo
in interface BlockingResultInfo
partitionIndex
- the intermediate result partition indexCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.