Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-5865

RecordReader is not closed in TeraInputFormat#writePartitionFile()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • mrv1

    Description

      Here is related 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;
                    }
                  }
      

      reader should be closed using finally block.

      Attachments

        1. MAPREDUCE-5865.patch
          2 kB
          Rahul Palamuttam

        Activity

          People

            Unassigned Unassigned
            yuzhihong@gmail.com Ted Yu
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: