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

Enable try-with-resources for RecordReader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • None
    • None
    • Reviewed

    Description

      org.apache.hadoop.mapred.RecordReader has a close method; but doesn't implement closeable; it would be nice to add that - it would enable to use:

      try( org.apache.hadoop.mapred.RecordReader<?, ?> recordReader = inputFormat.getRecordReader(... )   ){
       [...]
      }
      

      ...supporting t-w-r makes it easier to throw exceptions more safely

      Attachments

        1. MAPREDUCE-6972.02.patch
          1 kB
          Zoltan Haindrich
        2. MAPREDUCE-6972.01.patch
          1 kB
          Zoltan Haindrich

        Activity

          People

            kgyrtkirk Zoltan Haindrich
            kgyrtkirk Zoltan Haindrich
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: