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

RecordReader is not closed in TeraInputFormat#writePartitionFile()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: mrv1
    • Labels:

      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

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

              Dates

              • Created:
                Updated: