@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)
FileSplitAssigner
When 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 FileSplitAssigner
public void addSplits(Collection<FileSourceSplit> newSplits)
FileSplitAssigner
addSplits
in interface FileSplitAssigner
public Collection<FileSourceSplit> remainingSplits()
FileSplitAssigner
remainingSplits
in interface FileSplitAssigner
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.