Skip to content

Commit

Permalink
Update tests to TaskAttemptContextImpl (Contributed by Henning)
Browse files Browse the repository at this point in the history
  • Loading branch information
kambatla committed Aug 20, 2012
1 parent 2182b3b commit 501b976
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/test/com/hadoop/mapreduce/TestLzoTextInputFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.apache.hadoop.mapreduce.RecordWriter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.hadoop.mapreduce.TaskAttemptID;
import org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl;
import org.apache.hadoop.mapreduce.lib.input.FileSplit;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
Expand Down Expand Up @@ -165,8 +166,8 @@ private void runTest(boolean testWithIndex, int charsToOutput) throws IOExceptio
TextOutputFormat.setOutputCompressorClass(job, LzopCodec.class);
TextOutputFormat.setOutputPath(job, outputDir);

TaskAttemptContext attemptContext = new TaskAttemptContext(job.getConfiguration(),
new TaskAttemptID("123", 0, false, 1, 2));
TaskAttemptContext attemptContext = new TaskAttemptContextImpl(
job.getConfiguration(), new TaskAttemptID("123", 0, false, 1, 2));

// create some input data
byte[] expectedMd5 = createTestInput(outputDir, localFs, attemptContext, charsToOutput);
Expand Down Expand Up @@ -312,8 +313,8 @@ private void runTestIgnoreNonLzo(boolean testWithIndex, int charsToOutput,
TextOutputFormat.setOutputCompressorClass(job, LzopCodec.class);
TextOutputFormat.setOutputPath(job, outputDir);

TaskAttemptContext attemptContext = new TaskAttemptContext(job.getConfiguration(),
new TaskAttemptID("123", 0, false, 1, 2));
TaskAttemptContext attemptContext = new TaskAttemptContextImpl(
job.getConfiguration(), new TaskAttemptID("123", 0, false, 1, 2));

// create some input data
byte[] expectedMd5 = createTestInput(outputDir, localFs, attemptContext, charsToOutput);
Expand Down

0 comments on commit 501b976

Please sign in to comment.