MAPREDUCE-5866. Merging change r1608585 from trunk to branch-2.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1608588 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
29099c8a5c
commit
00ff3d320a
|
@ -12,6 +12,9 @@ Release 2.6.0 - UNRELEASED
|
|||
|
||||
BUG FIXES
|
||||
|
||||
MAPREDUCE-5866. TestFixedLengthInputFormat fails in windows.
|
||||
(Varun Vasudev via cnauroth)
|
||||
|
||||
Release 2.5.0 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -372,10 +372,13 @@ public class TestFixedLengthInputFormat {
|
|||
format.getRecordReader(split, job, voidReporter);
|
||||
LongWritable key = reader.createKey();
|
||||
BytesWritable value = reader.createValue();
|
||||
try {
|
||||
while (reader.next(key, value)) {
|
||||
result.add(new String(value.getBytes(), 0, value.getLength()));
|
||||
}
|
||||
} finally {
|
||||
reader.close();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -417,15 +417,18 @@ public class TestFixedLengthInputFormat {
|
|||
new MapContextImpl<LongWritable, BytesWritable, LongWritable,
|
||||
BytesWritable>(job.getConfiguration(), context.getTaskAttemptID(),
|
||||
reader, null, null, MapReduceTestUtil.createDummyReporter(), split);
|
||||
reader.initialize(split, mcontext);
|
||||
LongWritable key;
|
||||
BytesWritable value;
|
||||
try {
|
||||
reader.initialize(split, mcontext);
|
||||
while (reader.nextKeyValue()) {
|
||||
key = reader.getCurrentKey();
|
||||
value = reader.getCurrentValue();
|
||||
result.add(new String(value.getBytes(), 0, value.getLength()));
|
||||
}
|
||||
} finally {
|
||||
reader.close();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue