wsry commented on a change in pull request #18474:
URL: https://github.com/apache/flink/pull/18474#discussion_r792449522
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/SortMergeResultPartition.java
##########
@@ -492,10 +490,13 @@ public int getNumberOfQueuedBuffers(int
targetSubpartition) {
}
private int[] getRandomSubpartitionOrder(int numSubpartitions) {
- List<Integer> list =
- IntStream.range(0,
numSubpartitions).boxed().collect(Collectors.toList());
- Collections.shuffle(list);
- return list.stream().mapToInt(Integer::intValue).toArray();
+ int[] order = new int[numSubpartitions];
+ Random random = new Random();
+ int shift = random.nextInt(numSubpartitions);
Review comment:
Yes, it is expected. The motivation is for better sequential disk IO
when there is no enough resources to run the downstream consumer tasks in
parallel.
--
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]