suneet-s commented on a change in pull request #10955:
URL: https://github.com/apache/druid/pull/10955#discussion_r591963997
##########
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:
I think this is easier to read, and a single line log message shouldn't
add too much noise to the logs, but it is still a marker that says the channel
disconnected
```suggestion
} else if ("Channel
disconnected".equals(channelException.getMessage())) {
LOG.error("Channel disconnected: " + e.getMessage());
} else {
LOG.error(e, "");
}
```
##########
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:
I think we should log the message just incase there is some interesting
information in there. `getMessage()` should only be 1 line
```suggestion
LOG.error("Channel Closed " + 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]