You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by mm...@apache.org on 2022/01/26 18:49:57 UTC
[bookkeeper] branch master updated: Auditor should get the LegdgerManagerFactory from the client instance (#3011)
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 268c825 Auditor should get the LegdgerManagerFactory from the client instance (#3011)
268c825 is described below
commit 268c825ec9a1f0e61389189cc631d783e0c8081f
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Wed Jan 26 10:48:45 2022 -0800
Auditor should get the LegdgerManagerFactory from the client instance (#3011)
* Auditor should get the LegdgerManagerFactory from the client instance
* Removed unused import
---
.../src/main/java/org/apache/bookkeeper/replication/Auditor.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
index 8c69812..cd85145 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/replication/Auditor.java
@@ -89,7 +89,6 @@ import org.apache.bookkeeper.client.api.LedgerMetadata;
import org.apache.bookkeeper.common.concurrent.FutureUtils;
import org.apache.bookkeeper.conf.ClientConfiguration;
import org.apache.bookkeeper.conf.ServerConfiguration;
-import org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory;
import org.apache.bookkeeper.meta.LedgerManager;
import org.apache.bookkeeper.meta.LedgerManager.LedgerRange;
import org.apache.bookkeeper.meta.LedgerManager.LedgerRangeIterator;
@@ -480,10 +479,7 @@ public class Auditor implements AutoCloseable {
private void initialize(ServerConfiguration conf, BookKeeper bkc)
throws UnavailableException {
try {
- LedgerManagerFactory ledgerManagerFactory = AbstractZkLedgerManagerFactory
- .newLedgerManagerFactory(
- conf,
- bkc.getMetadataClientDriver().getLayoutManager());
+ LedgerManagerFactory ledgerManagerFactory = bkc.getLedgerManagerFactory();
ledgerManager = ledgerManagerFactory.newLedgerManager();
this.bookieLedgerIndexer = new BookieLedgerIndexer(ledgerManager);
@@ -503,7 +499,7 @@ public class Auditor implements AutoCloseable {
} catch (CompatibilityException ce) {
throw new UnavailableException(
"CompatibilityException while initializing Auditor", ce);
- } catch (IOException | KeeperException ioe) {
+ } catch (KeeperException ioe) {
throw new UnavailableException(
"Exception while initializing Auditor", ioe);
} catch (InterruptedException ie) {