Class FlinkPravegaTableSource.BuilderBase<T extends FlinkPravegaTableSource,​B extends io.pravega.connectors.flink.AbstractStreamingReaderBuilder>

    • 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

      • BuilderBase

        public BuilderBase()
    • Method Detail

      • withSchema

        public B withSchema​(org.apache.flink.table.api.TableSchema schema)
        Sets the schema of the produced table.
        Parameters:
        schema - The schema of the produced table.
        Returns:
        The builder.
      • withProctimeAttribute

        public B withProctimeAttribute​(java.lang.String proctimeAttribute)
        Configures a field of the table to be a processing time attribute. The configured field must be present in the table schema and of type Types.SQL_TIMESTAMP().
        Parameters:
        proctimeAttribute - The name of the processing time attribute in the table schema.
        Returns:
        The builder.
      • withRowtimeAttribute

        public B withRowtimeAttribute​(java.lang.String rowtimeAttribute,
                                      org.apache.flink.table.sources.tsextractors.TimestampExtractor timestampExtractor,
                                      org.apache.flink.table.sources.wmstrategies.WatermarkStrategy watermarkStrategy)
        Configures a field of the table to be a rowtime attribute. The configured field must be present in the table schema and of type Types.SQL_TIMESTAMP().
        Parameters:
        rowtimeAttribute - The name of the rowtime attribute in the table schema.
        timestampExtractor - The TimestampExtractor to extract the rowtime attribute from the physical type.
        watermarkStrategy - The WatermarkStrategy to generate watermarks for the rowtime attribute.
        Returns:
        The builder.
      • getTableSchema

        protected org.apache.flink.table.api.TableSchema getTableSchema()
        Returns the configured table schema.
        Returns:
        the configured table schema.
      • configureTableSource

        protected void configureTableSource​(T source)
        Applies a configuration to the table source.
        Parameters:
        source - the table source.
      • 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.
      • getDeserializationSchema

        protected abstract org.apache.flink.api.common.serialization.DeserializationSchema<T> getDeserializationSchema()
      • getAssignerWithTimeWindows

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