Package com.mongodb.hadoop.testutils

Examples of com.mongodb.hadoop.testutils.MapReduceJob.execute()


        MapReduceJob job = new MapReduceJob(TreasuryYieldXMLConfig.class.getName())
                               .jar(JOBJAR_PATH)
                               .inputUris(getInputUri())
                               .outputUris(getOutputUri())
                               .param(SPLITS_USE_RANGEQUERY, "true");
        job.execute(isRunTestInVm());

        compareResults(collection, getReference());
        collection.drop();

        job.param(INPUT_QUERY, "{\"_id\":{\"$gt\":{\"$date\":1182470400000}}}").execute(isRunTestInVm());
View Full Code Here


        MapReduceJob job = new MapReduceJob(TreasuryYieldXMLConfig.class.getName())
                               .jar(JOBJAR_PATH)
                               .inputUris(new MongoClientURIBuilder(getInputUri()).readPreference(ReadPreference.secondary()).build())
                               .outputUris(getOutputUri())
                               .param(SPLITS_USE_RANGEQUERY, "true");
        job.execute(isRunTestInVm());

        compareResults(collection, getReference());
        collection.drop();

        job.param(INPUT_QUERY, "{\"_id\":{\"$gt\":{\"$date\":1182470400000}}}")
View Full Code Here

            job.mapredInputFormat(com.mongodb.hadoop.mapred.BSONFileInputFormat.class);
            job.mapredOutputFormat(MongoOutputFormat.class);
        }


        job.execute(false);

        DBObject object = collection.findOne(new BasicDBObject("_id", "history"));

        assertNotNull(object);
        List books = (List) object.get("books");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.