recordWriter.close(taskAttemptContext);
} catch (InterruptedException e) {
throw new IOException(e);
}
final Serialization serialization = new Serialization(
taskAttemptContext.getConfiguration());
try {
List<InputSplit> inputSplits = inputFormat.getSplits(taskAttemptContext);
for (InputSplit inputSplit : inputSplits) {
RecordReader<K, V> recordReader = inputFormat.createRecordReader(
inputSplit, taskAttemptContext);
recordReader.initialize(inputSplit, taskAttemptContext);
while (recordReader.nextKeyValue()) {
outputs.add(new Pair<K, V>(serialization.copy(recordReader
.getCurrentKey()), serialization.copy(recordReader
.getCurrentValue())));
}
}
} catch (InterruptedException e) {
throw new IOException(e);