public class PreAssignSplitAssigner extends Object implements SplitAssigner
Constructor and Description |
---|
PreAssignSplitAssigner(int splitBatchSize,
int parallelism,
Collection<FileStoreSourceSplit> splits) |
PreAssignSplitAssigner(int splitBatchSize,
int parallelism,
Collection<FileStoreSourceSplit> splits,
Projection partitionRowProjection,
org.apache.flink.table.connector.source.DynamicFilteringData dynamicFilteringData) |
PreAssignSplitAssigner(int splitBatchSize,
org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context,
Collection<FileStoreSourceSplit> splits) |
Modifier and Type | Method and Description |
---|---|
void |
addSplit(int suggestedTask,
FileStoreSourceSplit split)
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.
|
SplitAssigner |
ofDynamicPartitionPruning(Projection partitionRowProjection,
org.apache.flink.table.connector.source.DynamicFilteringData dynamicFilteringData) |
Collection<FileStoreSourceSplit> |
remainingSplits()
Gets the remaining splits that this assigner has pending.
|
public PreAssignSplitAssigner(int splitBatchSize, org.apache.flink.api.connector.source.SplitEnumeratorContext<FileStoreSourceSplit> context, Collection<FileStoreSourceSplit> splits)
public PreAssignSplitAssigner(int splitBatchSize, int parallelism, Collection<FileStoreSourceSplit> splits, Projection partitionRowProjection, org.apache.flink.table.connector.source.DynamicFilteringData dynamicFilteringData)
public PreAssignSplitAssigner(int splitBatchSize, int parallelism, Collection<FileStoreSourceSplit> splits)
public List<FileStoreSourceSplit> getNext(int subtask, @Nullable String hostname)
SplitAssigner
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 SplitAssigner
public void addSplit(int suggestedTask, FileStoreSourceSplit split)
SplitAssigner
addSplit
in interface SplitAssigner
public void addSplitsBack(int subtask, List<FileStoreSourceSplit> splits)
SplitAssigner
addSplitsBack
in interface SplitAssigner
public Collection<FileStoreSourceSplit> remainingSplits()
SplitAssigner
remainingSplits
in interface SplitAssigner
public Optional<Long> getNextSnapshotId(int subtask)
SplitAssigner
getNextSnapshotId
in interface SplitAssigner
public int numberOfRemainingSplits()
SplitAssigner
numberOfRemainingSplits
in interface SplitAssigner
public SplitAssigner ofDynamicPartitionPruning(Projection partitionRowProjection, org.apache.flink.table.connector.source.DynamicFilteringData dynamicFilteringData)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.