Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@
import org.apache.flink.configuration.Configuration;
import org.apache.flink.configuration.SlowTaskDetectorOptions;
import org.apache.flink.runtime.concurrent.ComponentMainThreadExecutorServiceAdapter;
import org.apache.flink.runtime.concurrent.NoMainThreadCheckComponentMainThreadExecutor;
import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
import org.apache.flink.runtime.executiongraph.ExecutionGraph;
import org.apache.flink.runtime.executiongraph.ExecutionGraphTestUtils;
import org.apache.flink.runtime.executiongraph.ExecutionVertex;
import org.apache.flink.runtime.executiongraph.utils.ExecutionUtils;
import org.apache.flink.runtime.io.network.partition.ResultPartitionType;
import org.apache.flink.runtime.jobgraph.DistributionPattern;
import org.apache.flink.runtime.jobgraph.JobGraph;
Expand Down Expand Up @@ -91,7 +93,7 @@ void testAllTasksInCreatedAndNoSlowTasks() throws Exception {
final ExecutionGraph executionGraph =
SchedulerTestingUtils.createScheduler(
jobGraph,
ComponentMainThreadExecutorServiceAdapter.forMainThread(),
new NoMainThreadCheckComponentMainThreadExecutor(),
EXECUTOR_RESOURCE.getExecutor())
.getExecutionGraph();

Expand Down Expand Up @@ -433,12 +435,15 @@ private ExecutionGraph createExecutionGraph(JobVertex... jobVertices) throws Exc
final SchedulerBase scheduler =
SchedulerTestingUtils.createScheduler(
jobGraph,
ComponentMainThreadExecutorServiceAdapter.forMainThread(),
new NoMainThreadCheckComponentMainThreadExecutor(),
EXECUTOR_RESOURCE.getExecutor());

final ExecutionGraph executionGraph = scheduler.getExecutionGraph();

scheduler.startScheduling();
for (ExecutionVertex ev : executionGraph.getAllExecutionVertices()) {
ExecutionUtils.waitForTaskDeploymentDescriptorsCreation(ev);
}
ExecutionGraphTestUtils.switchAllVerticesToRunning(executionGraph);

return executionGraph;
Expand All @@ -450,13 +455,16 @@ private ExecutionGraph createDynamicExecutionGraph(JobVertex... jobVertices) thr
final SchedulerBase scheduler =
new DefaultSchedulerBuilder(
jobGraph,
ComponentMainThreadExecutorServiceAdapter.forMainThread(),
new NoMainThreadCheckComponentMainThreadExecutor(),
EXECUTOR_RESOURCE.getExecutor())
.buildAdaptiveBatchJobScheduler();

final ExecutionGraph executionGraph = scheduler.getExecutionGraph();

scheduler.startScheduling();
for (ExecutionVertex ev : executionGraph.getAllExecutionVertices()) {
ExecutionUtils.waitForTaskDeploymentDescriptorsCreation(ev);
}
ExecutionGraphTestUtils.switchAllVerticesToRunning(executionGraph);

return executionGraph;
Expand Down