return new MongoRecordReader(mis);
}
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);
}
}