Class ShardedPartitioner
- java.lang.Object
-
- com.mongodb.spark.sql.connector.read.partitioner.ShardedPartitioner
-
- All Implemented Interfaces:
Partitioner
@Internal public final class ShardedPartitioner extends java.lang.Object implements Partitioner
Sharded PartitionerUses the chunks collection and partitions the collection based on the sharded collections chunk ranges.
Note: Does not support collections sharded using hashed shard keys or compound shard keys.
-
-
Field Summary
-
Fields inherited from interface com.mongodb.spark.sql.connector.read.partitioner.Partitioner
LOGGER
-
-
Constructor Summary
Constructors Constructor Description ShardedPartitioner()
Construct an instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<MongoInputPartition>
generatePartitions(ReadConfig readConfig)
Generate the partitions for the collection based upon the read configuration
-
-
-
Method Detail
-
generatePartitions
public java.util.List<MongoInputPartition> generatePartitions(ReadConfig readConfig)
Description copied from interface:Partitioner
Generate the partitions for the collection based upon the read configuration- Specified by:
generatePartitions
in interfacePartitioner
- Parameters:
readConfig
- the read configuration- Returns:
- the partitions
-
-