Package io.pravega.connectors.flink
Class FlinkPravegaReader.Builder<T>
- java.lang.Object
-
- io.pravega.connectors.flink.AbstractReaderBuilder<B>
-
- io.pravega.connectors.flink.AbstractStreamingReaderBuilder<T,FlinkPravegaReader.Builder<T>>
-
- io.pravega.connectors.flink.FlinkPravegaReader.Builder<T>
-
- Type Parameters:
T
- the element type.
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- FlinkPravegaReader<T>
public static class FlinkPravegaReader.Builder<T> extends AbstractStreamingReaderBuilder<T,FlinkPravegaReader.Builder<T>>
A builder forFlinkPravegaReader
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class io.pravega.connectors.flink.AbstractStreamingReaderBuilder
AbstractStreamingReaderBuilder.ReaderGroupInfo
-
-
Field Summary
-
Fields inherited from class io.pravega.connectors.flink.AbstractStreamingReaderBuilder
checkpointInitiateTimeout, eventReadTimeout, maxOutstandingCheckpointRequest, readerGroupName, readerGroupRefreshTime, readerGroupScope, uid
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlinkPravegaReader<T>
build()
Builds aFlinkPravegaReader
based on the configuration.protected FlinkPravegaReader.Builder<T>
builder()
protected org.apache.flink.util.SerializedValue<AssignerWithTimeWindows<T>>
getAssignerWithTimeWindows()
protected org.apache.flink.api.common.serialization.DeserializationSchema<T>
getDeserializationSchema()
FlinkPravegaReader.Builder<T>
withDeserializationSchema(org.apache.flink.api.common.serialization.DeserializationSchema<T> deserializationSchema)
Sets the deserialization schema.FlinkPravegaReader.Builder<T>
withTimestampAssigner(AssignerWithTimeWindows<T> assignerWithTimeWindows)
Sets the timestamp and watermark assigner.-
Methods inherited from class io.pravega.connectors.flink.AbstractStreamingReaderBuilder
buildReaderGroupInfo, buildSourceFunction, generateUid, uid, withCheckpointInitiateTimeout, withEventReadTimeout, withMaxOutstandingCheckpointRequest, withReaderGroupName, withReaderGroupRefreshTime, withReaderGroupScope
-
Methods inherited from class io.pravega.connectors.flink.AbstractReaderBuilder
enableMetrics, forStream, forStream, forStream, forStream, forStream, forStream, getPravegaConfig, isMetricsEnabled, resolveStreams, withPravegaConfig
-
-
-
-
Method Detail
-
builder
protected FlinkPravegaReader.Builder<T> builder()
- Specified by:
builder
in classAbstractReaderBuilder<FlinkPravegaReader.Builder<T>>
-
withDeserializationSchema
public FlinkPravegaReader.Builder<T> withDeserializationSchema(org.apache.flink.api.common.serialization.DeserializationSchema<T> deserializationSchema)
Sets the deserialization schema.- Parameters:
deserializationSchema
- The deserialization schema- Returns:
- Builder instance.
-
withTimestampAssigner
public FlinkPravegaReader.Builder<T> withTimestampAssigner(AssignerWithTimeWindows<T> assignerWithTimeWindows)
Sets the timestamp and watermark assigner.- Parameters:
assignerWithTimeWindows
- The timestamp and watermark assigner.- Returns:
- Builder instance.
-
getDeserializationSchema
protected org.apache.flink.api.common.serialization.DeserializationSchema<T> getDeserializationSchema()
- Specified by:
getDeserializationSchema
in classAbstractStreamingReaderBuilder<T,FlinkPravegaReader.Builder<T>>
-
getAssignerWithTimeWindows
protected org.apache.flink.util.SerializedValue<AssignerWithTimeWindows<T>> getAssignerWithTimeWindows()
- Specified by:
getAssignerWithTimeWindows
in classAbstractStreamingReaderBuilder<T,FlinkPravegaReader.Builder<T>>
-
build
public FlinkPravegaReader<T> build()
Builds aFlinkPravegaReader
based on the configuration.- Returns:
- An instance of
FlinkPravegaReader
- Throws:
java.lang.IllegalStateException
- if the configuration is invalid.
-
-