jihoonson closed pull request #6131: Fetch unhandled curator exceptions
URL: https://github.com/apache/incubator-druid/pull/6131
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/server/src/main/java/io/druid/curator/CuratorModule.java 
b/server/src/main/java/io/druid/curator/CuratorModule.java
index bc1ec986551..163ae73c371 100644
--- a/server/src/main/java/io/druid/curator/CuratorModule.java
+++ b/server/src/main/java/io/druid/curator/CuratorModule.java
@@ -91,6 +91,16 @@ public CuratorFramework makeCurator(
         .aclProvider(config.getEnableAcl() ? new SecuredACLProvider() : new 
DefaultACLProvider())
         .build();
 
+    framework.getUnhandledErrorListenable().addListener((message, e) -> {
+      log.error(e, "Unhandled error in Curator Framework");
+      try {
+        lifecycle.stop();
+      }
+      catch (Throwable t) {
+        log.warn(t, "Exception when stopping druid lifecycle");
+      }
+    });
+
     lifecycle.addHandler(
         new Lifecycle.Handler()
         {


 

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to