Class/Object
com.mongodb.spark.rdd.partitioner
MongoPaginateByCountPartitioner
Related Docs: object MongoPaginateByCountPartitioner | package partitioner
Permalink
class MongoPaginateByCountPartitioner extends Logging with MongoPartitioner with MongoPaginationPartitioner
The pagination by count partitioner.
Paginates the collection into a maximum number of partitions.
Configuration Properties
The prefix when using sparkConf is: spark.mongodb.input.partitionerOptions followed by the property name:
partitionKey, the field to partition the collection by. The field should be indexed and contain unique values. Defaults to _id.
numberOfPartitions, the maximum number of partitions to create. Defaults to 64.
Note: This can be a expensive operation as it creates 1 cursor for every partition.
Since
1.0
Linear Supertypes
Known Subclasses
Ordering
Alphabetic
By Inheritance
Inherited
MongoPaginateByCountPartitioner
MongoPaginationPartitioner
MongoPartitioner
Serializable
Serializable
Logging
LoggingTrait
AnyRef
Any
Hide All
Show All
Visibility
Public
All
Instance Constructors
new MongoPaginateByCountPartitioner()
Value Members
val numberOfPartitionsProperty: String
The number of partitions property
val partitionKeyProperty: String
The partition key property
def partitions(connector: MongoConnector, readConfig: ReadConfig, pipeline: Array[BsonDocument]): Array[MongoPartition]
Calculate the Partitions