public class InMemoryMetaStore extends java.lang.Object implements MetaStore
MetaStore which stores the meta info in memory.
NOTE, because this implementation is memory based, the metadata is NOT persistent.
for tables which created, you need to create again every time you launch the
BeamSqlCli.
| Constructor and Description |
|---|
InMemoryMetaStore() |
| Modifier and Type | Method and Description |
|---|---|
BeamSqlTable |
buildBeamSqlTable(java.lang.String tableName)
Build the
BeamSqlTable for the specified table. |
void |
createTable(Table table)
create a table.
|
void |
dropTable(java.lang.String tableName)
drop a table.
|
Table |
getTable(java.lang.String tableName)
Get table with the specified name.
|
java.util.List<Table> |
listTables()
List all the tables.
|
void |
registerProvider(TableProvider provider)
Register a table provider.
|
public void createTable(Table table)
MetaStorecreateTable in interface MetaStorepublic void dropTable(java.lang.String tableName)
MetaStorepublic Table getTable(java.lang.String tableName)
MetaStorepublic java.util.List<Table> listTables()
MetaStorelistTables in interface MetaStorepublic BeamSqlTable buildBeamSqlTable(java.lang.String tableName)
MetaStoreBeamSqlTable for the specified table.buildBeamSqlTable in interface MetaStorepublic void registerProvider(TableProvider provider)
MetaStoreregisterProvider in interface MetaStore