I am using the hadoop mongo connector in java (spark application). I did a mongo db reading by setting this configuration
Configuration mongodbConfig = new Configuration();
mongodbConfig.set("mongo.job.input.format", "com.mongodb.hadoop.MongoInputFormat");
mongodbConfig.set("mongo.input.uri", "mongodb://localhost:27017/MyCollectionName.collection");
What can be added to request data (for example .limit(100000))
source
share