You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by GitBox <gi...@apache.org> on 2020/06/24 19:57:20 UTC

[GitHub] [storm] bipinprasad commented on a change in pull request #3292: STORM-3656 handle worker NPE from Hadoop auto renewal thread

bipinprasad commented on a change in pull request #3292:
URL: https://github.com/apache/storm/pull/3292#discussion_r445136406



##########
File path: storm-client/src/jvm/org/apache/storm/utils/Utils.java
##########
@@ -1020,11 +1049,26 @@ public static UncaughtExceptionHandler createDefaultUncaughtExceptionHandler() {
             }
         };
     }
-    
+
+    public static UncaughtExceptionHandler createWorkerUncaughtExceptionHandler() {
+        return (thread, thrown) -> {
+            try {
+                handleWorkerUncaughtException(thrown);
+            } catch (Error err) {
+                LOG.error("Received error in thread {}.. terminating worker...", thread.getName(), err);
+                Runtime.getRuntime().exit(-2);

Review comment:
       Should this just rethrow a RuntimeException so it can be handled by the parent up the hierarchy (i.e. no catch block here).




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org