This is an automated email from the ASF dual-hosted git repository.

trohrmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 38bcfd9d5f3d3e39e5d11b2eebccd905d47c1f7b
Author: Till Rohrmann <[email protected]>
AuthorDate: Mon Jan 4 14:36:02 2021 +0100

    [hotfix] Remove unused ExecutionGraphBuilder.buildGraph method
---
 .../executiongraph/ExecutionGraphBuilder.java      | 88 +++++-----------------
 .../flink/runtime/scheduler/SchedulerBase.java     |  1 -
 .../TestingExecutionGraphBuilder.java              |  1 -
 3 files changed, 17 insertions(+), 73 deletions(-)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraphBuilder.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraphBuilder.java
index b213a31..0e70f7b 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraphBuilder.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraphBuilder.java
@@ -18,7 +18,6 @@
 
 package org.apache.flink.runtime.executiongraph;
 
-import org.apache.flink.annotation.VisibleForTesting;
 import org.apache.flink.api.common.JobID;
 import org.apache.flink.api.common.time.Time;
 import org.apache.flink.configuration.CheckpointingOptions;
@@ -58,8 +57,6 @@ import org.apache.flink.util.SerializedValue;
 
 import org.slf4j.Logger;
 
-import javax.annotation.Nullable;
-
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -75,56 +72,7 @@ import static 
org.apache.flink.util.Preconditions.checkNotNull;
  */
 public class ExecutionGraphBuilder {
 
-    /**
-     * Builds the ExecutionGraph from the JobGraph. If a prior execution graph 
exists, the JobGraph
-     * will be attached. If no prior execution graph exists, then the JobGraph 
will become attach to
-     * a new empty execution graph.
-     */
-    @VisibleForTesting
-    public static ExecutionGraph buildGraph(
-            @Nullable ExecutionGraph prior,
-            JobGraph jobGraph,
-            Configuration jobManagerConfig,
-            ScheduledExecutorService futureExecutor,
-            Executor ioExecutor,
-            SlotProvider slotProvider,
-            ClassLoader classLoader,
-            CheckpointRecoveryFactory recoveryFactory,
-            CheckpointIDCounter checkpointIdCounter,
-            Time rpcTimeout,
-            MetricGroup metrics,
-            BlobWriter blobWriter,
-            Time allocationTimeout,
-            Logger log,
-            ShuffleMaster<?> shuffleMaster,
-            JobMasterPartitionTracker partitionTracker,
-            long initializationTimestamp)
-            throws JobExecutionException, JobException {
-
-        return buildGraph(
-                prior,
-                jobGraph,
-                jobManagerConfig,
-                futureExecutor,
-                ioExecutor,
-                slotProvider,
-                classLoader,
-                recoveryFactory,
-                checkpointIdCounter,
-                rpcTimeout,
-                metrics,
-                blobWriter,
-                allocationTimeout,
-                log,
-                shuffleMaster,
-                partitionTracker,
-                NoOpExecutionDeploymentListener.get(),
-                (execution, newState) -> {},
-                initializationTimestamp);
-    }
-
     public static ExecutionGraph buildGraph(
-            @Nullable ExecutionGraph prior,
             JobGraph jobGraph,
             Configuration jobManagerConfig,
             ScheduledExecutorService futureExecutor,
@@ -170,25 +118,23 @@ public class ExecutionGraphBuilder {
         final ExecutionGraph executionGraph;
         try {
             executionGraph =
-                    (prior != null)
-                            ? prior
-                            : new ExecutionGraph(
-                                    jobInformation,
-                                    futureExecutor,
-                                    ioExecutor,
-                                    rpcTimeout,
-                                    maxPriorAttemptsHistoryLength,
-                                    slotProvider,
-                                    classLoader,
-                                    blobWriter,
-                                    allocationTimeout,
-                                    partitionReleaseStrategyFactory,
-                                    shuffleMaster,
-                                    partitionTracker,
-                                    jobGraph.getScheduleMode(),
-                                    executionDeploymentListener,
-                                    executionStateUpdateListener,
-                                    initializationTimestamp);
+                    new ExecutionGraph(
+                            jobInformation,
+                            futureExecutor,
+                            ioExecutor,
+                            rpcTimeout,
+                            maxPriorAttemptsHistoryLength,
+                            slotProvider,
+                            classLoader,
+                            blobWriter,
+                            allocationTimeout,
+                            partitionReleaseStrategyFactory,
+                            shuffleMaster,
+                            partitionTracker,
+                            jobGraph.getScheduleMode(),
+                            executionDeploymentListener,
+                            executionStateUpdateListener,
+                            initializationTimestamp);
         } catch (IOException e) {
             throw new JobException("Could not create the ExecutionGraph.", e);
         }
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
index 963f4b6..2feb12a 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/SchedulerBase.java
@@ -295,7 +295,6 @@ public abstract class SchedulerBase implements SchedulerNG {
         }
 
         return ExecutionGraphBuilder.buildGraph(
-                null,
                 jobGraph,
                 jobMasterConfiguration,
                 futureExecutor,
diff --git 
a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/TestingExecutionGraphBuilder.java
 
b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/TestingExecutionGraphBuilder.java
index b07cad2..a7298d4 100644
--- 
a/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/TestingExecutionGraphBuilder.java
+++ 
b/flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/TestingExecutionGraphBuilder.java
@@ -168,7 +168,6 @@ public class TestingExecutionGraphBuilder {
 
     public ExecutionGraph build() throws JobException, JobExecutionException {
         return ExecutionGraphBuilder.buildGraph(
-                null,
                 jobGraph,
                 jobMasterConfig,
                 futureExecutor,

Reply via email to