• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

276
Views
configure mongodb spark connector with more than one host

Is there a way to specify more than one MongoDB host in SparkConf? The examples in the doc (https://docs.mongodb.com/spark-connector/v1.1/configuration/) seems to suggest that no.

spark.mongodb.output.uri=mongodb://127.0.0.1/
spark.mongodb.output.database=test
spark.mongodb.output.collection=myCollection
about 3 years ago · Santiago Trujillo
1 answers
Answer question

0

The spark.mongodb.input.uri and spark.mongodb.output.uri accepts MongoDB Connection URI format.

The connection URI format should work across all MongoDB supported drivers, including the MongoDB Scala driver for Spark. For example, in order to connect to a replica set, you can specify:

mongodb://db1.example.net,db2.example.net:2500/?replicaSet=myReplica
about 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error