zhuzhurk commented on code in PR #21634:
URL: https://github.com/apache/flink/pull/21634#discussion_r1222972024


##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/benchmark/SchedulerBenchmarkUtils.java:
##########
@@ -103,17 +113,55 @@ public static ExecutionGraph createAndInitExecutionGraph(
         final ComponentMainThreadExecutor mainThreadExecutor =
                 ComponentMainThreadExecutorServiceAdapter.forMainThread();
 
-        final DefaultScheduler scheduler =
+        DefaultSchedulerBuilder schedulerBuilder =
                 new DefaultSchedulerBuilder(jobGraph, mainThreadExecutor, 
scheduledExecutorService)
                         .setIoExecutor(scheduledExecutorService)
                         .setFutureExecutor(scheduledExecutorService)
                         .setDelayExecutor(
-                                new 
ScheduledExecutorServiceAdapter(scheduledExecutorService))
-                        .build();
+                                new 
ScheduledExecutorServiceAdapter(scheduledExecutorService));
+        if (jobConfiguration.getJobType() == JobType.BATCH) {
+            AdaptiveBatchScheduler adaptiveBatchScheduler =
+                    schedulerBuilder
+                            .setVertexParallelismAndInputInfosDecider(
+                                    createCustomParallelismDecider(
+                                            jobConfiguration.getParallelism()))
+                            .setInputConsumableDeciderFactory(

Review Comment:
   This also applies to other adaptive batch scheduler creation.
   Maybe we can introduce a method 
`createAdaptiveBatchScheduler(DefaultSchedulerBuilder)` to be reused?



-- 
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: [email protected]

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

Reply via email to