@PublicEvolving public class SimpleSplitAssigner extends Object implements FileSplitAssigner
SimpleSplitAssigner hands out splits in a random order, without any consideration for
order or locality.FileSplitAssigner.Provider| Constructor and Description |
|---|
SimpleSplitAssigner(Collection<FileSourceSplit> splits) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSplits(Collection<FileSourceSplit> newSplits)
Adds a set of splits to this assigner.
|
Optional<FileSourceSplit> |
getNext(String hostname)
Gets the next split.
|
Collection<FileSourceSplit> |
remainingSplits()
Gets the remaining splits that this assigner has pending.
|
String |
toString() |
public SimpleSplitAssigner(Collection<FileSourceSplit> splits)
public Optional<FileSourceSplit> getNext(String hostname)
FileSplitAssignerWhen this method returns an empty Optional, then the set of splits is assumed to
be done and the source will finish once the readers finished their current splits.
getNext in interface FileSplitAssignerpublic void addSplits(Collection<FileSourceSplit> newSplits)
FileSplitAssigneraddSplits in interface FileSplitAssignerpublic Collection<FileSourceSplit> remainingSplits()
FileSplitAssignerremainingSplits in interface FileSplitAssignerCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.