Aitozi commented on a change in pull request #17053:
URL: https://github.com/apache/flink/pull/17053#discussion_r699104914



##########
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);

Review comment:
       Now I just call `System.exit()` here. Another option I think we can 
throw exception here, let it be handled in entryPoint. What's your idea? 
@tillrohrmann 




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


Reply via email to