Interface RecordsWithSplitIds<E>

  • All Known Implementing Classes:
    RecordsBySplits

    @PublicEvolving
    public interface RecordsWithSplitIds<E>
    An interface for the elements passed from the fetchers to the source reader.
    • Method Detail

      • nextSplit

        @Nullable
        String nextSplit()
        Moves to the next split. This method is also called initially to move to the first split. Returns null, if no splits are left.
      • nextRecordFromSplit

        @Nullable
        E nextRecordFromSplit()
        Gets the next record from the current split. Returns null if no more records are left in this split.
      • finishedSplits

        Set<String> finishedSplits()
        Get the finished splits.
        Returns:
        the finished splits after this RecordsWithSplitIds is returned.
      • recycle

        default void recycle()
        This method is called when all records from this batch have been emitted.

        Overriding this method gives implementations the opportunity to recycle/reuse this object, which is a performance optimization that is important for cases where the record objects are large or otherwise heavy to allocate.