You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-dev@hadoop.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2014/04/28 19:22:15 UTC

[jira] [Created] (MAPREDUCE-5865) RecordReader is not closed in TeraInputFormat#writePartitionFile()

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)