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 15:01:01 UTC

[GitHub] [storm] agresch opened a new pull request #3292: STORM-3656 handle worker NPE from Hadoop auto renewal thread

agresch opened a new pull request #3292:
URL: https://github.com/apache/storm/pull/3292


   ## What is the purpose of the change
   
   Prevent worker from dying from Hadoop auto renewal thread NPE while reducing use of reflection.
   
   ## How was the change tested
   
   Tested on our internal clusters by reducing TGT ticket lifetime and uploading credentials before auto renewal thread triggers.  Validated Hadoop exception is triggered and handled by the worker, allowing it to remain up.


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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
agresch commented on a change in pull request #3292:
URL: https://github.com/apache/storm/pull/3292#discussion_r445140225



##########
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:
       I was just following createDefaultUncaughtExceptionHandler().  If you feel this should change, I would prefer to work as a separate JIRA.




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



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

Posted by GitBox <gi...@apache.org>.
agresch commented on a change in pull request #3292:
URL: https://github.com/apache/storm/pull/3292#discussion_r445140225



##########
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:
       I was just following createDefaultUncaughtExceptionHandler().  If you feel this should change, I would prefer to work as a separate JIRA.




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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [storm] agresch merged pull request #3292: STORM-3656 handle worker NPE from Hadoop auto renewal thread

Posted by GitBox <gi...@apache.org>.
agresch merged pull request #3292:
URL: https://github.com/apache/storm/pull/3292


   


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