You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/03/11 01:30:26 UTC

[GitHub] [druid] FrankChen021 commented on a change in pull request #10955: Improve exception handling in IT to reduce excessive stack trace messages

FrankChen021 commented on a change in pull request #10955:
URL: https://github.com/apache/druid/pull/10955#discussion_r592001171



##########
File path: integration-tests/src/main/java/org/apache/druid/testing/utils/DruidClusterAdminClient.java
##########
@@ -185,7 +187,23 @@ private void waitUntilInstanceReady(final String host)
             return response.getStatus().equals(HttpResponseStatus.OK);
           }
           catch (Throwable e) {
-            LOG.error(e, "");
+            //
+            // supress logging for some specific exceptions to reduce excessive stack trace messages when waiting druid nodes to start up
+            //
+            if (e.getCause() instanceof ChannelException) {
+              Throwable channelException = e.getCause();
+
+              if (channelException.getCause() instanceof ClosedChannelException) {
+                LOG.error("Channel Closed");

Review comment:
       `ClosedChannelException` class has no constructor to accept message parameter, so `getMessage` call here outputs `null`
   ```
   public class ClosedChannelException
       extends java.io.IOException
   {
   
       private static final long serialVersionUID = 882777185433553857L;
   
       /**
        * Constructs an instance of this class.
        */
       public ClosedChannelException() { }
   
   }
   ```




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org