wsry commented on a change in pull request #13595:
URL: https://github.com/apache/flink/pull/13595#discussion_r511628189



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartitionFactory.java
##########
@@ -136,26 +144,41 @@ public ResultPartition create(
 
                        partition = pipelinedPartition;
                }
-               else if (type == ResultPartitionType.BLOCKING || type == 
ResultPartitionType.BLOCKING_PERSISTENT) {
-                       final BoundedBlockingResultPartition blockingPartition 
= new BoundedBlockingResultPartition(
-                               taskNameWithSubtaskAndId,
-                               partitionIndex,
-                               id,
-                               type,
-                               subpartitions,
-                               maxParallelism,
-                               partitionManager,
-                               bufferCompressor,
-                               bufferPoolFactory);
-
-                       initializeBoundedBlockingPartitions(
-                               subpartitions,
-                               blockingPartition,
-                               blockingSubpartitionType,
-                               networkBufferSize,
-                               channelManager);
-
-                       partition = blockingPartition;
+               else if (isBlockingShuffle(type)) {
+                       if (isSortMergeBlockingShuffle(type, 
numberOfSubpartitions)) {
+                               partition = new SortMergeResultPartition(
+                                       taskNameWithSubtaskAndId,
+                                       partitionIndex,
+                                       id,
+                                       type,
+                                       subpartitions.length,
+                                       maxParallelism,
+                                       networkBufferSize,
+                                       partitionManager,
+                                       channelManager,
+                                       bufferCompressor,
+                                       bufferPoolFactory);
+                       } else {
+                               final BoundedBlockingResultPartition 
blockingPartition = new BoundedBlockingResultPartition(

Review comment:
       We need the type of BoundedBlockingResultPartition when calling 
initializeBoundedBlockingPartitions.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to