Class RecordsBySplits.Builder<E>
java.lang.Object
org.apache.flink.connector.base.source.reader.RecordsBySplits.Builder<E>
- Enclosing class:
- RecordsBySplits<E>
A utility builder to collect records in individual calls, rather than put a finished
collection in the
RecordsBySplits(Map, Set) constructor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the record from the given split ID.voidAdd the record from the given source split.voidaddAll(String splitId, Collection<E> records) Add multiple records from the given split ID.voidaddAll(org.apache.flink.api.connector.source.SourceSplit split, Collection<E> records) Add multiple records from the given source split.voidaddFinishedSplit(String splitId) Mark the split with the given ID as finished.voidaddFinishedSplits(Collection<String> splitIds) Mark multiple splits with the given IDs as finished.build()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
add
Add the record from the given split ID.- Parameters:
splitId- the split ID the record was from.record- the record to add.
-
add
Add the record from the given source split.- Parameters:
split- the source split the record was from.record- the record to add.
-
addAll
Add multiple records from the given split ID.- Parameters:
splitId- the split ID given the records were from.records- the records to add.
-
addAll
Add multiple records from the given source split.- Parameters:
split- the source split the records were from.records- the records to add.
-
addFinishedSplit
Mark the split with the given ID as finished.- Parameters:
splitId- the ID of the finished split.
-
addFinishedSplits
Mark multiple splits with the given IDs as finished.- Parameters:
splitIds- the IDs of the finished splits.
-
build
-