Package io.pravega.connectors.flink
Class FlinkPravegaWriter.Builder<T>
- java.lang.Object
-
- io.pravega.connectors.flink.AbstractWriterBuilder<B>
-
- io.pravega.connectors.flink.AbstractStreamingWriterBuilder<T,FlinkPravegaWriter.Builder<T>>
-
- io.pravega.connectors.flink.FlinkPravegaWriter.Builder<T>
-
- Type Parameters:
T
- the element type.
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- FlinkPravegaWriter<T>
public static class FlinkPravegaWriter.Builder<T> extends AbstractStreamingWriterBuilder<T,FlinkPravegaWriter.Builder<T>>
A builder forFlinkPravegaWriter
.- 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 Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlinkPravegaWriter<T>
build()
Builds theFlinkPravegaWriter
.protected FlinkPravegaWriter.Builder<T>
builder()
FlinkPravegaWriter.Builder<T>
withEventRouter(PravegaEventRouter<T> eventRouter)
Sets the event router.FlinkPravegaWriter.Builder<T>
withSerializationSchema(org.apache.flink.api.common.serialization.SerializationSchema<T> serializationSchema)
Sets the serialization schema.FlinkPravegaWriter.Builder<T>
withSerializationSchemaFromRegistry(java.lang.String groupId, java.lang.Class<T> tClass)
Sets the serialization schema from schema registry.-
Methods inherited from class io.pravega.connectors.flink.AbstractStreamingWriterBuilder
createSinkFunction, enableWatermark, withTxnLeaseRenewalPeriod, withWriterMode
-
Methods inherited from class io.pravega.connectors.flink.AbstractWriterBuilder
enableMetrics, forStream, forStream, getPravegaConfig, isMetricsEnabled, resolveStream, withPravegaConfig
-
-
-
-
Method Detail
-
builder
protected FlinkPravegaWriter.Builder<T> builder()
- Specified by:
builder
in classAbstractWriterBuilder<FlinkPravegaWriter.Builder<T>>
-
withSerializationSchema
public FlinkPravegaWriter.Builder<T> withSerializationSchema(org.apache.flink.api.common.serialization.SerializationSchema<T> serializationSchema)
Sets the serialization schema.- Parameters:
serializationSchema
- The serialization schema- Returns:
- Builder instance.
-
withSerializationSchemaFromRegistry
public FlinkPravegaWriter.Builder<T> withSerializationSchemaFromRegistry(java.lang.String groupId, java.lang.Class<T> tClass)
Sets the serialization schema from schema registry. It supports Json, Avro and Protobuf format.- Parameters:
groupId
- The group id in schema registrytClass
- The class describing the serialized type.- Returns:
- Builder instance.
-
withEventRouter
public FlinkPravegaWriter.Builder<T> withEventRouter(PravegaEventRouter<T> eventRouter)
Sets the event router.- Parameters:
eventRouter
- the event router which produces a key per event.- Returns:
- Builder instance.
-
build
public FlinkPravegaWriter<T> build()
Builds theFlinkPravegaWriter
.- Returns:
- An instance of
FlinkPravegaWriter
-
-