You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2015/05/06 05:39:22 UTC
[jira] [Updated] (MAPREDUCE-5865) RecordReader is not closed in
TeraInputFormat#writePartitionFile()
[ https://issues.apache.org/jira/browse/MAPREDUCE-5865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Allen Wittenauer updated MAPREDUCE-5865:
----------------------------------------
Labels: BB2015-05-TBR (was: )
> 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
> Components: mrv1
> Reporter: Ted Yu
> Labels: BB2015-05-TBR
> Attachments: MAPREDUCE-5865.patch
>
>
> 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.3.4#6332)