TaskContext { public TaskContext(JobConf conf, Class<?> iKClass, Class<?> iVClass, Class<?> oKClass, Class<?> oVClass, TaskReporter reporter, TaskAttemptID id) { this.conf = conf; this.iKClass = iKClass; this.iVClass = iVClass; this.oKClass = oKClass; this.oVClass = oVClass; this.reporter = reporter; this.taskAttemptID = id; } TaskContext(JobConf conf, Class<?> iKClass, Class<?> iVClass,
      Class<?> oKClass, Class<?> oVClass, TaskReporter reporter,
      TaskAttemptID id); Class<?> getInputKeyClass(); void setInputKeyClass(Class<?> klass); Class<?> getInputValueClass(); void setInputValueClass(Class<?> klass); Class<?> getOutputKeyClass(); void setOutputKeyClass(Class<?> klass); Class<?> getOutputValueClass(); void setOutputValueClass(Class<?> klass); TaskReporter getTaskReporter(); TaskAttemptID getTaskAttemptId(); JobConf getConf(); TaskContext copyOf();  }
@Test public void testTaskContext() { TaskContext context = new TaskContext(null, null, null, null, null, null, null); context.setInputKeyClass(IntWritable.class); Assert.assertEquals(IntWritable.class.getName(), context.getInputKeyClass ().getName()); context.setInputValueClass(Text.class); Assert.assertEquals(Text.class.getName(), context.getInputValueClass() .getName()); context.setOutputKeyClass(LongWritable.class); Assert.assertEquals(LongWritable.class.getName(), context .getOutputKeyClass().getName()); context.setOutputValueClass(FloatWritable.class); Assert.assertEquals(FloatWritable.class.getName(), context .getOutputValueClass().getName()); }