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 void
close()
Uninitialize the factory.void
format(AbstractConfiguration<?> conf, LayoutManager lm)
Format the ledger metadata for LedgerManager.int
getCurrentVersion()
Return current factory version.LedgerManagerFactory
initialize(AbstractConfiguration conf, LayoutManager layoutManager, int factoryVersion)
Initialize a factory.LedgerAuditorManager
newLedgerAuditorManager()
Return a ledger auditor manager, which is used to coordinate the auto-recovery process.LedgerIdGenerator
newLedgerIdGenerator()
Return the ledger id generator, which is used for global unique ledger id generation.LedgerManager
newLedgerManager()
return ledger manager for client-side to manage ledger metadata.LedgerUnderreplicationManager
newLedgerUnderreplicationManager()
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.boolean
validateAndNukeExistingCluster(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:LedgerManagerFactory
Return current factory version.- Specified by:
getCurrentVersion
in interfaceLedgerManagerFactory
- Returns:
- current version used by factory.
-
initialize
public LedgerManagerFactory initialize(AbstractConfiguration conf, LayoutManager layoutManager, int factoryVersion)
Description copied from interface:LedgerManagerFactory
Initialize a factory.- Specified by:
initialize
in 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:LedgerManagerFactory
Uninitialize the factory.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceLedgerManagerFactory
-
newLedgerIdGenerator
public LedgerIdGenerator newLedgerIdGenerator()
Description copied from interface:LedgerManagerFactory
Return the ledger id generator, which is used for global unique ledger id generation.- Specified by:
newLedgerIdGenerator
in interfaceLedgerManagerFactory
- Returns:
- ledger id generator.
-
newLedgerManager
public LedgerManager newLedgerManager()
Description copied from interface:LedgerManagerFactory
return ledger manager for client-side to manage ledger metadata.- Specified by:
newLedgerManager
in interfaceLedgerManagerFactory
- Returns:
- ledger manager
- See Also:
LedgerManager
-
newLedgerUnderreplicationManager
public LedgerUnderreplicationManager newLedgerUnderreplicationManager()
Description copied from interface:LedgerManagerFactory
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.- Specified by:
newLedgerUnderreplicationManager
in interfaceLedgerManagerFactory
- Returns:
- ledger underreplication manager
- See Also:
LedgerUnderreplicationManager
-
newLedgerAuditorManager
public LedgerAuditorManager newLedgerAuditorManager() throws java.io.IOException, java.lang.InterruptedException
Description copied from interface:LedgerManagerFactory
Return a ledger auditor manager, which is used to coordinate the auto-recovery process.- Specified by:
newLedgerAuditorManager
in interfaceLedgerManagerFactory
- Returns:
- ledger auditor manager
- Throws:
java.io.IOException
java.lang.InterruptedException
- See Also:
LedgerAuditorManager
-
format
public void format(AbstractConfiguration<?> conf, LayoutManager lm)
Description copied from interface:LedgerManagerFactory
Format the ledger metadata for LedgerManager.- Specified by:
format
in interfaceLedgerManagerFactory
- Parameters:
conf
- Configuration instancelm
- Layout manager
-
validateAndNukeExistingCluster
public boolean validateAndNukeExistingCluster(AbstractConfiguration<?> conf, LayoutManager lm)
Description copied from interface:LedgerManagerFactory
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.- Specified by:
validateAndNukeExistingCluster
in interfaceLedgerManagerFactory
- Parameters:
conf
- Configuration instancelm
- Layout manager
-
-