throws IOException {
try {
// create a MapContext to provide access to the reporter (for counters)
taskContext = HadoopCompat.newMapContext(
jobConf, TaskAttemptID.forName(jobConf.get("mapred.task.id")),
null, null, null, new ReporterWrapper((Reporter) progress), null);
realWriter = realOutputFormat.getRecordWriter(taskContext);
} catch (InterruptedException e) {
throw new IOException(e);
}