Skip to content

Commit

Permalink
[FLINK-21658] Adopts JobGraphBuilder to create job graph
Browse files Browse the repository at this point in the history
  • Loading branch information
Myasuka committed Mar 8, 2021
1 parent d0ec358 commit 7c8207b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.apache.flink.runtime.executiongraph.ExecutionVertex;
import org.apache.flink.runtime.executiongraph.TaskExecutionStateTransition;
import org.apache.flink.runtime.jobgraph.JobGraph;
import org.apache.flink.runtime.jobgraph.JobGraphBuilder;
import org.apache.flink.runtime.jobgraph.JobVertex;
import org.apache.flink.runtime.jobgraph.JobVertexID;
import org.apache.flink.runtime.jobmaster.LogicalSlot;
Expand Down Expand Up @@ -80,7 +81,9 @@ public static JobGraph createJobGraph(
List<JobVertex> jobVertices,
JobConfiguration jobConfiguration) throws IOException {

final JobGraph jobGraph = new JobGraph(jobVertices.toArray(new JobVertex[0]));
final JobGraph jobGraph = JobGraphBuilder.newStreamingJobGraphBuilder()
.addJobVertices(jobVertices)
.build();

jobGraph.setJobType(jobConfiguration.getJobType());

Expand Down

0 comments on commit 7c8207b

Please sign in to comment.