Class FlinkPravegaReader.Builder<T>

    • Field Detail

      • uid

        protected java.lang.String uid
      • readerGroupScope

        protected java.lang.String readerGroupScope
      • readerGroupName

        protected java.lang.String readerGroupName
      • readerGroupRefreshTime

        protected org.apache.flink.api.common.time.Time readerGroupRefreshTime
      • checkpointInitiateTimeout

        protected org.apache.flink.api.common.time.Time checkpointInitiateTimeout
      • eventReadTimeout

        protected org.apache.flink.api.common.time.Time eventReadTimeout
      • maxOutstandingCheckpointRequest

        protected int maxOutstandingCheckpointRequest
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • 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()
      • getAssignerWithTimeWindows

        protected org.apache.flink.util.SerializedValue<AssignerWithTimeWindows<T>> getAssignerWithTimeWindows()
      • uid

        public B uid​(java.lang.String uid)
        Configures the source uid to identify the checkpoint state of this source.

        The default value is generated based on other inputs.

        Parameters:
        uid - the uid to use.
      • withReaderGroupScope

        public B withReaderGroupScope​(java.lang.String scope)
        Configures the reader group scope for synchronization purposes.

        The default value is taken from the PravegaConfig defaultScope property.

        Parameters:
        scope - the scope name.
      • withReaderGroupName

        public B withReaderGroupName​(java.lang.String readerGroupName)
        Configures the reader group name.
        Parameters:
        readerGroupName - the reader group name.
      • withReaderGroupRefreshTime

        public B withReaderGroupRefreshTime​(org.apache.flink.api.common.time.Time groupRefreshTime)
        Sets the group refresh time, with a default of 1 second.
        Parameters:
        groupRefreshTime - The group refresh time
      • withCheckpointInitiateTimeout

        public B withCheckpointInitiateTimeout​(org.apache.flink.api.common.time.Time checkpointInitiateTimeout)
        Sets the timeout for initiating a checkpoint in Pravega.
        Parameters:
        checkpointInitiateTimeout - The timeout
      • withEventReadTimeout

        public B withEventReadTimeout​(org.apache.flink.api.common.time.Time eventReadTimeout)
        Sets the timeout for the call to read events from Pravega. After the timeout expires (without an event being returned), another call will be made.
        Parameters:
        eventReadTimeout - The timeout
      • withMaxOutstandingCheckpointRequest

        public B withMaxOutstandingCheckpointRequest​(int maxOutstandingCheckpointRequest)
        Configures the maximum outstanding checkpoint requests to Pravega (default=3). Upon requesting more checkpoints than the specified maximum, (say a checkpoint request times out on the ReaderCheckpointHook but Pravega is still working on it), this configurations allows Pravega to limit any further checkpoint request being made to the ReaderGroup. This configuration is particularly relevant when multiple checkpoint requests need to be honored (e.g., frequent savepoint requests being triggered concurrently).
        Parameters:
        maxOutstandingCheckpointRequest - maximum outstanding checkpoint request.