merlimat closed pull request #1179: Avoid printing exception stack trace on
lookup connection failures
URL: https://github.com/apache/incubator-pulsar/pull/1179
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java
index 9f5338d6a..8ad14ccb4 100644
---
a/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java
+++
b/pulsar-client/src/main/java/org/apache/pulsar/client/impl/BinaryProtoLookupService.java
@@ -22,6 +22,7 @@
import java.net.InetSocketAddress;
import java.net.URI;
+import java.nio.channels.ClosedChannelException;
import java.util.concurrent.CompletableFuture;
import org.apache.commons.lang3.tuple.Pair;
@@ -131,7 +132,7 @@ public BinaryProtoLookupService(PulsarClientImpl client,
String serviceUrl, bool
}).exceptionally((sendException) -> {
// lookup failed
log.warn("[{}] failed to send lookup request : {}",
destination.toString(), sendException.getMessage(),
- sendException);
+ sendException instanceof ClosedChannelException ? null
: sendException);
addressFuture.completeExceptionally(sendException);
return null;
});
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services