public abstract class SelectTableSinkBase<T> extends Object implements StreamTableSink<T>
StreamTableSink
for select job to collect the result to local.Modifier and Type | Field and Description |
---|---|
protected DataFormatConverters.DataFormatConverter<RowData,Row> |
converter |
Constructor and Description |
---|
SelectTableSinkBase(TableSchema schema,
TypeSerializer<T> typeSerializer) |
Modifier and Type | Method and Description |
---|---|
TableSink<T> |
configure(String[] fieldNames,
TypeInformation<?>[] fieldTypes)
Returns a copy of this
TableSink configured with the field names and types of the
table to emit. |
DataStreamSink<?> |
consumeDataStream(DataStream<T> dataStream)
Consumes the DataStream and return the sink transformation
DataStreamSink . |
protected abstract Row |
convertToRow(T element) |
protected static InternalTypeInfo<RowData> |
createTypeInfo(TableSchema tableSchema)
Create
InternalTypeInfo of RowData based on given table schema. |
SelectResultProvider |
getSelectResultProvider() |
TableSchema |
getTableSchema()
Returns the schema of the consumed table.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConsumedDataType, getFieldNames, getFieldTypes, getOutputType
protected final DataFormatConverters.DataFormatConverter<RowData,Row> converter
public SelectTableSinkBase(TableSchema schema, TypeSerializer<T> typeSerializer)
public TableSchema getTableSchema()
TableSink
getTableSchema
in interface TableSink<T>
TableSchema
of the consumed table.public TableSink<T> configure(String[] fieldNames, TypeInformation<?>[] fieldTypes)
TableSink
TableSink
configured with the field names and types of the
table to emit.public DataStreamSink<?> consumeDataStream(DataStream<T> dataStream)
StreamTableSink
DataStreamSink
. The
returned DataStreamSink
will be used to set resources for the sink operator.consumeDataStream
in interface StreamTableSink<T>
public SelectResultProvider getSelectResultProvider()
protected static InternalTypeInfo<RowData> createTypeInfo(TableSchema tableSchema)
InternalTypeInfo
of RowData
based on given table schema.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.