Object/Class

com.mongodb.spark

MongoSpark

Related Docs: class MongoSpark | package spark

Permalink

object MongoSpark extends Serializable

The MongoSpark helper allows easy creation of RDDs, DataFrames or Datasets from MongoDB.

Since

1.0

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MongoSpark
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class Builder extends AnyRef

    Permalink

    Builder for configuring and creating a MongoSpark

    Builder for configuring and creating a MongoSpark

    It requires a SparkSession or the SparkContext

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 builder(): Builder

    Permalink

    Create a builder for configuring the MongoSpark

    Create a builder for configuring the MongoSpark

    returns

    a MongoSession Builder

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val defaultSource: String

    Permalink

    The default source string for creating DataFrames from MongoDB

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  14. def load[D](jsc: JavaSparkContext, clazz: Class[D]): JavaMongoRDD[D]

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    D

    the type of the data in the RDD

    jsc

    the Spark context containing the MongoDB connection configuration

    clazz

    the class of the data contained in the RDD

    returns

    a MongoRDD

  15. def load[D](jsc: JavaSparkContext, readConfig: ReadConfig, clazz: Class[D]): JavaMongoRDD[D]

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    D

    the type of the data in the RDD

    jsc

    the Spark context containing the MongoDB connection configuration

    clazz

    the class of the data contained in the RDD

    returns

    a MongoRDD

  16. def load(jsc: JavaSparkContext, readConfig: ReadConfig): JavaMongoRDD[Document]

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    jsc

    the Spark context containing the MongoDB connection configuration

    returns

    a MongoRDD

  17. def load(jsc: JavaSparkContext): JavaMongoRDD[Document]

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    jsc

    the Spark context containing the MongoDB connection configuration

    returns

    a MongoRDD

  18. def load[D](sparkSession: SparkSession, readConfig: ReadConfig, clazz: Class[D]): Dataset[D]

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    D

    The bean class defining the schema for the data

    sparkSession

    the SparkSession containing the MongoDB connection configuration

    clazz

    the class of the data contained in the RDD

    returns

    a MongoRDD

  19. def load[D <: Product](sparkSession: SparkSession, readConfig: ReadConfig)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[D]): DataFrame

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    D

    The optional class defining the schema for the data

    sparkSession

    the SparkSession containing the MongoDB connection configuration

    returns

    a MongoRDD

  20. def load[D <: Product](sparkSession: SparkSession)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[D]): DataFrame

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    D

    The optional class defining the schema for the data

    sparkSession

    the SparkSession containing the MongoDB connection configuration

    returns

    a MongoRDD

  21. def load[D](sc: SparkContext, readConfig: ReadConfig)(implicit arg0: ClassTag[D], e: DefaultsTo[D, Document]): MongoRDD[D]

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    sc

    the Spark context containing the MongoDB connection configuration

    returns

    a MongoRDD

  22. def load[D](sc: SparkContext)(implicit arg0: ClassTag[D], e: DefaultsTo[D, Document]): MongoRDD[D]

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    sc

    the Spark context containing the MongoDB connection configuration

    returns

    a MongoRDD

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

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

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

    Permalink
    Definition Classes
    AnyRef
  26. def read(sparkSession: SparkSession): DataFrameReader

    Permalink

    Creates a DataFrameReader with MongoDB as the source

    Creates a DataFrameReader with MongoDB as the source

    sparkSession

    the SparkSession

    returns

    the DataFrameReader

  27. def save[D](javaRDD: JavaRDD[D], writeConfig: WriteConfig, clazz: Class[D]): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    Uses the writeConfig for the database information Requires a codec for the data type

    D

    the type of the data in the RDD

    javaRDD

    the RDD data to save to MongoDB

    writeConfig

    the com.mongodb.spark.config.WriteConfig

    clazz

    the class of the data contained in the RDD

    returns

    the javaRDD

  28. def save(javaRDD: JavaRDD[Document], writeConfig: WriteConfig): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    Uses the SparkConf for the database information

    javaRDD

    the RDD data to save to MongoDB

    writeConfig

    the com.mongodb.spark.config.WriteConfig

    returns

    the javaRDD

  29. def save[D](javaRDD: JavaRDD[D], clazz: Class[D]): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    Uses the SparkConf for the database and collection information Requires a codec for the data type

    D

    the type of the data in the RDD

    javaRDD

    the RDD data to save to MongoDB

    clazz

    the class of the data contained in the RDD

    returns

    the javaRDD

  30. def save(javaRDD: JavaRDD[Document]): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    Uses the SparkConf for the database and collection information

    javaRDD

    the RDD data to save to MongoDB

    returns

    the javaRDD

  31. def save(dataFrameWriter: DataFrameWriter[_], writeConfig: WriteConfig): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    dataFrameWriter

    the DataFrameWriter save to MongoDB

    writeConfig

    the writeConfig

  32. def save(dataFrameWriter: DataFrameWriter[_]): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    Uses the SparkConf for the database and collection information

    dataFrameWriter

    the DataFrameWriter save to MongoDB

  33. def save[D](dataset: Dataset[D], writeConfig: WriteConfig): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    Note: If the dataFrame contains an _id field the data will upserted and replace any existing documents in the collection.

    dataset

    the dataset to save to MongoDB

    writeConfig

    the writeConfig

    Since

    1.1.0

  34. def save[D](dataset: Dataset[D]): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    Uses the SparkConf for the database and collection information

    Note: If the dataFrame contains an _id field the data will upserted and replace any existing documents in the collection.

    dataset

    the dataset to save to MongoDB

    Since

    1.1.0

  35. def save[D](rdd: RDD[D], writeConfig: WriteConfig)(implicit arg0: ClassTag[D]): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    D

    the type of the data in the RDD

    rdd

    the RDD data to save to MongoDB

    writeConfig

    the writeConfig

  36. def save[D](rdd: RDD[D])(implicit arg0: ClassTag[D]): Unit

    Permalink

    Save data to MongoDB

    Save data to MongoDB

    Uses the SparkConf for the database and collection information Requires a codec for the data type

    D

    the type of the data in the RDD

    rdd

    the RDD data to save to MongoDB

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. def write[T](dataset: Dataset[T]): DataFrameWriter[T]

    Permalink

    Creates a DataFrameWriter with the MongoDB underlying output data source.

    Creates a DataFrameWriter with the MongoDB underlying output data source.

    dataset

    the Dataset to convert into a DataFrameWriter

    returns

    the DataFrameWriter

Deprecated Value Members

  1. def load[D](sqlContext: SQLContext, readConfig: ReadConfig, clazz: Class[D]): DataFrame

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    D

    The bean class defining the schema for the data

    sqlContext

    the SQL context containing the MongoDB connection configuration

    clazz

    the class of the data contained in the RDD

    returns

    a MongoRDD

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) As of Spark 2.0 SQLContext was replaced by SparkSession. Use the SparkSession method instead

  2. def load[D <: Product](sqlContext: SQLContext, readConfig: ReadConfig)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[D]): DataFrame

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    D

    The optional class defining the schema for the data

    sqlContext

    the SQLContext containing the MongoDB connection configuration

    returns

    a MongoRDD

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) As of Spark 2.0 SQLContext was replaced by SparkSession. Use the SparkSession method instead

  3. def load[D <: Product](sqlContext: SQLContext)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[D]): DataFrame

    Permalink

    Load data from MongoDB

    Load data from MongoDB

    D

    The optional class defining the schema for the data

    sqlContext

    the SQLContext containing the MongoDB connection configuration

    returns

    a MongoRDD

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) As of Spark 2.0 SQLContext was replaced by SparkSession. Use the SparkSession method instead

  4. def read(sqlContext: SQLContext): DataFrameReader

    Permalink

    Creates a DataFrameReader with MongoDB as the source

    Creates a DataFrameReader with MongoDB as the source

    sqlContext

    the SQLContext

    returns

    the DataFrameReader

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0.0) As of Spark 2.0 SQLContext was replaced by SparkSession. Use the SparkSession method instead

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped