Package org.apache.bookkeeper.metastore
Class InMemoryMetaStore
java.lang.Object
org.apache.bookkeeper.metastore.InMemoryMetaStore
- All Implemented Interfaces:
MetaStore
An in-memory implementation of the MetaStore interface.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static Map<String,InMemoryMetastoreTable> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the meta store.createScannableTable(String name) Create a scannable metastore table.createTable(String name) Create a metastore table.getName()Return the name of the plugin.intGet the plugin version.voidinit(org.apache.commons.configuration2.Configuration conf, int msVersion) Initialize the meta store.static voidreset()
-
Field Details
-
CUR_VERSION
static final int CUR_VERSION- See Also:
-
tables
-
-
Constructor Details
-
InMemoryMetaStore
public InMemoryMetaStore()
-
-
Method Details
-
reset
public static void reset() -
getName
Description copied from interface:MetaStoreReturn the name of the plugin. -
getVersion
public int getVersion()Description copied from interface:MetaStoreGet the plugin version.- Specified by:
getVersionin interfaceMetaStore- Returns:
- the plugin version.
-
init
public void init(org.apache.commons.configuration2.Configuration conf, int msVersion) throws MetastoreException Description copied from interface:MetaStoreInitialize the meta store.- Specified by:
initin interfaceMetaStore- Parameters:
conf- Configuration object passed to metastoremsVersion- Version to initialize the metastore- Throws:
MetastoreException- when failed to initialize
-
close
public void close()Description copied from interface:MetaStoreClose the meta store. -
createTable
Description copied from interface:MetaStoreCreate a metastore table.- Specified by:
createTablein interfaceMetaStore- Parameters:
name- Table name.- Returns:
- a metastore table
-
createScannableTable
Description copied from interface:MetaStoreCreate a scannable metastore table.- Specified by:
createScannableTablein interfaceMetaStore- Parameters:
name- Table name.- Returns:
- a metastore scannable table
-