yanghua commented on a change in pull request #6451: [FLINK-9936] Resource manager connect to mesos after leadership granted. . URL: https://github.com/apache/flink/pull/6451#discussion_r206098411
########## File path: flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosResourceManager.java ########## @@ -283,7 +287,14 @@ protected void initialize() throws ResourceManagerException { connectionMonitor.tell(new ConnectionMonitor.Start(), selfActor); schedulerDriver.start(); - LOG.info("Mesos resource manager initialized."); + LOG.info("Mesos resource manager started."); + } + + @Override + protected void onLeaderShipRevoked() throws Exception { + workerStore.stop(false); Review comment: We should warp try/catch block for these three calls to make sure they can be stopped even if previous statement throws an exception. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services