code: public static MapContext newMapContext(Configuration conf,
                                           TaskAttemptID taskAttemptID,
                                           RecordReader recordReader,
                                           RecordWriter recordWriter,
                                           OutputCommitter outputCommitter,
                                           StatusReporter statusReporter,
                                           InputSplit inputSplit) {
      return (MapContext) newInstance(MAP_CONTEXT_CONSTRUCTOR,
          conf, taskAttemptID, recordReader, recordWriter, outputCommitter,
          statusReporter, inputSplit);
    }
docs: Instantiates MapContext under Hadoop 1 and MapContextImpl under Hadoop 2.