Class/Object

com.mongodb.spark

MongoConnector

Related Docs: object MongoConnector | package spark

Permalink

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
Serializable, Product, Equals, Closeable, AutoCloseable, Serializable, Logging, LoggingTrait, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MongoConnector
  2. Serializable
  3. Product
  4. Equals
  5. Closeable
  6. AutoCloseable
  7. Serializable
  8. Logging
  9. LoggingTrait
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MongoConnector(mongoClientFactory: MongoClientFactory)

    Permalink

    mongoClientFactory

    the factory that can be used to create a MongoClient

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def close(): Unit

    Permalink
    Definition Classes
    MongoConnector → Closeable → AutoCloseable
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  11. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  12. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  13. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  14. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  15. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  16. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  17. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  18. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  19. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  20. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  21. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  22. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    LoggingTrait
  23. val mongoClientFactory: MongoClientFactory

    Permalink

    the factory that can be used to create a MongoClient

  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. def withCollectionDo[D, T](config: MongoCollectionConfig, clazz: Class[D], code: org.apache.spark.api.java.function.Function[MongoCollection[D], T]): T

    Permalink

    A Java friendly way to execute some code on a collection

    A Java friendly way to execute some code on a collection

    Note: The MongoCollection is reference counted and loaned to the code method and should only be used inside that function.

    T

    the result of the code function

    config

    the com.mongodb.spark.config.MongoCollectionConfig determining which database and collection to connect to

    clazz

    the class representing documents from the collection

    code

    the code block that is executed

    returns

    the result

  32. def withCollectionDo[D, T](config: MongoCollectionConfig, code: (MongoCollection[D]) ⇒ T)(implicit ct: ClassTag[D]): T

    Permalink

    Execute some code on a collection

    Execute some code on a collection

    Note: The MongoCollection is reference counted and loaned to the code method and should only be used inside that function.

    T

    the result of the code function

    config

    the com.mongodb.spark.config.MongoCollectionConfig determining which database and collection to connect to

    code

    the code block that is executed

    returns

    the result

  33. def withDatabaseDo[T](config: MongoCollectionConfig, code: org.apache.spark.api.java.function.Function[MongoDatabase, T]): T

    Permalink

    A Java friendly way to execute some code on a database

    A Java friendly way to execute some code on a database

    Note: The MongoDatabase is reference counted and loaned to the code method and should only be used inside that function.

    T

    the result of the code function

    config

    the com.mongodb.spark.config.MongoCollectionConfig determining which database to connect to

    code

    the code block that is executed

    returns

    the result

  34. def withDatabaseDo[T](config: MongoCollectionConfig, code: (MongoDatabase) ⇒ T): T

    Permalink

    Execute some code on a database

    Execute some code on a database

    Note: The MongoDatabase is reference counted and loaned to the code method and should only be used inside that function.

    T

    the result of the code function

    config

    the com.mongodb.spark.config.MongoCollectionConfig determining which database to connect to

    code

    the code block that is executed

    returns

    the result

  35. def withMongoClientDo[T](code: org.apache.spark.api.java.function.Function[MongoClient, T]): T

    Permalink

    A Java friendly way to execute some code on a MongoClient

    A Java friendly way to execute some code on a MongoClient

    Note: The MongoClient is reference counted and loaned to the code method and should only be used inside that function.

    T

    the result of the code function

    code

    the code block that is passed

    returns

    the result

  36. def withMongoClientDo[T](code: (MongoClient) ⇒ T): T

    Permalink

    Execute some code on a MongoClient

    Execute some code on a MongoClient

    Note: The MongoClient is reference counted and loaned to the code method and should only be used inside that function.

    T

    the result of the code function

    code

    the code block that is passed

    returns

    the result

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Closeable

Inherited from AutoCloseable

Inherited from Serializable

Inherited from Logging

Inherited from LoggingTrait

Inherited from AnyRef

Inherited from Any

Ungrouped