Class RecordsBySplits<E>
- java.lang.Object
-
- org.apache.flink.connector.base.source.reader.RecordsBySplits<E>
-
- All Implemented Interfaces:
RecordsWithSplitIds<E>
@PublicEvolving public class RecordsBySplits<E> extends Object implements RecordsWithSplitIds<E>
An implementation of RecordsWithSplitIds to host all the records by splits.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RecordsBySplits.Builder<E>
A utility builder to collect records in individual calls, rather than put a finished collection in theRecordsBySplits(Map, Set)
constructor.
-
Constructor Summary
Constructors Constructor Description RecordsBySplits(Map<String,Collection<E>> recordsBySplit, Set<String> finishedSplits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>
finishedSplits()
Get the finished splits.E
nextRecordFromSplit()
Gets the next record from the current split.String
nextSplit()
Moves to the next split.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.connector.base.source.reader.RecordsWithSplitIds
recycle
-
-
-
-
Method Detail
-
nextSplit
@Nullable public String nextSplit()
Description copied from interface:RecordsWithSplitIds
Moves to the next split. This method is also called initially to move to the first split. Returns null, if no splits are left.- Specified by:
nextSplit
in interfaceRecordsWithSplitIds<E>
-
nextRecordFromSplit
@Nullable public E nextRecordFromSplit()
Description copied from interface:RecordsWithSplitIds
Gets the next record from the current split. Returns null if no more records are left in this split.- Specified by:
nextRecordFromSplit
in interfaceRecordsWithSplitIds<E>
-
finishedSplits
public Set<String> finishedSplits()
Description copied from interface:RecordsWithSplitIds
Get the finished splits.- Specified by:
finishedSplits
in interfaceRecordsWithSplitIds<E>
- Returns:
- the finished splits after this RecordsWithSplitIds is returned.
-
-