public class AlignedSplitAssigner extends Object implements SplitAssigner
| Constructor and Description |
|---|
AlignedSplitAssigner() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSplit(int subtask,
FileStoreSourceSplit splits)
Add one split of a specified subtask to the assigner.
|
void |
addSplitsBack(int suggestedTask,
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.
|
boolean |
isAligned() |
int |
numberOfRemainingSplits()
Gets the current number of remaining splits.
|
int |
remainingSnapshots() |
Collection<FileStoreSourceSplit> |
remainingSplits()
Gets the remaining splits that this assigner has pending.
|
void |
removeFirst() |
public List<FileStoreSourceSplit> getNext(int subtask, @Nullable String hostname)
SplitAssignerWhen 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 SplitAssignerpublic void addSplit(int subtask,
FileStoreSourceSplit splits)
SplitAssigneraddSplit in interface SplitAssignerpublic void addSplitsBack(int suggestedTask,
List<FileStoreSourceSplit> splits)
SplitAssigneraddSplitsBack in interface SplitAssignerpublic Collection<FileStoreSourceSplit> remainingSplits()
SplitAssignerremainingSplits in interface SplitAssignerpublic Optional<Long> getNextSnapshotId(int subtask)
SplitAssignergetNextSnapshotId in interface SplitAssignerpublic int numberOfRemainingSplits()
SplitAssignernumberOfRemainingSplits in interface SplitAssignerpublic boolean isAligned()
public int remainingSnapshots()
public void removeFirst()
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.