You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/07/14 17:55:47 UTC

[GitHub] sijie commented on a change in pull request #1543: Issue 1540: Bookie/BookieServer components shutdown will fail to end exit the BookieProcess

sijie commented on a change in pull request #1543: Issue 1540: Bookie/BookieServer components shutdown will fail to end exit the BookieProcess
URL: https://github.com/apache/bookkeeper/pull/1543#discussion_r202521332
 
 

 ##########
 File path: bookkeeper-common/src/main/java/org/apache/bookkeeper/common/component/ComponentStarter.java
 ##########
 @@ -62,8 +62,19 @@ public void run() {
      */
     public static CompletableFuture<Void> startComponent(LifecycleComponent component) {
         CompletableFuture<Void> future = new CompletableFuture<>();
-        Runtime.getRuntime().addShutdownHook(new Thread(
-            new ComponentShutdownHook(component, future), "component-shutdown-thread"));
+        final Thread shutdownHookThread = new Thread(
+            new ComponentShutdownHook(component, future),
+            "component-shutdown-thread"
 
 Review comment:
   what is your suggestion?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services