tillrohrmann commented on a change in pull request #17053:
URL: https://github.com/apache/flink/pull/17053#discussion_r700012472
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java
##########
@@ -226,9 +230,21 @@ public static CuratorFramework
startCuratorFramework(Configuration configuration
}
CuratorFramework cf = curatorFrameworkBuilder.build();
-
+ // This handler is only used to handle the error during start phase,
and should be
+ // removed after start curator success.
+ UnhandledErrorListener unhandledErrorListener =
+ (message, throwable) -> {
+ LOG.error(
+ "Exiting process for unhandled error in start
curator framework, "
+ + "error message: {}, exiting code: {}",
+ message,
+ ZOOKEEPER_FAILURE_EXIT_CODE,
+ throwable);
+ System.exit(ZOOKEEPER_FAILURE_EXIT_CODE);
+ };
+ cf.getUnhandledErrorListenable().addListener(unhandledErrorListener);
Review comment:
Yes, I meant to only register this one failure handler and remove the
listener in `leaderElectionDriver` and `leaderRetrievalDriver`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]