MongoCompanionConfig

本文详细介绍了如何使用com.mongodb.spark.config包中的MongoCompanionConfig特质来创建MongoDB配置实例,以便于在Spark环境中操作MongoDB数据库。文章涵盖了从SparkConf、SparkSession等不同源创建配置的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Trait

com.mongodb.spark.config
MongoCompanionConfig
Related Doc: package config
trait MongoCompanionConfig extends Serializable

The Mongo configuration base trait

Defines companion object helper methods for creating MongoConfig instances

Since

1.0

Linear Supertypes
Known Subclasses
Ordering

Alphabetic
By Inheritance

Inherited

MongoCompanionConfig
Serializable
Serializable
AnyRef
Any

Hide All
Show All

Visibility

Public
All

Type Members

abstract type Self

The type of the MongoConfig

Abstract Value Members

abstract def apply(options: Map[String, String], default: Option[Self]): Self

Create a configuration from the values in the Map, using the optional default configuration for any default values.
abstract val configPrefix: String

The configuration prefix string for the current configuration scope
abstract def create(options: Map[String, String], default: Self): Self

Create a configuration easily from the Java API using the values in the Map, using the optional default configuration for any default values.
abstract def create(options: Map[String, String]): Self

Create a configuration easily from the Java API using the values in the Map
abstract def create(sparkConf: SparkConf, options: Map[String, String]): Self

Create a configuration from the sparkConf
abstract def create(sparkConf: SparkConf): Self

Create a configuration easily from the Java API using the sparkConf
abstract def create(sparkSession: SparkSession): Self

Create a configuration easily from the Java API using the JavaSparkContext
abstract def create(javaSparkContext: JavaSparkContext): Self

Create a configuration easily from the Java API using the JavaSparkContext
abstract def create(sqlContext: SQLContext): Self

Create a configuration easily from the Java API using the JavaSparkContext

Concrete Value Members

def apply(options: Map[String, String]): Self

Create a configuration from the values in the Map
def apply(sparkConf: SparkConf, options: Map[String, String]): Self

Create a configuration from the sparkConf
def apply(sparkConf: SparkConf): Self

Create a configuration from the sparkConf
def apply(sparkSession: SparkSession): Self

Create a configuration from the sqlContext
def apply(sparkContext: SparkContext): Self

Create a configuration from the sparkContext
def getOptionsFromConf(sparkConf: SparkConf): Map[String, String]

Gets an options map from the SparkConf
val mongoURIProperty: String

The mongo URI property
def stripPrefix(options: Map[String, String]): Map[String, String]

Strip the prefix from options

Deprecated Value Members

def apply(sqlContext: SQLContext): Self

Create a configuration from the sqlContext
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值