[FLINK-6411] [flip-6] Remove job removal from RunningJobsRegistry in 
YarnFlinkApplicationMasterRunner.shutdown

The YarnFlinkApplicationMasterRunner should not be concerned with removing jobs 
from
the RunningJobsRegistry. This is the responsibility of the JobManagerRunner.

This PR removes the job removal from the RunningJobRegistry from the
YarnFlinkApplicationMasterRunner.shutdown method.

This closes #3797.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/c36d6b80
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/c36d6b80
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/c36d6b80

Branch: refs/heads/table-retraction
Commit: c36d6b808285961505d39187408e1bf77b7b5ea1
Parents: d75ec5b
Author: Till Rohrmann <trohrm...@apache.org>
Authored: Fri Apr 28 12:17:42 2017 +0200
Committer: Till Rohrmann <trohrm...@apache.org>
Committed: Fri Apr 28 15:57:33 2017 +0200

----------------------------------------------------------------------
 .../flink/yarn/YarnFlinkApplicationMasterRunner.java    | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/c36d6b80/flink-yarn/src/main/java/org/apache/flink/yarn/YarnFlinkApplicationMasterRunner.java
----------------------------------------------------------------------
diff --git 
a/flink-yarn/src/main/java/org/apache/flink/yarn/YarnFlinkApplicationMasterRunner.java
 
b/flink-yarn/src/main/java/org/apache/flink/yarn/YarnFlinkApplicationMasterRunner.java
index a6b66d7..4e178e6 100644
--- 
a/flink-yarn/src/main/java/org/apache/flink/yarn/YarnFlinkApplicationMasterRunner.java
+++ 
b/flink-yarn/src/main/java/org/apache/flink/yarn/YarnFlinkApplicationMasterRunner.java
@@ -103,9 +103,6 @@ public class YarnFlinkApplicationMasterRunner extends 
AbstractYarnFlinkApplicati
        @GuardedBy("lock")
        private JobManagerRunner jobManagerRunner;
 
-       @GuardedBy("lock")
-       private JobGraph jobGraph;
-
        // 
------------------------------------------------------------------------
        //  Program entry point
        // 
------------------------------------------------------------------------
@@ -217,7 +214,7 @@ public class YarnFlinkApplicationMasterRunner extends 
AbstractYarnFlinkApplicati
        private JobManagerRunner createJobManagerRunner(Configuration config) 
throws Exception{
                // first get JobGraph from local resources
                //TODO: generate the job graph from user's jar
-               jobGraph = loadJobGraph(config);
+               JobGraph jobGraph = loadJobGraph(config);
 
                // now the JobManagerRunner
                return new JobManagerRunner(
@@ -232,13 +229,6 @@ public class YarnFlinkApplicationMasterRunner extends 
AbstractYarnFlinkApplicati
        }
 
        protected void shutdown(ApplicationStatus status, String msg) {
-               // Need to clear the job state in the HA services before 
shutdown
-               try {
-                       
haServices.getRunningJobsRegistry().clearJob(jobGraph.getJobID());
-               }
-               catch (Throwable t) {
-                       LOG.warn("Could not clear the job at the 
high-availability services", t);
-               }
 
                synchronized (lock) {
                        if (jobManagerRunner != null) {

Reply via email to