Interface SourceReaderFactory<T,​SplitT extends SourceSplit>

  • Type Parameters:
    T - The type of the output elements.
    All Superinterfaces:
    Serializable
    All Known Subinterfaces:
    Source<T,​SplitT,​EnumChkT>
    All Known Implementing Classes:
    NumberSequenceSource

    @Public
    public interface SourceReaderFactory<T,​SplitT extends SourceSplit>
    extends Serializable
    A factory for creating source reader instances.
    • Method Detail

      • createReader

        SourceReader<T,​SplitT> createReader​(SourceReaderContext readerContext)
                                           throws Exception
        Creates a new reader to read data from the splits it gets assigned. The reader starts fresh and does not have any state to resume.
        Parameters:
        readerContext - The context for the source reader.
        Returns:
        A new SourceReader.
        Throws:
        Exception - The implementor is free to forward all exceptions directly. Exceptions thrown from this method cause task failure/recovery.