zhuzhurk commented on a change in pull request #11770: URL: https://github.com/apache/flink/pull/11770#discussion_r411177132
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/strategy/TestingSchedulingTopology.java ########## @@ -78,6 +83,31 @@ public TestingSchedulingResultPartition getResultPartition(final IntermediateRes return resultPartition; } + @Override + public Iterable<SchedulingPipelinedRegion> getAllPipelinedRegions() { + return vertexRegions.values().stream().collect(Collectors.toSet()); + } + + @Override + public SchedulingPipelinedRegion getPipelinedRegionOfVertex(ExecutionVertexID vertexId) { + return vertexRegions.get(vertexId); + } + + void generatePipelinedRegions() { Review comment: Yes that would be better. The only problem is that the regions cannot be refreshed if the topology is changed after invoking `getAllPipelinedRegions()`. So I will clear the cached regions on any topology changes. ---------------------------------------------------------------- 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: us...@infra.apache.org