hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MAPREDUCE-5865) RecordReader is not closed in TeraInputFormat#writePartitionFile()
Date Wed, 16 Sep 2015 02:14:46 GMT

     [ https://issues.apache.org/jira/browse/MAPREDUCE-5865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ted Yu updated MAPREDUCE-5865:
------------------------------
    Description: 
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.

  was:
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.


> 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)

Mime
View raw message