Class TiKVRichParallelSourceFunction<T>

  • All Implemented Interfaces:
    Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.common.functions.RichFunction, org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>, org.apache.flink.streaming.api.checkpoint.CheckpointedFunction, org.apache.flink.streaming.api.functions.source.ParallelSourceFunction<T>, org.apache.flink.streaming.api.functions.source.SourceFunction<T>

    public class TiKVRichParallelSourceFunction<T>
    extends org.apache.flink.streaming.api.functions.source.RichParallelSourceFunction<T>
    implements org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.streaming.api.checkpoint.CheckpointedFunction, org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>
    The source implementation for TiKV that read snapshot events first and then read the change event.
    See Also:
    Serialized Form
    • Method Detail

      • open

        public void open​(org.apache.flink.configuration.Configuration config)
                  throws Exception
        Specified by:
        open in interface org.apache.flink.api.common.functions.RichFunction
        Overrides:
        open in class org.apache.flink.api.common.functions.AbstractRichFunction
        Throws:
        Exception
      • run

        public void run​(org.apache.flink.streaming.api.functions.source.SourceFunction.SourceContext<T> ctx)
                 throws Exception
        Specified by:
        run in interface org.apache.flink.streaming.api.functions.source.SourceFunction<T>
        Throws:
        Exception
      • readSnapshotEvents

        protected void readSnapshotEvents()
                                   throws Exception
        Throws:
        Exception
      • flushRows

        protected void flushRows​(long timestamp)
                          throws Exception
        Throws:
        Exception
      • cancel

        public void cancel()
        Specified by:
        cancel in interface org.apache.flink.streaming.api.functions.source.SourceFunction<T>
      • snapshotState

        public void snapshotState​(org.apache.flink.runtime.state.FunctionSnapshotContext context)
                           throws Exception
        Specified by:
        snapshotState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
        Throws:
        Exception
      • initializeState

        public void initializeState​(org.apache.flink.runtime.state.FunctionInitializationContext context)
                             throws Exception
        Specified by:
        initializeState in interface org.apache.flink.streaming.api.checkpoint.CheckpointedFunction
        Throws:
        Exception
      • notifyCheckpointComplete

        public void notifyCheckpointComplete​(long checkpointId)
                                      throws Exception
        Specified by:
        notifyCheckpointComplete in interface org.apache.flink.api.common.state.CheckpointListener
        Throws:
        Exception
      • getProducedType

        public org.apache.flink.api.common.typeinfo.TypeInformation<T> getProducedType()
        Specified by:
        getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<T>