SinBex commented on code in PR #21695:
URL: https://github.com/apache/flink/pull/21695#discussion_r1089905386
##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptivebatch/PointwiseBlockingResultInfo.java:
##########
@@ -60,4 +61,30 @@ public long getNumBytesProduced() {
.flatMapToLong(Arrays::stream)
.reduce(0L, Long::sum);
}
+
+ @Override
+ public long getNumBytesProduced(
+ IndexRange partitionIndexRange, IndexRange subpartitionIndexRange)
{
+ long inputBytes = 0;
+ for (int i = partitionIndexRange.getStartIndex();
+ i <= partitionIndexRange.getEndIndex();
+ ++i) {
+ checkState(
+ subpartitionBytesByPartitionIndex.get(i) != null,
+ "Partition index %d is not ready.",
+ i);
+ checkState(
+ subpartitionIndexRange.getEndIndex()
+ < subpartitionBytesByPartitionIndex.get(i).length,
+ "Subpartition end index %d is out of range of partition
%d.",
Review Comment:
Thanks for your remind! Fix this.
##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptivebatch/AllToAllBlockingResultInfo.java:
##########
@@ -81,6 +82,28 @@ public long getNumBytesProduced() {
}
}
+ @Override
+ public long getNumBytesProduced(
+ IndexRange partitionIndexRange, IndexRange subpartitionIndexRange)
{
+ checkState(aggregatedSubpartitionBytes != null, "Not all partition
infos are ready");
+ checkState(
+ partitionIndexRange.getStartIndex() == 0
+ && partitionIndexRange.getEndIndex() ==
numOfPartitions - 1,
+ "For All-To-All edges, the partition range should always be
[0, numOfPartitions).",
Review Comment:
good catch!
--
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]