Class AbstractTestSource<T>

  • Type Parameters:
    T - The type of records produced by this source
    All Implemented Interfaces:
    Serializable, org.apache.flink.api.connector.source.Source<T,​TestSplit,​Void>, org.apache.flink.api.connector.source.SourceReaderFactory<T,​TestSplit>

    @PublicEvolving
    public abstract class AbstractTestSource<T>
    extends AbstractTestSourceBase<T,​Void>
    Abstract base class for test sources that provides default implementations for all Source V2 methods. This class fixes the enumerator checkpoint type to Void for the common case where no checkpoint state is needed.

    For test cases that require checkpointing enumerator state, extend AbstractTestSourceBase directly with a custom checkpoint type.

    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractTestSource

        public AbstractTestSource()
    • Method Detail

      • getEnumeratorCheckpointSerializer

        public org.apache.flink.core.io.SimpleVersionedSerializer<Void> getEnumeratorCheckpointSerializer()
        Description copied from class: AbstractTestSourceBase
        Returns the serializer for enumerator checkpoints. Subclasses must implement this to provide the appropriate serializer for their checkpoint type.
        Specified by:
        getEnumeratorCheckpointSerializer in interface org.apache.flink.api.connector.source.Source<T,​TestSplit,​Void>
        Specified by:
        getEnumeratorCheckpointSerializer in class AbstractTestSourceBase<T,​Void>