Object
com.mongodb.spark.rdd.partitioner
PartitionerHelper
Related Doc: package partitioner
object PartitionerHelper
:: DeveloperApi ::
Helper methods for partitioner implementations
Annotations
@DeveloperApi()
Since
1.0
Linear Supertypes
Ordering
Alphabetic
By Inheritance
Inherited
PartitionerHelper
AnyRef
Any
Hide All
Show All
Visibility
Public
All
Value Members
def collStats(connector: MongoConnector, readConfig: ReadConfig): BsonDocument
Runs the collStats command and returns the results
def createBoundaryQuery(key: String, lower: BsonValue, upper: BsonValue): BsonDocument
Creates the upper and lower boundary query for the given key
def createPartitions(partitionKey: String, splitKeys: Seq[BsonValue], locations: Seq[String] = Nil, addMinMax: Boolean = true): Array[MongoPartition]
Creates partitions using a single Seq of documents representing the right handside of partitions
def getSplitVectorRangeQuery(partitionKey: String, pipeline: Array[BsonDocument]): (BsonValue, BsonValue)
Checks an aggregation pipeline to see if it starts with a range based query that is suitable for the SplitVector command.
def locations(connector: MongoConnector): Seq[String]
Get the locations of the Mongo hosts
def matchQuery(pipeline: Array[BsonDocument]): BsonDocument
Returns the head $match from a pipeline
def setLastBoundaryToLessThanOrEqualTo(partitionKey: String, partitions: Array[MongoPartition]): Array[MongoPartition]
Sets the final boundary to use $lte rather than $lt so that boundaries with users provided queries have the correct upper bound