flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject [06/22] flink git commit: [FLINK-8605] [rest] Enable job cancellation from the web UI
Date Thu, 15 Feb 2018 10:42:49 GMT
[FLINK-8605] [rest] Enable job cancellation from the web UI

In order to support the job cancellation from the web UI, including when using
Yarn, we have to register the JobTerminationHandler under /jobs/:jobid/yarn-cancel
and /jobs/:jobid/yarn-stop. This is just a temporary fix until we can send
arbitrary REST verbs through the Yarn proxy.

This closes #5430.


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

Branch: refs/heads/master
Commit: 2a154173c7914901a6df5b99ff760f1417159bfc
Parents: a510589
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Wed Feb 7 12:35:58 2018 +0100
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Thu Feb 15 08:44:18 2018 +0100

----------------------------------------------------------------------
 .../app/scripts/modules/jobs/jobs.svc.coffee    |  4 +-
 .../web-dashboard/web/js/hs/index.js            |  4 +-
 flink-runtime-web/web-dashboard/web/js/index.js |  4 +-
 .../rest/handler/job/JobTerminationHandler.java | 10 +++-
 .../YarnCancelJobTerminationHeaders.java        | 55 ++++++++++++++++++++
 .../messages/YarnStopJobTerminationHeaders.java | 55 ++++++++++++++++++++
 .../runtime/webmonitor/WebMonitorEndpoint.java  | 22 ++++++--
 .../YarnCancelJobTerminationHeadersTest.java    | 47 +++++++++++++++++
 .../YarnStopJobTerminationHeadersTest.java      | 48 +++++++++++++++++
 9 files changed, 238 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/2a154173/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
----------------------------------------------------------------------
diff --git a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
index 5441730..b555430 100644
--- a/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
+++ b/flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
@@ -314,12 +314,12 @@ angular.module('flinkApp')
 
   @cancelJob = (jobid) ->
     # uses the non REST-compliant GET yarn-cancel handler which is available in addition
to the
-    # proper "DELETE jobs/<jobid>/"
+    # proper $http.patch flinkConfig.jobServer + "jobs/" + jobid + "?mode=cancel"
     $http.get flinkConfig.jobServer + "jobs/" + jobid + "/yarn-cancel"
 
   @stopJob = (jobid) ->
     # uses the non REST-compliant GET yarn-cancel handler which is available in addition
to the
-    # proper "DELETE jobs/<jobid>/"
+    # proper $http.patch flinkConfig.jobServer + "jobs/" + jobid + "?mode=stop"
     $http.get "jobs/" + jobid + "/yarn-stop"
 
   @


Mime
View raw message