FileInputFormat.setInputPaths(job, dataPath);
setMaxSplitSize(job.getConfiguration(), dataPath, numMaps);
// retrieve the splits
TextInputFormat input = new TextInputFormat();
List<InputSplit> splits = input.getSplits(job);
assertEquals(numMaps, splits.size());
InputSplit[] sorted = new InputSplit[numMaps];
splits.toArray(sorted);
Builder.sortSplits(sorted);
List<Integer> keys = new ArrayList<Integer>();
List<Step0Output> values = new ArrayList<Step0Output>();
int[] expectedIds = new int[numMaps];
TaskAttemptContext context = new TaskAttemptContext(job.getConfiguration(),
new TaskAttemptID());
for (int p = 0; p < numMaps; p++) {
InputSplit split = sorted[p];
RecordReader<LongWritable, Text> reader = input.createRecordReader(split,
context);
reader.initialize(split, context);
Long firstKey = null;
int size = 0;