Class FlinkSourceSplit<T>

  • Type Parameters:
    T - The output type of the encapsulated Beam Source.
    All Implemented Interfaces:
    java.io.Serializable, org.apache.flink.api.connector.source.SourceSplit

    public class FlinkSourceSplit<T>
    extends java.lang.Object
    implements org.apache.flink.api.connector.source.SourceSplit, java.io.Serializable
    A Flink SourceSplit implementation that encapsulates a Beam Source. This class also serves as the holder of the checkpoint state of the Beam Reader created from the encapsulated source. So, the Source can recreate the Reader from the checkpointed state upon failure recovery.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      FlinkSourceSplit​(int splitIndex, org.apache.beam.sdk.io.Source<T> beamSplitSource)  
      FlinkSourceSplit​(int splitIndex, org.apache.beam.sdk.io.Source<T> beamSplitSource, byte @Nullable [] splitState, @Nullable org.apache.beam.sdk.io.UnboundedSource.CheckpointMark checkpointMark)  
    • Constructor Detail

      • FlinkSourceSplit

        public FlinkSourceSplit​(int splitIndex,
                                org.apache.beam.sdk.io.Source<T> beamSplitSource)
      • FlinkSourceSplit

        public FlinkSourceSplit​(int splitIndex,
                                org.apache.beam.sdk.io.Source<T> beamSplitSource,
                                byte @Nullable [] splitState,
                                @Nullable org.apache.beam.sdk.io.UnboundedSource.CheckpointMark checkpointMark)
    • Method Detail

      • splitIndex

        public int splitIndex()
      • getSplitState

        public byte @Nullable [] getSplitState()
      • getBeamSplitSource

        public org.apache.beam.sdk.io.Source<T> getBeamSplitSource()
      • splitId

        public java.lang.String splitId()
        Specified by:
        splitId in interface org.apache.flink.api.connector.source.SourceSplit
      • getCheckpointMark

        public @Nullable org.apache.beam.sdk.io.UnboundedSource.CheckpointMark getCheckpointMark()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • serializer

        public static <T> org.apache.flink.core.io.SimpleVersionedSerializer<FlinkSourceSplit<T>> serializer()