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

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

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

    https://github.com/apache/flink/pull/4289#discussion_r129522795
  
    --- Diff: 
flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManager.java
 ---
    @@ -312,6 +312,48 @@ private void recoverWorkers() throws Exception {
        }
     
        @Override
    +   public void shutDown() throws Exception {
    +           // shut down all components
    +           if (taskMonitor != null) {
    +                   try {
    +                           actorSystem.stop(taskMonitor);
    +                   } catch (Throwable tt) {
    +                           LOG.error("Failed to stop taskMonitor", tt);
    +                   }
    +           }
    +
    +           if (connectionMonitor != null) {
    +                   try {
    +                           actorSystem.stop(connectionMonitor);
    +                   } catch (Throwable tt) {
    +                           LOG.error("Failed to stop connectionMonitor", 
tt);
    +                   }
    +           }
    +
    +           if (launchCoordinator != null) {
    +                   try {
    +                           actorSystem.stop(launchCoordinator);
    +                   } catch (Throwable tt) {
    +                           LOG.error("Failed to stop launchCoordinator", 
tt);
    +                   }
    +           }
    +
    +           if (reconciliationCoordinator != null) {
    +                   try {
    +                           actorSystem.stop(reconciliationCoordinator);
    +                   } catch (Throwable tt) {
    +                           LOG.error("Failed to stop 
reconciliationCoordinator", tt);
    +                   }
    +           }
    +
    +           if (actorSystem != null) {
    +                   actorSystem.shutdown();
    +                   actorSystem.awaitTermination();
    +           }
    --- End diff --
    
    We cannot shutdown the `ActorSystem` here because it can be used by someone 
else outside of the `MesosResourceManager`.


> Shutdown ResourceManager components properly
> --------------------------------------------
>
>                 Key: FLINK-7092
>                 URL: https://issues.apache.org/jira/browse/FLINK-7092
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Mesos
>            Reporter: Till Rohrmann
>            Priority: Minor
>              Labels: flip-6
>
> The {{MesosResourceManager}} starts internally a {{TaskMonitor}}, 
> {{LaunchCoordinator}}, {{ConnectionMonitor}} and a 
> {{ReconciliationCoordinator}}. These components have to be properly shut down 
> when the {{MesosResourceManager}} closes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to