You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ag...@apache.org on 2021/03/08 15:31:52 UTC

[storm] branch master updated: STORM-3749 improve logging for server error (#3384)

This is an automated email from the ASF dual-hosted git repository.

agresch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git


The following commit(s) were added to refs/heads/master by this push:
     new 0859cd1  STORM-3749 improve logging for server error (#3384)
0859cd1 is described below

commit 0859cd191715a09f5c84e781e3d0e3ca89e60654
Author: agresch <ag...@gmail.com>
AuthorDate: Mon Mar 8 09:31:39 2021 -0600

    STORM-3749 improve logging for server error (#3384)
    
    Co-authored-by: Aaron Gresch <ag...@yahoo-inc.com>
---
 .../jvm/org/apache/storm/messaging/netty/StormServerHandler.java    | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/storm-client/src/jvm/org/apache/storm/messaging/netty/StormServerHandler.java b/storm-client/src/jvm/org/apache/storm/messaging/netty/StormServerHandler.java
index 5cc5c05..0088395 100644
--- a/storm-client/src/jvm/org/apache/storm/messaging/netty/StormServerHandler.java
+++ b/storm-client/src/jvm/org/apache/storm/messaging/netty/StormServerHandler.java
@@ -16,7 +16,6 @@ import java.io.IOException;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.storm.shade.io.netty.channel.Channel;
 import org.apache.storm.shade.io.netty.channel.ChannelHandlerContext;
 import org.apache.storm.shade.io.netty.channel.ChannelInboundHandlerAdapter;
@@ -28,11 +27,9 @@ public class StormServerHandler extends ChannelInboundHandlerAdapter {
     private static final Logger LOG = LoggerFactory.getLogger(StormServerHandler.class);
     private static final Set<Class<?>> ALLOWED_EXCEPTIONS = new HashSet<>(Arrays.asList(new Class<?>[]{ IOException.class }));
     private final IServer server;
-    private final AtomicInteger failureCount;
 
     public StormServerHandler(IServer server) {
         this.server = server;
-        failureCount = new AtomicInteger(0);
     }
 
     @Override
@@ -51,14 +48,13 @@ public class StormServerHandler extends ChannelInboundHandlerAdapter {
             server.received(msg, channel.remoteAddress().toString(), channel);
         } catch (InterruptedException e) {
             LOG.info("failed to enqueue a request message", e);
-            failureCount.incrementAndGet();
         }
     }
 
     @Override
     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
         try {
-            LOG.error("server errors in handling the request", cause);
+            LOG.error("server errors in handling the request from {}", ctx.channel().remoteAddress().toString(), cause);
         } catch (Throwable err) {
             // Doing nothing (probably due to an oom issue) and hoping Utils.handleUncaughtException will handle it
         }