From c289c47c98307e20bdacbfe2f26d4655963c392f Mon Sep 17 00:00:00 2001 From: Kishor Patil Date: Thu, 19 Apr 2018 10:01:27 -0400 Subject: [PATCH 1/5] Adding exception stacktrace for executor failures in worker --- storm-client/src/jvm/org/apache/storm/utils/Utils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storm-client/src/jvm/org/apache/storm/utils/Utils.java b/storm-client/src/jvm/org/apache/storm/utils/Utils.java index f33f9ed85a4..369ae4800ca 100644 --- a/storm-client/src/jvm/org/apache/storm/utils/Utils.java +++ b/storm-client/src/jvm/org/apache/storm/utils/Utils.java @@ -109,6 +109,8 @@ import javax.security.auth.Subject; +import static org.apache.commons.lang.exception.ExceptionUtils.*; + public class Utils { public static final Logger LOG = LoggerFactory.getLogger(Utils.class); public static final String DEFAULT_STREAM_ID = "default"; @@ -361,6 +363,7 @@ public void run() { Time.sleep(s); } } catch (Throwable t) { + LOG.info("Async loop Exception Stacktrace is: {} ", getStackTrace(t)); if (Utils.exceptionCauseIsInstanceOf( InterruptedException.class, t)) { LOG.info("Async loop interrupted!"); From 4b8b46a9143fe2276ab11cc1787bf066faf91793 Mon Sep 17 00:00:00 2001 From: Kishor Patil Date: Thu, 19 Apr 2018 14:15:52 -0400 Subject: [PATCH 2/5] Fix import style issue --- storm-client/src/jvm/org/apache/storm/utils/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storm-client/src/jvm/org/apache/storm/utils/Utils.java b/storm-client/src/jvm/org/apache/storm/utils/Utils.java index 369ae4800ca..a0fcbd0615c 100644 --- a/storm-client/src/jvm/org/apache/storm/utils/Utils.java +++ b/storm-client/src/jvm/org/apache/storm/utils/Utils.java @@ -109,7 +109,7 @@ import javax.security.auth.Subject; -import static org.apache.commons.lang.exception.ExceptionUtils.*; +import static org.apache.commons.lang.exception.ExceptionUtils.getStackTrace; public class Utils { public static final Logger LOG = LoggerFactory.getLogger(Utils.class); From 5fb5727ea909b2a2aea3562ffd8744ccffc19055 Mon Sep 17 00:00:00 2001 From: Kishor Patil Date: Thu, 19 Apr 2018 14:16:19 -0400 Subject: [PATCH 3/5] Lower max allowed checkstyle violations on storm-client --- storm-client/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storm-client/pom.xml b/storm-client/pom.xml index 1311d2a8e13..bafbb68f856 100644 --- a/storm-client/pom.xml +++ b/storm-client/pom.xml @@ -274,7 +274,7 @@ **/generated/** - 10079 + 9767 From 39426ec14847614c8c98514e9140c4c352208b43 Mon Sep 17 00:00:00 2001 From: Kishor Patil Date: Thu, 19 Apr 2018 14:43:20 -0400 Subject: [PATCH 4/5] Address code review comments --- storm-client/src/jvm/org/apache/storm/utils/Utils.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/storm-client/src/jvm/org/apache/storm/utils/Utils.java b/storm-client/src/jvm/org/apache/storm/utils/Utils.java index a0fcbd0615c..42e7f56363c 100644 --- a/storm-client/src/jvm/org/apache/storm/utils/Utils.java +++ b/storm-client/src/jvm/org/apache/storm/utils/Utils.java @@ -109,8 +109,6 @@ import javax.security.auth.Subject; -import static org.apache.commons.lang.exception.ExceptionUtils.getStackTrace; - public class Utils { public static final Logger LOG = LoggerFactory.getLogger(Utils.class); public static final String DEFAULT_STREAM_ID = "default"; @@ -363,13 +361,12 @@ public void run() { Time.sleep(s); } } catch (Throwable t) { - LOG.info("Async loop Exception Stacktrace is: {} ", getStackTrace(t)); + LOG.error("Async loop died!", t); if (Utils.exceptionCauseIsInstanceOf( InterruptedException.class, t)) { LOG.info("Async loop interrupted!"); return; } - LOG.error("Async loop died!", t); throw new RuntimeException(t); } } From 401267093618c41864afdefc00b03b5dd8db9514 Mon Sep 17 00:00:00 2001 From: Kishor Patil Date: Sat, 21 Apr 2018 15:20:59 -0400 Subject: [PATCH 5/5] Add throwable to log --- .../src/jvm/org/apache/storm/utils/Utils.java | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/storm-client/src/jvm/org/apache/storm/utils/Utils.java b/storm-client/src/jvm/org/apache/storm/utils/Utils.java index 42e7f56363c..e56beb1b6cb 100644 --- a/storm-client/src/jvm/org/apache/storm/utils/Utils.java +++ b/storm-client/src/jvm/org/apache/storm/utils/Utils.java @@ -18,6 +18,11 @@ package org.apache.storm.utils; +import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.Lists; +import com.google.common.collect.MapDifference; +import com.google.common.collect.MapDifference.ValueDifference; +import com.google.common.collect.Maps; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -57,7 +62,6 @@ import java.util.TreeMap; import java.util.UUID; import java.util.concurrent.Callable; -import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -65,12 +69,7 @@ import java.util.zip.GZIPOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; - -import com.google.common.collect.Lists; -import com.google.common.collect.MapDifference; -import com.google.common.collect.MapDifference.ValueDifference; -import com.google.common.collect.Maps; - +import javax.security.auth.Subject; import org.apache.commons.io.FileUtils; import org.apache.commons.io.input.ClassLoaderObjectInputStream; import org.apache.storm.Config; @@ -105,10 +104,6 @@ import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.SafeConstructor; -import com.google.common.annotations.VisibleForTesting; - -import javax.security.auth.Subject; - public class Utils { public static final Logger LOG = LoggerFactory.getLogger(Utils.class); public static final String DEFAULT_STREAM_ID = "default"; @@ -361,12 +356,12 @@ public void run() { Time.sleep(s); } } catch (Throwable t) { - LOG.error("Async loop died!", t); if (Utils.exceptionCauseIsInstanceOf( InterruptedException.class, t)) { - LOG.info("Async loop interrupted!"); + LOG.error("Async loop interrupted!", t); return; } + LOG.error("Async loop died!", t); throw new RuntimeException(t); } }