ivankelly commented on a change in pull request #1192: BP-29 (task 3): use
metadata service uri for constructing registration client
URL: https://github.com/apache/bookkeeper/pull/1192#discussion_r170570826
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeper.java
##########
@@ -525,9 +532,9 @@ public BookKeeper(ClientConfiguration conf, ZooKeeper zk,
EventLoopGroup eventLo
// initialize ledger manager
try {
this.ledgerManagerFactory =
- AbstractZkLedgerManagerFactory.newLedgerManagerFactory(conf,
regClient.getLayoutManager());
- } catch (IOException | InterruptedException e) {
- throw e;
+ this.metadataDriver.getLedgerManagerFactory();
Review comment:
As with regClient. We don't need a member field for ledgerManagerFactory, as
it is owned by the metadataDriver, so metadataDriver should clean up. Either
that, or metadataDriver should be a pure factory and not hold a reference to
ledgerManagerFactory and regClient, but as they likely rely on a shared
resource (zk client?) it's probably better to just let metadataDriver own all.
----------------------------------------------------------------
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