@AutoService(value=TableProvider.class) public class TestTableProvider extends InMemoryMetaTableProvider
Keeps global state and tracks class instances. Works only in DirectRunner.
Modifier and Type | Class and Description |
---|---|
static class |
TestTableProvider.TableWithRows
TableWitRows.
|
Constructor and Description |
---|
TestTableProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addRows(java.lang.String tableName,
Row... rows) |
BeamSqlTable |
buildBeamSqlTable(Table table)
Build a
BeamSqlTable using the given table meta info. |
void |
createTable(Table table)
Creates a table.
|
void |
dropTable(java.lang.String tableName)
Drops a table.
|
java.util.Map<java.lang.String,Table> |
getTables()
Get all tables from this provider.
|
java.lang.String |
getTableType()
Gets the table type this provider handles.
|
java.util.List<Row> |
tableRows(java.lang.String tableName) |
java.util.Map<java.lang.String,TestTableProvider.TableWithRows> |
tables() |
public java.lang.String getTableType()
TableProvider
public java.util.Map<java.lang.String,TestTableProvider.TableWithRows> tables()
public void createTable(Table table)
TableProvider
createTable
in interface TableProvider
createTable
in class InMemoryMetaTableProvider
public void dropTable(java.lang.String tableName)
TableProvider
dropTable
in interface TableProvider
dropTable
in class InMemoryMetaTableProvider
public java.util.Map<java.lang.String,Table> getTables()
TableProvider
getTables
in interface TableProvider
getTables
in class InMemoryMetaTableProvider
public BeamSqlTable buildBeamSqlTable(Table table)
TableProvider
BeamSqlTable
using the given table meta info.public void addRows(java.lang.String tableName, Row... rows)
public java.util.List<Row> tableRows(java.lang.String tableName)