You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ta...@apache.org on 2021/03/08 07:21:11 UTC
[flink-benchmarks] 01/01: [FLINK-21658] Adopts JobGraphBuilder to
create job graph
This is an automated email from the ASF dual-hosted git repository.
tangyun pushed a commit to branch FLINK-21658
in repository https://gitbox.apache.org/repos/asf/flink-benchmarks.git
commit 9a06512c32b557e371a515b02319b68391ba6b63
Author: 茶干 <ch...@alibaba-inc.com>
AuthorDate: Mon Mar 8 15:20:00 2021 +0800
[FLINK-21658] Adopts JobGraphBuilder to create job graph
---
.../apache/flink/scheduler/benchmark/SchedulerBenchmarkUtils.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/flink/scheduler/benchmark/SchedulerBenchmarkUtils.java b/src/main/java/org/apache/flink/scheduler/benchmark/SchedulerBenchmarkUtils.java
index 56fb7d8..ba69261 100644
--- a/src/main/java/org/apache/flink/scheduler/benchmark/SchedulerBenchmarkUtils.java
+++ b/src/main/java/org/apache/flink/scheduler/benchmark/SchedulerBenchmarkUtils.java
@@ -30,6 +30,7 @@ import org.apache.flink.runtime.executiongraph.ExecutionGraph;
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;
@@ -80,7 +81,9 @@ public class SchedulerBenchmarkUtils {
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());