Skip to content

Commit

Permalink
PARQUET-59: Fix parquet-scrooge test on hadoop-2.
Browse files Browse the repository at this point in the history
Author: Ryan Blue <[email protected]>

Closes apache#27 from rdblue/PARQUET-59-fix-scrooge-test-on-hadoop-2 and squashes the following commits:

ac34369 [Ryan Blue] PARQUET-59: Fix parquet-scrooge test on hadoop-2.
  • Loading branch information
rdblue committed Aug 5, 2014
1 parent 0148455 commit 3a396d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ public <T> void verifyScroogeRead(TBase recordToWrite, Class<T> readClass, Strin
job.setInputFormatClass(ParquetThriftInputFormat.class);
ParquetThriftInputFormat.setInputPaths(job, parquetFile);
final JobID jobID = new JobID("local", 1);
List<InputSplit> splits = parquetScroogeInputFormat.getSplits(new JobContext(ContextUtil.getConfiguration(job), jobID));
List<InputSplit> splits = parquetScroogeInputFormat.getSplits(ContextUtil.newJobContext(ContextUtil.getConfiguration(job), jobID));
T readValue = null;
for (InputSplit split : splits) {
TaskAttemptContext taskAttemptContext = new TaskAttemptContext(ContextUtil.getConfiguration(job), new TaskAttemptID(new TaskID(jobID, true, 1), 0));
TaskAttemptContext taskAttemptContext = ContextUtil.newTaskAttemptContext(ContextUtil.getConfiguration(job), new TaskAttemptID(new TaskID(jobID, true, 1), 0));
final RecordReader<Void, T> reader = parquetScroogeInputFormat.createRecordReader(split, taskAttemptContext);
reader.initialize(split, taskAttemptContext);
if (reader.nextKeyValue()) {
Expand Down

0 comments on commit 3a396d3

Please sign in to comment.