You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by ji...@apache.org on 2018/08/10 04:47:44 UTC
[incubator-druid] branch master updated: Fetch unhandled curator
exceptions (#6131)
This is an automated email from the ASF dual-hosted git repository.
jihoonson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git
The following commit(s) were added to refs/heads/master by this push:
new 1a37dfd Fetch unhandled curator exceptions (#6131)
1a37dfd is described below
commit 1a37dfdcd17b3ff6078600734c8f61c4fa496291
Author: Christoph Hösler <ch...@gmail.com>
AuthorDate: Fri Aug 10 06:47:42 2018 +0200
Fetch unhandled curator exceptions (#6131)
* fix: stop druid on unhandled curator exceptions
* catch exceptions when stopping lifecycle
---
server/src/main/java/io/druid/curator/CuratorModule.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/server/src/main/java/io/druid/curator/CuratorModule.java b/server/src/main/java/io/druid/curator/CuratorModule.java
index bc1ec98..163ae73 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 class CuratorModule implements Module
.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()
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org