@PublicEvolving public static class MongoReadOptions.MongoReadOptionsBuilder extends Object
MongoReadOptions.| 限定符和类型 | 方法和说明 |
|---|---|
MongoReadOptions |
build()
Build the
MongoReadOptions. |
MongoReadOptions.MongoReadOptionsBuilder |
setFetchSize(int fetchSize)
Sets the number of documents should be fetched per round-trip when reading.
|
MongoReadOptions.MongoReadOptionsBuilder |
setNoCursorTimeout(boolean noCursorTimeout)
The MongoDB server normally times out idle cursors after an inactivity period (10
minutes) to prevent excess memory use.
|
MongoReadOptions.MongoReadOptionsBuilder |
setPartitionSize(org.apache.flink.configuration.MemorySize partitionSize)
Sets the partition memory size of MongoDB split.
|
MongoReadOptions.MongoReadOptionsBuilder |
setPartitionStrategy(PartitionStrategy partitionStrategy)
Sets the partition strategy.
|
MongoReadOptions.MongoReadOptionsBuilder |
setSamplesPerPartition(int samplesPerPartition)
Sets the number of samples to take per partition which is only used for the sample
partition strategy
PartitionStrategy.SAMPLE. |
public MongoReadOptions.MongoReadOptionsBuilder setFetchSize(int fetchSize)
fetchSize - the number of documents should be fetched per round-trip when reading.public MongoReadOptions.MongoReadOptionsBuilder setNoCursorTimeout(boolean noCursorTimeout)
noCursorTimeout() or a maxTimeMS() greater than
30 minutes.noCursorTimeout - Set this option to true to prevent cursor timeout (10 minutes)public MongoReadOptions.MongoReadOptionsBuilder setPartitionStrategy(PartitionStrategy partitionStrategy)
PartitionStrategy for detail.partitionStrategy - the strategy of a partition.public MongoReadOptions.MongoReadOptionsBuilder setPartitionSize(org.apache.flink.configuration.MemorySize partitionSize)
MongoScanSourceSplitReader to speed up the overall read time.partitionSize - the memory size of a partition.public MongoReadOptions.MongoReadOptionsBuilder setSamplesPerPartition(int samplesPerPartition)
PartitionStrategy.SAMPLE. The sample partitioner samples the
collection, projects and sorts by the partition fields. Then uses every samplesPerPartition as the value to use to calculate the partition boundaries. The total
number of samples taken is: samples per partition * ( count of documents / number of
documents per partition).samplesPerPartition - number of samples per partition.public MongoReadOptions build()
MongoReadOptions.Copyright © 2022–2024 The Apache Software Foundation. All rights reserved.