Package org.apache.bookkeeper.meta
Class MSLedgerManagerFactory
- java.lang.Object
-
- org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory
-
- org.apache.bookkeeper.meta.MSLedgerManagerFactory
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,LedgerManagerFactory
public class MSLedgerManagerFactory extends AbstractZkLedgerManagerFactory
Deprecated.since 4.7.0MetaStore 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 Classes Modifier and Type Class Description (package private) static class
MSLedgerManagerFactory.MsLedgerManager
Deprecated.(package private) static class
MSLedgerManagerFactory.SyncResult<T>
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description (package private) AbstractConfiguration
conf
Deprecated.static int
CUR_VERSION
Deprecated.static java.lang.String
META_FIELD
Deprecated.(package private) MetaStore
metastore
Deprecated.static java.lang.String
NAME
Deprecated.static java.lang.String
TABLE_NAME
Deprecated.-
Fields inherited from class org.apache.bookkeeper.meta.AbstractZkLedgerManagerFactory
V1, zk
-
-
Constructor Summary
Constructors Constructor Description MSLedgerManagerFactory()
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.Uninitialize the factory.(package private) static java.util.SortedSet<java.lang.Long>
entries2Ledgers(java.util.Iterator<MetastoreTableItem> entries)
Deprecated.void
format(AbstractConfiguration<?> conf, LayoutManager layoutManager)
Deprecated.Format the ledger metadata for LedgerManager.int
getCurrentVersion()
Deprecated.Return current factory version.LedgerManagerFactory
initialize(AbstractConfiguration conf, LayoutManager layoutManager, int factoryVersion)
Deprecated.Initialize a factory.(package private) static java.lang.Long
key2LedgerId(java.lang.String key)
Deprecated.(package private) static java.lang.String
ledgerId2Key(java.lang.Long lid)
Deprecated.LedgerAuditorManager
newLedgerAuditorManager()
Deprecated.Return a ledger auditor manager, which is used to coordinate the auto-recovery process.LedgerIdGenerator
newLedgerIdGenerator()
Deprecated.Return the ledger id generator, which is used for global unique ledger id generation.LedgerManager
newLedgerManager()
Deprecated.return ledger manager for client-side to manage ledger metadata.LedgerUnderreplicationManager
newLedgerUnderreplicationManager()
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 java.lang.String
rangeToString(java.lang.Long firstLedger, boolean firstInclusive, java.lang.Long lastLedger, boolean lastInclusive)
Deprecated.boolean
validateAndNukeExistingCluster(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 Detail
-
CUR_VERSION
public static final int CUR_VERSION
Deprecated.- See Also:
- Constant Field Values
-
NAME
public static final java.lang.String NAME
Deprecated.- See Also:
- Constant Field Values
-
TABLE_NAME
public static final java.lang.String TABLE_NAME
Deprecated.- See Also:
- Constant Field Values
-
META_FIELD
public static final java.lang.String META_FIELD
Deprecated.- See Also:
- Constant Field Values
-
conf
AbstractConfiguration conf
Deprecated.
-
metastore
MetaStore metastore
Deprecated.
-
-
Method Detail
-
getCurrentVersion
public int getCurrentVersion()
Deprecated.Description copied from interface:LedgerManagerFactory
Return current factory version.- Returns:
- current version used by factory.
-
initialize
public LedgerManagerFactory initialize(AbstractConfiguration conf, LayoutManager layoutManager, int factoryVersion) throws java.io.IOException
Deprecated.Description copied from interface:LedgerManagerFactory
Initialize 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:
java.io.IOException
- when fail to initialize the factory.
-
close
public void close() throws java.io.IOException
Deprecated.Description copied from interface:LedgerManagerFactory
Uninitialize the factory.- Throws:
java.io.IOException
- when fail to uninitialize the factory.
-
key2LedgerId
static java.lang.Long key2LedgerId(java.lang.String key)
Deprecated.
-
ledgerId2Key
static java.lang.String ledgerId2Key(java.lang.Long lid)
Deprecated.
-
rangeToString
static java.lang.String rangeToString(java.lang.Long firstLedger, boolean firstInclusive, java.lang.Long lastLedger, boolean lastInclusive)
Deprecated.
-
entries2Ledgers
static java.util.SortedSet<java.lang.Long> entries2Ledgers(java.util.Iterator<MetastoreTableItem> entries)
Deprecated.
-
newLedgerIdGenerator
public LedgerIdGenerator newLedgerIdGenerator()
Deprecated.Description copied from interface:LedgerManagerFactory
Return the ledger id generator, which is used for global unique ledger id generation.- Returns:
- ledger id generator.
-
newLedgerManager
public LedgerManager newLedgerManager()
Deprecated.Description copied from interface:LedgerManagerFactory
return ledger manager for client-side to manage ledger metadata.- Returns:
- ledger manager
- See Also:
LedgerManager
-
newLedgerUnderreplicationManager
public LedgerUnderreplicationManager newLedgerUnderreplicationManager() throws ReplicationException.UnavailableException, java.lang.InterruptedException, ReplicationException.CompatibilityException
Deprecated.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.- Returns:
- ledger underreplication manager
- Throws:
ReplicationException.UnavailableException
java.lang.InterruptedException
ReplicationException.CompatibilityException
- See Also:
LedgerUnderreplicationManager
-
format
public void format(AbstractConfiguration<?> conf, LayoutManager layoutManager) throws java.lang.InterruptedException, org.apache.zookeeper.KeeperException, java.io.IOException
Deprecated.Description copied from interface:LedgerManagerFactory
Format the ledger metadata for LedgerManager.- Specified by:
format
in interfaceLedgerManagerFactory
- Overrides:
format
in classAbstractZkLedgerManagerFactory
- Parameters:
conf
- Configuration instancelayoutManager
- Layout manager- Throws:
java.lang.InterruptedException
org.apache.zookeeper.KeeperException
java.io.IOException
-
validateAndNukeExistingCluster
public boolean validateAndNukeExistingCluster(AbstractConfiguration<?> conf, LayoutManager layoutManager) throws java.lang.InterruptedException, org.apache.zookeeper.KeeperException, java.io.IOException
Deprecated.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
- Overrides:
validateAndNukeExistingCluster
in classAbstractZkLedgerManagerFactory
- Parameters:
conf
- Configuration instancelayoutManager
- Layout manager- Throws:
java.lang.InterruptedException
org.apache.zookeeper.KeeperException
java.io.IOException
-
newLedgerAuditorManager
public LedgerAuditorManager newLedgerAuditorManager()
Deprecated.Description copied from interface:LedgerManagerFactory
Return a ledger auditor manager, which is used to coordinate the auto-recovery process.- Returns:
- ledger auditor manager
- See Also:
LedgerAuditorManager
-
-