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 Summary
Modifier and TypeMethodDescriptionGet the finished splits.Gets the next record from the current split.Moves to the next split.default voidrecycle()This method is called when all records from this batch have been emitted.
-
Method Details
-
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
Gets the next record from the current split. Returns null if no more records are left in this split. -
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.
-