zhuzhurk commented on a change in pull request #18462: URL: https://github.com/apache/flink/pull/18462#discussion_r794401127
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/failover/flip1/SchedulingPipelinedRegionComputeUtil.java ########## @@ -67,13 +67,13 @@ * Tarjan's strongly connected components algorithm</a>. For more details please see <a * href="https://issues.apache.org/jira/browse/FLINK-17330">FLINK-17330</a>. */ - private static Set<Set<SchedulingExecutionVertex>> mergeRegionsOnCycles( + private static Set<Set<SchedulingExecutionVertex>> mergeGroupsOnCycles( Review comment: I would keep the name unchanged because it is part of `SchedulingPipelinedRegionComputeUtil`. ########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptivebatch/forwardgroup/ForwardGroupComputeUtilTest.java ########## @@ -162,20 +171,35 @@ public void testOneInputSplitsIntoTwo() { v2.getProducedDataSets().get(0).getConsumer().setForward(true); v2.getProducedDataSets().get(1).getConsumer().setForward(true); - Set<ForwardRegion> regions = computePipelinedRegions(v1, v2, v3, v4); + Set<ForwardGroup> groups = computeForwardGroups(v1, v2, v3, v4); - checkRegionSize(regions, 2, 3, 1); + checkGroupSize(groups, 1, 3); } - private static Set<ForwardRegion> computePipelinedRegions(JobVertex... vertices) { + private static Set<ForwardGroup> computeForwardGroups(JobVertex... vertices) throws Exception { + Arrays.asList(vertices).forEach(vertex -> vertex.setInvokableClass(NoOpInvokable.class)); + ExecutionGraph executionGraph = createDynamicGraph(vertices); return new HashSet<>( - ForwardRegionComputeUtil.computeForwardRegions(Arrays.asList(vertices)).values()); + ForwardGroupComputeUtil.computeForwardGroups( + Arrays.asList(vertices), executionGraph::getJobVertex) + .values()); } - private static void checkRegionSize( - Set<ForwardRegion> regions, int numOfRegions, int... sizes) { - assertEquals(numOfRegions, regions.size()); + private static void checkGroupSize(Set<ForwardGroup> groups, int numOfGroups, int... sizes) { + assertEquals(numOfGroups, groups.size()); containsInAnyOrder( - regions.stream().map(ForwardRegion::size).collect(Collectors.toList()), sizes); + groups.stream().map(ForwardGroup::size).collect(Collectors.toList()), sizes); + } + + private static DefaultExecutionGraph createDynamicGraph(JobVertex... vertices) Review comment: Looks to me the test does not require a dynamic graph? -- 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