Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-8531

SequenceFile Writer can throw out a better error if a serializer or deserializer isn't available

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.0.0-alpha
    • 2.0.2-alpha
    • io
    • Reviewed

    Description

      Currently, if the provided Key/Value class lacks a proper serializer in the loaded config for the SequenceFile.Writer, we get an NPE as the null return goes unchecked.

      Hence we get:

      java.lang.NullPointerException
      	at org.apache.hadoop.io.SequenceFile$Writer.init(SequenceFile.java:1163)
      	at org.apache.hadoop.io.SequenceFile$Writer.<init>(SequenceFile.java:1079)
      	at org.apache.hadoop.io.SequenceFile$RecordCompressWriter.<init>(SequenceFile.java:1331)
      	at org.apache.hadoop.io.SequenceFile.createWriter(SequenceFile.java:271)
      

      We can provide a better message + exception in such cases. This is slightly related to MAPREDUCE-2584.

      Attachments

        1. HADOOP-8531.patch
          3 kB
          madhukara phatak
        2. HADOOP-8531-1.patch
          3 kB
          madhukara phatak
        3. HADOOP-8531-2.patch
          7 kB
          Harsh J
        4. HADOOP-8531-2.patch
          7 kB
          Harsh J

        Issue Links

          Activity

            People

              phatak.dev madhukara phatak
              qwertymaniac Harsh J
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: