yunfengzhou-hub commented on code in PR #23927: URL: https://github.com/apache/flink/pull/23927#discussion_r1450086954
########## flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java: ########## @@ -301,6 +302,24 @@ public void setMetricGroup(TaskIOMetricGroup metrics) { partitionId.getPartitionId(), resultPartitionBytes); } + @Override + public ResultSubpartitionView createSubpartitionView( + ResultSubpartitionIndexSet indexSet, BufferAvailabilityListener availabilityListener) + throws IOException { + // The ability to support multiple indexes is to be provided in subsequent commits of + // the corresponding pull request. As the function is about to be supported uniformly with + // one set of code, they will be placed in a common method shared by all shuffle + // implementations, and that will be this method. + Iterator<Integer> iterator = indexSet.values().iterator(); + int index = iterator.next(); + Preconditions.checkState(!iterator.hasNext()); + return createSubpartitionView(index, availabilityListener); + } + + /** Returns a reader for the subpartition with the given index. */ Review Comment: A more complete javadoc has been added. As the doc mentions UnionResultSubpartitionView, it is completed in the commit that introduced this class. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org