@Internal public class MongoScanSplitAssigner extends Object implements MongoSplitAssigner
MongoScanSourceSplit.| Constructor and Description |
|---|
MongoScanSplitAssigner(MongoConnectionOptions connectionOptions,
MongoReadOptions readOptions,
MongoSourceEnumState sourceEnumState) |
| Modifier and Type | Method and Description |
|---|---|
void |
addSplitsBack(Collection<MongoSourceSplit> splits)
Adds a set of splits to this assigner.
|
void |
close()
Called to close the assigner, in case it holds on to any resources, like threads or network
connections.
|
Optional<MongoSourceSplit> |
getNext()
Gets the next split to assign to
MongoSourceSplitReader when MongoSourceEnumerator receives a split request, until there are MongoSplitAssigner.noMoreSplits(). |
boolean |
noMoreSplits()
Return whether there are no more splits.
|
void |
open()
Called to open the assigner to acquire any resources, like threads or network connections.
|
MongoSourceEnumState |
snapshotState(long checkpointId)
Snapshot the current assign state into checkpoint.
|
public MongoScanSplitAssigner(MongoConnectionOptions connectionOptions, MongoReadOptions readOptions, MongoSourceEnumState sourceEnumState)
public void open()
MongoSplitAssigneropen in interface MongoSplitAssignerpublic Optional<MongoSourceSplit> getNext()
MongoSplitAssignerMongoSourceSplitReader when MongoSourceEnumerator receives a split request, until there are MongoSplitAssigner.noMoreSplits().getNext in interface MongoSplitAssignerpublic void addSplitsBack(Collection<MongoSourceSplit> splits)
MongoSplitAssigneraddSplitsBack in interface MongoSplitAssignerpublic MongoSourceEnumState snapshotState(long checkpointId)
MongoSplitAssignersnapshotState in interface MongoSplitAssignerpublic boolean noMoreSplits()
MongoSplitAssignernoMoreSplits in interface MongoSplitAssignerpublic void close()
throws IOException
MongoSplitAssignerclose in interface MongoSplitAssignerIOExceptionCopyright © 2022–2025 The Apache Software Foundation. All rights reserved.