GJL commented on a change in pull request #11213: [FLINK-16276][tests]
Introduce a builder and factory methods to create DefaultScheduler for testing
URL: https://github.com/apache/flink/pull/11213#discussion_r385667405
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/SchedulerTestingUtils.java
##########
@@ -213,4 +267,158 @@ public static CheckpointCoordinator
getCheckpointCoordinator(SchedulerBase sched
return operatorGateway.sendOperatorEventToTask(task,
operator, evt);
}
}
+
+ /**
+ * Builder for {@link DefaultScheduler}.
+ */
+ public static class DefaultSchedulerBuilder {
+ private final JobGraph jobGraph;
+
+ private SchedulingStrategyFactory schedulingStrategyFactory;
+
+ private Logger log = LOG;
+ private BackPressureStatsTracker backPressureStatsTracker =
VoidBackPressureStatsTracker.INSTANCE;
+ private Executor ioExecutor =
java.util.concurrent.Executors.newSingleThreadExecutor();
Review comment:
By merely creating a builder, we are instantiating several thread pools
(`ioExecutor`, `futureExecutor`, `delayExecutor`) but from a user perspective
there is no way to shut them down. I don't see a good solution to this.
----------------------------------------------------------------
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]
With regards,
Apache Git Services