spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Write Concern used in Mongo-Hadoop Connector
Date Mon, 31 Aug 2015 13:07:45 GMT
Take a look at the following:

https://github.com/mongodb/mongo-hadoop/blob/master/core/src/main/java/com/mongodb/hadoop/MongoOutputFormat.java


https://jira.mongodb.org/plugins/servlet/mobile#issue/HADOOP-82



> On Aug 31, 2015, at 4:39 AM, Deepesh Maheshwari <deepesh.maheshwari17@gmail.com>
wrote:
> 
> Hi, 
> I am using below code to insert data in mongodb from spark.
> 
> JavaPairRDD<Object, BSONObject> rdd;
> 
> Configuration config = new Configuration();
> 
> config.set("mongo.output.uri", SparkProperties.MONGO_OUTPUT_URI);
>         config.set("mongo.output.format", "com.mongodb.hadoop.MongoOutputFormat");
> 
> rdd.saveAsNewAPIHadoopFile("file:///notapplicable",
>                             Object.class, BSONObject.class, MongoOutputFormat.class,
config);
> 
> But, looking in the code i am not able to figure out what write concern api's are using
to insert  data in mongodb.
> 
> Please explain and let me know if someone figure out.
> 
> Thanks,
> Deepesh

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message