zhuzhurk commented on code in PR #24524:
URL: https://github.com/apache/flink/pull/24524#discussion_r1533346303
##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/DefaultSchedulerBuilder.java:
##########
@@ -322,39 +321,14 @@ public DefaultScheduler build() throws Exception {
}
public AdaptiveBatchScheduler buildAdaptiveBatchJobScheduler() throws
Exception {
- return new AdaptiveBatchScheduler(
- log,
- jobGraph,
- ioExecutor,
- jobMasterConfiguration,
- componentMainThreadExecutor -> {},
- delayExecutor,
- userCodeLoader,
- checkpointCleaner,
- checkpointRecoveryFactory,
- jobManagerJobMetricGroup,
- new
VertexwiseSchedulingStrategy.Factory(inputConsumableDeciderFactory),
- failoverStrategyFactory,
- restartBackoffTimeStrategy,
- executionOperations,
- executionVertexVersioner,
- executionSlotAllocatorFactory,
- System.currentTimeMillis(),
- mainThreadExecutor,
- jobStatusListener,
- failureEnrichers,
- createExecutionGraphFactory(true),
- shuffleMaster,
- rpcTimeout,
- vertexParallelismAndInputInfosDecider,
- defaultMaxParallelism,
- hybridPartitionDataConsumeConstraint,
-
ForwardGroupComputeUtil.computeForwardGroupsAndCheckParallelism(
- jobGraph.getVerticesSortedTopologicallyFromSources()));
+ return buildAdaptiveBatchJobScheduler(false);
}
- public SpeculativeScheduler buildSpeculativeScheduler() throws Exception {
- return new SpeculativeScheduler(
+ public AdaptiveBatchScheduler buildAdaptiveBatchJobScheduler(boolean
enableSpeculativeExecution)
+ throws Exception {
+ jobMasterConfiguration.set(
+ BatchExecutionOptions.SPECULATIVE_ENABLED,
enableSpeculativeExecution);
+ return new AdaptiveBatchScheduler(
Review Comment:
Is it possible that we use `AdaptiveBatchSchedulerFactory` to create
scheduler, so that more production code can be covered by this test?
--
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]