Class AbstractTestSource<T>
- java.lang.Object
-
- org.apache.flink.test.util.source.AbstractTestSourceBase<T,Void>
-
- org.apache.flink.test.util.source.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 toVoidfor the common case where no checkpoint state is needed.For test cases that require checkpointing enumerator state, extend
AbstractTestSourceBasedirectly with a custom checkpoint type.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractTestSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.core.io.SimpleVersionedSerializer<Void>getEnumeratorCheckpointSerializer()Returns the serializer for enumerator checkpoints.-
Methods inherited from class org.apache.flink.test.util.source.AbstractTestSourceBase
createEnumerator, createReader, getBoundedness, getSplitSerializer, restoreEnumerator
-
-
-
-
Method Detail
-
getEnumeratorCheckpointSerializer
public org.apache.flink.core.io.SimpleVersionedSerializer<Void> getEnumeratorCheckpointSerializer()
Description copied from class:AbstractTestSourceBaseReturns the serializer for enumerator checkpoints. Subclasses must implement this to provide the appropriate serializer for their checkpoint type.- Specified by:
getEnumeratorCheckpointSerializerin interfaceorg.apache.flink.api.connector.source.Source<T,TestSplit,Void>- Specified by:
getEnumeratorCheckpointSerializerin classAbstractTestSourceBase<T,Void>
-
-