Examples of calculateSplits()


Examples of com.mongodb.hadoop.splitter.MongoSplitter.calculateSplits()

        throws IOException {

        try {
            MongoSplitter splitterImpl = MongoSplitterFactory.getSplitter(conf);
            final List<org.apache.hadoop.mapreduce.InputSplit> splits =
                splitterImpl.calculateSplits();
            InputSplit[] splitIns = splits.toArray(new InputSplit[splits.size()]);

            // wrap InputSplits in FileSplits so that 'getPath'
            // doesn't produce an error (Hive bug)
            FileSplit[] wrappers = new FileSplit[splitIns.length];
View Full Code Here

Examples of com.mongodb.hadoop.splitter.MongoSplitter.calculateSplits()

    public InputSplit[] getSplits(final JobConf job, final int numSplits) throws IOException {
        try {
            MongoSplitter splitterImpl = MongoSplitterFactory.getSplitter(job);
            LOG.info("Using " + splitterImpl + " to calculate splits. (old mapreduce API)");
            final List<org.apache.hadoop.mapreduce.InputSplit> splits = splitterImpl.calculateSplits();
            return splits.toArray(new InputSplit[splits.size()]);
        } catch (SplitFailedException spfe) {
            throw new IOException(spfe);
        }
    }
View Full Code Here

Examples of com.mongodb.hadoop.splitter.MongoSplitter.calculateSplits()

    public List<InputSplit> getSplits(final JobContext context) throws IOException {
        final Configuration conf = context.getConfiguration();
        try {
            MongoSplitter splitterImpl = MongoSplitterFactory.getSplitter(conf);
            LOG.debug("Using " + splitterImpl.toString() + " to calculate splits.");
            return splitterImpl.calculateSplits();
        } catch (SplitFailedException spfe) {
            throw new IOException(spfe);
        }
    }
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.