You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2021/01/13 08:37:50 UTC

[GitHub] [bookkeeper] zymap opened a new pull request #2534: Remove the annoying logging stack

zymap opened a new pull request #2534:
URL: https://github.com/apache/bookkeeper/pull/2534


   ### Motivation
   
   Remove the annoying logging stack. Keep it clear.
   
   ```
   rg.apache.bookkeeper.client.DefaultBookieAddressResolver - Resolving dummy bookie Id  using legacy bookie resolver
   org.apache.bookkeeper.client.BKException$BKBookieHandleNotAvailableException: Bookie handle is not available
   	at org.apache.bookkeeper.discover.ZKRegistrationClient.getBookieServiceInfo(ZKRegistrationClient.java:248) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0]
   	at org.apache.bookkeeper.client.DefaultBookieAddressResolver.resolve(DefaultBookieAddressResolver.java:43) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0]
   	at org.apache.bookkeeper.client.TopologyAwareEnsemblePlacementPolicy.resolveNetworkLocation(TopologyAwareEnsemblePlacementPolicy.java:789) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0]
   	at org.apache.bookkeeper.client.RegionAwareEnsemblePlacementPolicy.getRegion(RegionAwareEnsemblePlacementPolicy.java:90) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0]
   	at org.apache.bookkeeper.client.RegionAwareEnsemblePlacementPolicy.getLocalRegion(RegionAwareEnsemblePlacementPolicy.java:110) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0]
   	at org.apache.bookkeeper.client.RegionAwareEnsemblePlacementPolicy.initialize(RegionAwareEnsemblePlacementPolicy.java:173) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0]
   	at org.apache.bookkeeper.client.RegionAwareEnsemblePlacementPolicy.initialize(RegionAwareEnsemblePlacementPolicy.java:53) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0]
   	at org.apache.bookkeeper.client.BookKeeper.initializeEnsemblePlacementPolicy(BookKeeper.java:580) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0]
   	at org.apache.bookkeeper.client.BookKeeper.<init>(BookKeeper.java:504) ~[org.apache.bookkeeper-bookkeeper-server-4.12.0.jar:4.12.0]
   ```


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



[GitHub] [bookkeeper] zymap closed pull request #2534: Remove the annoying logging stack

Posted by GitBox <gi...@apache.org>.
zymap closed pull request #2534:
URL: https://github.com/apache/bookkeeper/pull/2534


   


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



[GitHub] [bookkeeper] eolivelli commented on a change in pull request #2534: Remove the annoying logging stack

Posted by GitBox <gi...@apache.org>.
eolivelli commented on a change in pull request #2534:
URL: https://github.com/apache/bookkeeper/pull/2534#discussion_r556349676



##########
File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/DefaultBookieAddressResolver.java
##########
@@ -56,16 +56,16 @@ public BookieSocketAddress resolve(BookieId bookieId) {
             return res;
         } catch (BKException.BKBookieHandleNotAvailableException ex) {
             if (BookieSocketAddress.isDummyBookieIdForHostname(bookieId)) {
-                log.info("Resolving dummy bookie Id {} using legacy bookie resolver", bookieId, ex);
+                log.info("Resolving dummy bookie Id {} using legacy bookie resolver. {}", bookieId, ex.getMessage());
                 return BookieSocketAddress.resolveDummyBookieId(bookieId);
             }
-            log.info("Cannot resolve {}, bookie is unknown", bookieId, ex);
+            log.info("Cannot resolve {}, bookie is unknown. {}", bookieId, ex.getMessage());
             throw new BookieIdNotResolvedException(bookieId, ex);
         } catch (Exception ex) {
             if (ex instanceof InterruptedException) {
                 Thread.currentThread().interrupt();
             }
-            log.info("Cannot resolve {} ", bookieId, ex);
+            log.info("Cannot resolve {}. {} ", bookieId, ex.getMessage());

Review comment:
       Here we should keep the full stacktrace, this is an unexpected condition




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



[GitHub] [bookkeeper] zymap commented on pull request #2534: Remove the annoying logging stack

Posted by GitBox <gi...@apache.org>.
zymap commented on pull request #2534:
URL: https://github.com/apache/bookkeeper/pull/2534#issuecomment-759300056


   @eolivelli  Thanks. I will close my PR.


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