Package com.mongodb.hadoop.input

Examples of com.mongodb.hadoop.input.BSONFileRecordReader.nextKeyValue()


    public void mongoUpdateStorage() throws InterruptedException, TimeoutException, IOException {
        BSONFileRecordReader reader = new BSONFileRecordReader();
        File file = new File(PROJECT_HOME + "/pig/src/test/resources/dump/test/persons_info.bson");
        FileSplit split = new FileSplit(new Path(file.toURI()), 0L, file.length(), new String[0]);
        reader.initialize(split, new TaskAttemptContextImpl(new JobConf(), new TaskAttemptID()));
        while (reader.nextKeyValue()) {
            LOG.info(reader.getCurrentValue().toString());
        }
        runScript("update_simple_mus.pig");
    }
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.