Package org.apache.bookkeeper.meta
Class NullMetadataBookieDriver.NullLedgerManagerFactory
- java.lang.Object
-
- org.apache.bookkeeper.meta.NullMetadataBookieDriver.NullLedgerManagerFactory
-
- All Implemented Interfaces:
java.lang.AutoCloseable,LedgerManagerFactory
- Enclosing class:
- NullMetadataBookieDriver
public static class NullMetadataBookieDriver.NullLedgerManagerFactory extends java.lang.Object implements LedgerManagerFactory
A no-op implementation of LedgerManagerFactory.
-
-
Constructor Summary
Constructors Constructor Description NullLedgerManagerFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Uninitialize the factory.voidformat(AbstractConfiguration<?> conf, LayoutManager lm)Format the ledger metadata for LedgerManager.intgetCurrentVersion()Return current factory version.LedgerManagerFactoryinitialize(AbstractConfiguration conf, LayoutManager layoutManager, int factoryVersion)Initialize a factory.LedgerAuditorManagernewLedgerAuditorManager()Return a ledger auditor manager, which is used to coordinate the auto-recovery process.LedgerIdGeneratornewLedgerIdGenerator()Return the ledger id generator, which is used for global unique ledger id generation.LedgerManagernewLedgerManager()return ledger manager for client-side to manage ledger metadata.LedgerUnderreplicationManagernewLedgerUnderreplicationManager()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.booleanvalidateAndNukeExistingCluster(AbstractConfiguration<?> conf, LayoutManager lm)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.
-
-
-
Method Detail
-
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 interfacejava.lang.AutoCloseable- Specified by:
closein interfaceLedgerManagerFactory
-
newLedgerIdGenerator
public LedgerIdGenerator 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
public LedgerManager newLedgerManager()
Description copied from interface:LedgerManagerFactoryreturn ledger manager for client-side to manage ledger metadata.- Specified by:
newLedgerManagerin interfaceLedgerManagerFactory- Returns:
- ledger manager
- See Also:
LedgerManager
-
newLedgerUnderreplicationManager
public LedgerUnderreplicationManager 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:
LedgerUnderreplicationManager
-
newLedgerAuditorManager
public LedgerAuditorManager newLedgerAuditorManager() throws java.io.IOException, java.lang.InterruptedException
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:
java.io.IOExceptionjava.lang.InterruptedException- See Also:
LedgerAuditorManager
-
format
public void format(AbstractConfiguration<?> conf, LayoutManager lm)
Description copied from interface:LedgerManagerFactoryFormat the ledger metadata for LedgerManager.- Specified by:
formatin interfaceLedgerManagerFactory- Parameters:
conf- Configuration instancelm- Layout manager
-
validateAndNukeExistingCluster
public boolean validateAndNukeExistingCluster(AbstractConfiguration<?> conf, LayoutManager lm)
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
-
-