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

SequenceFileRecordReader NPE if close() is called before initialize()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0, 2.4.0
    • Fix Version/s: None
    • Component/s: client
    • Labels:

      Description

      org.apache.hadoop.mapreduce.lib.input.SequenceFileRecordReader extends org.apache.hadoop.mapreduce.RecordReader which in turn implements java.io.Closeable.

      According to java spec the java.io.Closeable#close() has to be idempotent (http://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html) which is not.

      An NPE is being thrown if close() method is invoked without previously calling initialize() method. This happens because SequenceFile.Reader in is null.

        Attachments

        1. MAPREDUCE-5876.1.patch
          3 kB
          Tsuyoshi Ozawa

          Activity

            People

            • Assignee:
              ozawa Tsuyoshi Ozawa
              Reporter:
              reinis_v Reinis Vicups
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: