wanglijie95 commented on a change in pull request #18050:
URL: https://github.com/apache/flink/pull/18050#discussion_r771175287



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/IntermediateResultPartitionTest.java
##########
@@ -140,6 +150,127 @@ public void testBlockingPartitionResetting() throws 
Exception {
         assertFalse(consumedPartitionGroup.areAllPartitionsFinished());
     }
 
+    @Test
+    public void testGetNumberOfSubpartitionsForNonDynamicAllToAllGraph() 
throws Exception {
+        testGetNumberOfSubpartitions(7, DistributionPattern.ALL_TO_ALL, false, 
Arrays.asList(7, 7));
+    }
+
+    @Test
+    public void testGetNumberOfSubpartitionsForNonDynamicPointWiseGraph() 
throws Exception {
+        testGetNumberOfSubpartitions(7, DistributionPattern.POINTWISE, false, 
Arrays.asList(4, 3));
+    }
+
+    @Test
+    public void 
testGetNumberOfSubpartitionsFromConsumerParallelismForDynamicAllToAllGraph()
+            throws Exception {
+        testGetNumberOfSubpartitions(7, DistributionPattern.ALL_TO_ALL, true, 
Arrays.asList(7, 7));

Review comment:
       This design is because the parallelism of some operators can only be a 
certain value. For example, `GlobalAgg`, it's parallelism can only be 1. In 
this case, the parallelism of `GlobalAgg` will be set to 1 in jobgraph during 
compilation, and the adaptive batch scheduler will not change it's parallelism.




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


Reply via email to