I'm using Hadoop mongo connector in java(spark application). I've done reading mongo db 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 I add to query the data (like .limit(100000))