Class StaticFileSplitEnumerator

  • All Implemented Interfaces:
    AutoCloseable, org.apache.flink.api.common.state.CheckpointListener, org.apache.flink.api.connector.source.SplitEnumerator<FileSourceSplit,​PendingSplitsCheckpoint<FileSourceSplit>>, org.apache.flink.api.connector.source.SupportsBatchSnapshot

    @Internal
    public class StaticFileSplitEnumerator
    extends Object
    implements org.apache.flink.api.connector.source.SplitEnumerator<FileSourceSplit,​PendingSplitsCheckpoint<FileSourceSplit>>, org.apache.flink.api.connector.source.SupportsBatchSnapshot
    A SplitEnumerator implementation for bounded / batch FileSource input.

    This enumerator takes all files that are present in the configured input directories and assigns them to the readers. Once all files are processed, the source is finished.

    The implementation of this class is rather thin. The actual logic for creating the set of FileSourceSplits to process, and the logic to decide which reader gets what split, are in FileEnumerator and in FileSplitAssigner, respectively.