public interface SplitAssigner
SplitAssigner
is responsible for deciding what splits should be processed next by
which node. It determines split processing order and locality.Modifier and Type | Method and Description |
---|---|
void |
addSplit(int suggestedTask,
FileStoreSourceSplit splits)
Add one split of a specified subtask to the assigner.
|
void |
addSplitsBack(int subtask,
List<FileStoreSourceSplit> splits)
Adds a set of splits to this assigner.
|
List<FileStoreSourceSplit> |
getNext(int subtask,
String hostname)
Gets the next split.
|
Optional<Long> |
getNextSnapshotId(int subtask)
Gets the snapshot id of the next split.
|
int |
numberOfRemainingSplits()
Gets the current number of remaining splits.
|
Collection<FileStoreSourceSplit> |
remainingSplits()
Gets the remaining splits that this assigner has pending.
|
List<FileStoreSourceSplit> getNext(int subtask, @Nullable String hostname)
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.
void addSplit(int suggestedTask, FileStoreSourceSplit splits)
void addSplitsBack(int subtask, List<FileStoreSourceSplit> splits)
Collection<FileStoreSourceSplit> remainingSplits()
Optional<Long> getNextSnapshotId(int subtask)
int numberOfRemainingSplits()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.