T1
- type of the produced elements by the TableSource
T2
- type of the expected elements by the TableSink
@Internal public class ConnectorCatalogTable<T1,T2> extends AbstractCatalogTable
CatalogTable
that wraps a TableSource
and/or TableSink
.
This allows registering those in a Catalog
. It can not be persisted as the
source and/or sink might be inline implementations and not be representable in a
property based form.Modifier | Constructor and Description |
---|---|
protected |
ConnectorCatalogTable(TableSource<T1> tableSource,
TableSink<T2> tableSink,
TableSchema tableSchema,
boolean isBatch) |
Modifier and Type | Method and Description |
---|---|
CatalogBaseTable |
copy()
Get a deep copy of the CatalogBaseTable instance.
|
Optional<String> |
getDescription()
Get a brief description of the table or view.
|
Optional<String> |
getDetailedDescription()
Get a detailed description of the table or view.
|
Optional<TableSink<T2>> |
getTableSink() |
Optional<TableSource<T1>> |
getTableSource() |
boolean |
isBatch() |
static <T2> ConnectorCatalogTable |
sink(TableSink<T2> sink,
boolean isBatch) |
static <T1> ConnectorCatalogTable |
source(TableSource<T1> source,
boolean isBatch) |
static <T1,T2> ConnectorCatalogTable |
sourceAndSink(TableSource<T1> source,
TableSink<T2> sink,
boolean isBatch) |
Map<String,String> |
toProperties()
Return a property map for table factory discovery purpose.
|
getComment, getPartitionKeys, getProperties, getSchema, isPartitioned
@VisibleForTesting protected ConnectorCatalogTable(TableSource<T1> tableSource, TableSink<T2> tableSink, TableSchema tableSchema, boolean isBatch)
public static <T1> ConnectorCatalogTable source(TableSource<T1> source, boolean isBatch)
public static <T2> ConnectorCatalogTable sink(TableSink<T2> sink, boolean isBatch)
public static <T1,T2> ConnectorCatalogTable sourceAndSink(TableSource<T1> source, TableSink<T2> sink, boolean isBatch)
public Optional<TableSource<T1>> getTableSource()
public boolean isBatch()
public Map<String,String> toProperties()
CatalogTable
TableFactory
public CatalogBaseTable copy()
CatalogBaseTable
public Optional<String> getDescription()
CatalogBaseTable
public Optional<String> getDetailedDescription()
CatalogBaseTable
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.