Package com.mongodb.hadoop.splitter

Examples of com.mongodb.hadoop.splitter.MultiCollectionSplitBuilder$CollectionSplitterConf


*/
public class TreasuryYieldMulti extends MongoTool {
    public static void main(final String[] pArgs) throws Exception {
        //Here is an example of how to use multiple collections as the input to
        //a hadoop job, from within Java code directly.
        MultiCollectionSplitBuilder builder = new MultiCollectionSplitBuilder();
        builder.add(new MongoClientURI("mongodb://localhost:27017/mongo_hadoop.yield_historical.in"), null, true, null, null, null, false,
                    null)
               .add(new MongoClientURI("mongodb://localhost:27017/mongo_hadoop.yield_historical.in"), null, true, null, null,
                    new BasicDBObject("_id", new BasicDBObject("$gt", new Date(883440000000L))), false, null);

        Configuration conf = new Configuration();
        conf.set(MultiMongoCollectionSplitter.MULTI_COLLECTION_CONF_KEY, builder.toJSON());

        System.exit(ToolRunner.run(conf, new TreasuryYieldXMLConfig(conf), pArgs));
    }
View Full Code Here

TOP

Related Classes of com.mongodb.hadoop.splitter.MultiCollectionSplitBuilder$CollectionSplitterConf

Copyright © 2018 www.massapicom. 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.