Package io.pravega.connectors.flink
Class FlinkPravegaTableSink.AbstractTableSinkBuilder<B extends FlinkPravegaTableSink.AbstractTableSinkBuilder>
- java.lang.Object
-
- io.pravega.connectors.flink.AbstractWriterBuilder<B>
-
- io.pravega.connectors.flink.AbstractStreamingWriterBuilder<org.apache.flink.types.Row,B>
-
- io.pravega.connectors.flink.FlinkPravegaTableSink.AbstractTableSinkBuilder<B>
-
- Type Parameters:
B
- the builder type.
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
FlinkPravegaJsonTableSink.Builder
- Enclosing class:
- FlinkPravegaTableSink
@Internal public abstract static class FlinkPravegaTableSink.AbstractTableSinkBuilder<B extends FlinkPravegaTableSink.AbstractTableSinkBuilder> extends AbstractStreamingWriterBuilder<org.apache.flink.types.Row,B>
An abstractFlinkPravegaTableSink
builder.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class io.pravega.connectors.flink.AbstractStreamingWriterBuilder
DEFAULT_TXN_LEASE_RENEWAL_PERIOD_MILLIS, enableWatermark, txnLeaseRenewalPeriod, writerMode
-
-
Constructor Summary
Constructors Constructor Description AbstractTableSinkBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected FlinkPravegaOutputFormat<org.apache.flink.types.Row>
createOutputFormat(FlinkPravegaTableSink.TableSinkConfiguration configuration)
Creates FlinkPravegaOutputFormat based on the given table sink configuration and current builder state.protected FlinkPravegaWriter<org.apache.flink.types.Row>
createSinkFunction(FlinkPravegaTableSink.TableSinkConfiguration configuration)
Creates the sink function based on the given table sink configuration and current builder state.protected abstract org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.types.Row>
getSerializationSchema(java.lang.String[] fieldNames)
Gets a serialization schema based on the given output field names.B
withRoutingKeyField(java.lang.String fieldName)
Sets the field name to use as a Pravega event routing key.-
Methods inherited from class io.pravega.connectors.flink.AbstractStreamingWriterBuilder
enableWatermark, withTxnLeaseRenewalPeriod, withWriterMode
-
Methods inherited from class io.pravega.connectors.flink.AbstractWriterBuilder
builder, enableMetrics, forStream, forStream, getPravegaConfig, isMetricsEnabled, resolveStream, withPravegaConfig
-
-
-
-
Method Detail
-
withRoutingKeyField
public B withRoutingKeyField(java.lang.String fieldName)
Sets the field name to use as a Pravega event routing key. Each row is written to a Pravega stream with a routing key based on the given field name. The specified field must of typeSTRING
.- Parameters:
fieldName
- the field name.
-
getSerializationSchema
protected abstract org.apache.flink.api.common.serialization.SerializationSchema<org.apache.flink.types.Row> getSerializationSchema(java.lang.String[] fieldNames)
Gets a serialization schema based on the given output field names.- Parameters:
fieldNames
- the field names to emit.
-
createSinkFunction
protected FlinkPravegaWriter<org.apache.flink.types.Row> createSinkFunction(FlinkPravegaTableSink.TableSinkConfiguration configuration)
Creates the sink function based on the given table sink configuration and current builder state.- Parameters:
configuration
- the table sink configuration, incl. projected fields
-
createOutputFormat
protected FlinkPravegaOutputFormat<org.apache.flink.types.Row> createOutputFormat(FlinkPravegaTableSink.TableSinkConfiguration configuration)
Creates FlinkPravegaOutputFormat based on the given table sink configuration and current builder state.- Parameters:
configuration
- the table sink configuration, incl. projected fields
-
-