Class PaginateIntoPartitionsPartitioner
- java.lang.Object
-
- com.mongodb.spark.sql.connector.read.partitioner.PaginateIntoPartitionsPartitioner
-
- All Implemented Interfaces:
Partitioner
@Internal public final class PaginateIntoPartitionsPartitioner extends java.lang.Object
Paginate into partitions partitioner.Determines the number of documents per partition by dividing the collection count of documents by the maximum number of allowable partitions.
- "partition.field": The field to be used for partitioning. Must be a unique field. Defaults to: "_id".
- "max.number.of.partitions": The maximum number of partitions this partitioner will create. Defaults to: 64.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ID_FIELD
static java.lang.String
MAX_NUMBER_OF_PARTITIONS_CONFIG
static java.lang.String
PARTITION_FIELD_CONFIG
static java.lang.String
PARTITION_FIELD_DEFAULT
-
Fields inherited from interface com.mongodb.spark.sql.connector.read.partitioner.Partitioner
LOGGER
-
-
Constructor Summary
Constructors Constructor Description PaginateIntoPartitionsPartitioner()
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
-
-
-
Field Detail
-
MAX_NUMBER_OF_PARTITIONS_CONFIG
public static final java.lang.String MAX_NUMBER_OF_PARTITIONS_CONFIG
- See Also:
- Constant Field Values
-
ID_FIELD
public static final java.lang.String ID_FIELD
- See Also:
- Constant Field Values
-
PARTITION_FIELD_DEFAULT
public static final java.lang.String PARTITION_FIELD_DEFAULT
- See Also:
- Constant Field Values
-
PARTITION_FIELD_CONFIG
public static final java.lang.String PARTITION_FIELD_CONFIG
- See Also:
- Constant Field Values
-
-
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- Parameters:
readConfig
- the read configuration- Returns:
- the partitions
-
-