Ted Yu created MAPREDUCE-5865:
---------------------------------
Summary: RecordReader is not closed in
TeraInputFormat#writePartitionFile()
Key: MAPREDUCE-5865
URL: https://issues.apache.org/jira/browse/MAPREDUCE-5865
Project: Hadoop Map/Reduce
Issue Type: Bug
Reporter: Ted Yu
Here is related code:
{code}
RecordReader<Text, Text> reader =
inFormat.createRecordReader(splits.get(sampleStep * idx),
context);
reader.initialize(splits.get(sampleStep * idx), context);
while (reader.nextKeyValue()) {
sampler.addKey(new Text(reader.getCurrentKey()));
records += 1;
if (recordsPerSample <= records) {
break;
}
}
{code}
reader should be closed using finally block.
--
This message was sent by Atlassian JIRA
(v6.2#6252)