public static class RecordsBySplits.Builder<E> extends Object
RecordsBySplits(Map, Set)
constructor.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
void |
add(SourceSplit split,
E record)
Add the record from the given source split.
|
void |
add(String splitId,
E record)
Add the record from the given split ID.
|
void |
addAll(SourceSplit split,
Collection<E> records)
Add multiple records from the given source split.
|
void |
addAll(String splitId,
Collection<E> records)
Add multiple records from the given split ID.
|
void |
addFinishedSplit(String splitId)
Mark the split with the given ID as finished.
|
void |
addFinishedSplits(Collection<String> splitIds)
Mark multiple splits with the given IDs as finished.
|
RecordsBySplits<E> |
build() |
public void add(String splitId, E record)
splitId
- the split ID the record was from.record
- the record to add.public void add(SourceSplit split, E record)
split
- the source split the record was from.record
- the record to add.public void addAll(String splitId, Collection<E> records)
splitId
- the split ID given the records were from.records
- the records to add.public void addAll(SourceSplit split, Collection<E> records)
split
- the source split the records were from.records
- the records to add.public void addFinishedSplit(String splitId)
splitId
- the ID of the finished split.public void addFinishedSplits(Collection<String> splitIds)
splitIds
- the IDs of the finished splits.public RecordsBySplits<E> build()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.