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/03/21 20:22:09 UTC
[bookkeeper] 01/02: 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 branch-4.14
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
commit 43397dcfdb1a48b109629dbb84c102609eebdca3
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 2c61de3..38a8e39 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) {