Package org.apache.bookkeeper.meta
Class NullMetadataBookieDriver.NullLedgerManagerFactory
java.lang.Object
org.apache.bookkeeper.meta.NullMetadataBookieDriver.NullLedgerManagerFactory
- All Implemented Interfaces:
AutoCloseable,LedgerManagerFactory
- Enclosing class:
- NullMetadataBookieDriver
public static class NullMetadataBookieDriver.NullLedgerManagerFactory
extends Object
implements LedgerManagerFactory
A no-op implementation of LedgerManagerFactory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Uninitialize the factory.voidformat(AbstractConfiguration<?> conf, LayoutManager lm) Format the ledger metadata for LedgerManager.intReturn current factory version.initialize(AbstractConfiguration conf, LayoutManager layoutManager, int factoryVersion) Initialize a factory.Return a ledger auditor manager, which is used to coordinate the auto-recovery process.Return the ledger id generator, which is used for global unique ledger id generation.return ledger manager for client-side to manage ledger metadata.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.booleanThis 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.
-
Constructor Details
-
NullLedgerManagerFactory
public NullLedgerManagerFactory()
-
-
Method Details
-
getCurrentVersion
public int getCurrentVersion()Description copied from interface:LedgerManagerFactoryReturn current factory version.- Specified by:
getCurrentVersionin interfaceLedgerManagerFactory- Returns:
- current version used by factory.
-
initialize
public LedgerManagerFactory initialize(AbstractConfiguration conf, LayoutManager layoutManager, int factoryVersion) Description copied from interface:LedgerManagerFactoryInitialize a factory.- Specified by:
initializein interfaceLedgerManagerFactory- 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
-
close
public void close()Description copied from interface:LedgerManagerFactoryUninitialize the factory.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceLedgerManagerFactory
-
newLedgerIdGenerator
Description copied from interface:LedgerManagerFactoryReturn the ledger id generator, which is used for global unique ledger id generation.- Specified by:
newLedgerIdGeneratorin interfaceLedgerManagerFactory- Returns:
- ledger id generator.
-
newLedgerManager
Description copied from interface:LedgerManagerFactoryreturn ledger manager for client-side to manage ledger metadata.- Specified by:
newLedgerManagerin interfaceLedgerManagerFactory- Returns:
- ledger manager
- See Also:
-
newLedgerUnderreplicationManager
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.- Specified by:
newLedgerUnderreplicationManagerin interfaceLedgerManagerFactory- Returns:
- ledger underreplication manager
- See Also:
-
newLedgerAuditorManager
Description copied from interface:LedgerManagerFactoryReturn a ledger auditor manager, which is used to coordinate the auto-recovery process.- Specified by:
newLedgerAuditorManagerin interfaceLedgerManagerFactory- Returns:
- ledger auditor manager
- Throws:
IOExceptionInterruptedException- See Also:
-
format
Description copied from interface:LedgerManagerFactoryFormat the ledger metadata for LedgerManager.- Specified by:
formatin interfaceLedgerManagerFactory- Parameters:
conf- Configuration instancelm- Layout manager
-
validateAndNukeExistingCluster
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- Parameters:
conf- Configuration instancelm- Layout manager
-