Package org.apache.bookkeeper.meta
Class MSLedgerManagerFactory
java.lang.Object
org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory
org.apache.bookkeeper.meta.MSLedgerManagerFactory
- All Implemented Interfaces:
AutoCloseable,LedgerManagerFactory
Deprecated.
since 4.7.0
MetaStore Based Ledger Manager Factory.
MSLedgerManagerFactory is a legacy abstraction that mixing zookeeper with a metadata store interface. It is not used by any production systems. It should be deprecated soon.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classDeprecated.(package private) static classDeprecated. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) AbstractConfigurationDeprecated.static final intDeprecated.static final StringDeprecated.(package private) MetaStoreDeprecated.static final StringDeprecated.static final StringDeprecated.Fields inherited from class org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory
V1, zk -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Uninitialize the factory.entries2Ledgers(Iterator<MetastoreTableItem> entries) Deprecated.voidformat(AbstractConfiguration<?> conf, LayoutManager layoutManager) Deprecated.Format the ledger metadata for LedgerManager.intDeprecated.Return current factory version.initialize(AbstractConfiguration conf, LayoutManager layoutManager, int factoryVersion) Deprecated.Initialize a factory.(package private) static Longkey2LedgerId(String key) Deprecated.(package private) static StringledgerId2Key(Long lid) Deprecated.Deprecated.Return a ledger auditor manager, which is used to coordinate the auto-recovery process.Deprecated.Return the ledger id generator, which is used for global unique ledger id generation.Deprecated.return ledger manager for client-side to manage ledger metadata.Deprecated.Return a ledger underreplication manager, which is used to mark ledgers as unreplicated, and to retrieve a ledger which is underreplicated so that it can be rereplicated.(package private) static StringrangeToString(Long firstLedger, boolean firstInclusive, Long lastLedger, boolean lastInclusive) Deprecated.booleanvalidateAndNukeExistingCluster(AbstractConfiguration<?> conf, LayoutManager layoutManager) Deprecated.This method makes sure there are no unexpected znodes under ledgersRootPath and then it proceeds with ledger metadata formatting and nuking the cluster ZK state info.Methods inherited from class org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory
createNewLMFactory, newLedgerManagerFactory
-
Field Details
-
CUR_VERSION
public static final int CUR_VERSIONDeprecated.- See Also:
-
NAME
Deprecated.- See Also:
-
TABLE_NAME
Deprecated.- See Also:
-
META_FIELD
Deprecated.- See Also:
-
conf
Deprecated. -
metastore
MetaStore metastoreDeprecated.
-
-
Constructor Details
-
MSLedgerManagerFactory
public MSLedgerManagerFactory()Deprecated.
-
-
Method Details
-
getCurrentVersion
public int getCurrentVersion()Deprecated.Description copied from interface:LedgerManagerFactoryReturn current factory version.- Returns:
- current version used by factory.
-
initialize
public LedgerManagerFactory initialize(AbstractConfiguration conf, LayoutManager layoutManager, int factoryVersion) throws IOException Deprecated.Description copied from interface:LedgerManagerFactoryInitialize a factory.- Parameters:
conf- Configuration object used to initialize factorylayoutManager- Layout manager used for initialize ledger manager factoryfactoryVersion- What version used to initialize factory.- Returns:
- ledger manager factory instance
- Throws:
IOException- when fail to initialize the factory.
-
close
Deprecated.Description copied from interface:LedgerManagerFactoryUninitialize the factory.- Throws:
IOException- when fail to uninitialize the factory.
-
key2LedgerId
Deprecated. -
ledgerId2Key
Deprecated. -
rangeToString
static String rangeToString(Long firstLedger, boolean firstInclusive, Long lastLedger, boolean lastInclusive) Deprecated. -
entries2Ledgers
Deprecated. -
newLedgerIdGenerator
Deprecated.Description copied from interface:LedgerManagerFactoryReturn the ledger id generator, which is used for global unique ledger id generation.- Returns:
- ledger id generator.
-
newLedgerManager
Deprecated.Description copied from interface:LedgerManagerFactoryreturn ledger manager for client-side to manage ledger metadata.- Returns:
- ledger manager
- See Also:
-
newLedgerUnderreplicationManager
public LedgerUnderreplicationManager newLedgerUnderreplicationManager() throws ReplicationException.UnavailableException, InterruptedException, ReplicationException.CompatibilityExceptionDeprecated.Description copied from interface:LedgerManagerFactoryReturn a ledger underreplication manager, which is used to mark ledgers as unreplicated, and to retrieve a ledger which is underreplicated so that it can be rereplicated.- Returns:
- ledger underreplication manager
- Throws:
ReplicationException.UnavailableExceptionInterruptedExceptionReplicationException.CompatibilityException- See Also:
-
format
public void format(AbstractConfiguration<?> conf, LayoutManager layoutManager) throws InterruptedException, org.apache.zookeeper.KeeperException, IOException Deprecated.Description copied from interface:LedgerManagerFactoryFormat the ledger metadata for LedgerManager.- Specified by:
formatin interfaceLedgerManagerFactory- Overrides:
formatin classAbstractZkLedgerManagerFactory- Parameters:
conf- Configuration instancelayoutManager- Layout manager- Throws:
InterruptedExceptionorg.apache.zookeeper.KeeperExceptionIOException
-
validateAndNukeExistingCluster
public boolean validateAndNukeExistingCluster(AbstractConfiguration<?> conf, LayoutManager layoutManager) throws InterruptedException, org.apache.zookeeper.KeeperException, IOException Deprecated.Description copied from interface:LedgerManagerFactoryThis method makes sure there are no unexpected znodes under ledgersRootPath and then it proceeds with ledger metadata formatting and nuking the cluster ZK state info.- Specified by:
validateAndNukeExistingClusterin interfaceLedgerManagerFactory- Overrides:
validateAndNukeExistingClusterin classAbstractZkLedgerManagerFactory- Parameters:
conf- Configuration instancelayoutManager- Layout manager- Throws:
InterruptedExceptionorg.apache.zookeeper.KeeperExceptionIOException
-
newLedgerAuditorManager
Deprecated.Description copied from interface:LedgerManagerFactoryReturn a ledger auditor manager, which is used to coordinate the auto-recovery process.- Returns:
- ledger auditor manager
- See Also:
-