Class/Object
com.mongodb.spark
MongoConnector
Related Docs: object MongoConnector | package spark
case class MongoConnector(mongoClientFactory: MongoClientFactory) extends Logging with Serializable with Closeable with Product with Serializable
The MongoConnector
Connects Spark to MongoDB
mongoClientFactory
the factory that can be used to create a MongoClient
Since
1.0
Linear Supertypes
Ordering
Alphabetic
By Inheritance
Inherited
MongoConnector
Serializable
Product
Equals
Closeable
AutoCloseable
Serializable
Logging
LoggingTrait
AnyRef
Any
Hide All
Show All
Visibility
Public
All
Instance Constructors
new MongoConnector(mongoClientFactory: MongoClientFactory)
Value Members
def close(): Unit
val mongoClientFactory: MongoClientFactory
the factory that can be used to create a MongoClient
def withCollectionDo[D, T](config: MongoCollectionConfig, clazz: Class[D], code: org.apache.spark.api.java.function.Function[MongoCollection[D], T]): T
A Java friendly way to execute some code on a collection
def withCollectionDo[D, T](config: MongoCollectionConfig, code: (MongoCollection[D]) ⇒ T)(implicit ct: ClassTag[D]): T
Execute some code on a collection
def withDatabaseDo[T](config: MongoCollectionConfig, code: org.apache.spark.api.java.function.Function[MongoDatabase, T]): T
A Java friendly way to execute some code on a database
def withDatabaseDo[T](config: MongoCollectionConfig, code: (MongoDatabase) ⇒ T): T
Execute some code on a database
def withMongoClientDo[T](code: org.apache.spark.api.java.function.Function[MongoClient, T]): T
A Java friendly way to execute some code on a MongoClient
def withMongoClientDo[T](code: (MongoClient) ⇒ T): T
Execute some code on a MongoClient