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



##########
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");
+              } else if (!"Channel 
disconnected".equals(channelException.getMessage())) {
+                // for 'Channel Disconnected', there's no need to log the 
error message
+                // because the underlying http client has already log this 
kind of message
+                LOG.error(e, "");
+              }

Review comment:
       In this case, `e.getMessages` returns "Channel disconnected", so the 
   ```
   LOG.error("Channel disconnected: " + e.getMessage());
   ```
   outputs a text as 'Channel disconnected: Channel disconnected'.
   
   I would change this line to ```LOG.error(e.getMessage());```




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to