[ 
https://issues.apache.org/jira/browse/FLINK-8605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16364114#comment-16364114
 ] 

ASF GitHub Bot commented on FLINK-8605:
---------------------------------------

Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5430#discussion_r168187481
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/WebMonitorEndpoint.java
 ---
    @@ -593,6 +617,8 @@ public void shutdown(Time timeout) {
                } catch (Exception e) {
                        log.warn("Error while stopping leaderElectionService", 
e);
                }
    +
    +           super.shutdown(timeout);
    --- End diff --
    
    Because `leaderElectionService.stop()` can call `revokeLeadership`. Inside 
of `revokeLeadership` we call `RestServerEndpoint#getRestAddress` which cannot 
be accessed after it has been shut down. This happens when calling 
`super.shutdown`. Moreover, I think it is a good idea to call the close method 
first on the sub class and then on the parent class in order to guarantee that 
you don't close any services from the parent class which the sub class might 
still need for closing.


> Enable job cancellation from the web UI
> ---------------------------------------
>
>                 Key: FLINK-8605
>                 URL: https://issues.apache.org/jira/browse/FLINK-8605
>             Project: Flink
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 1.5.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Major
>              Labels: flip-6
>             Fix For: 1.5.0
>
>
> In order to enable the job cancellation from the web UI (including YARN) we 
> have to register the {{JobTerminationHandler}} under 
> {{/jobs/:jobId/yarn-cancel}} and {{/jobs/:jobid/yarn-stop}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to