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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-alpha
    • Fix Version/s: 2.0.2-alpha
    • Component/s: io
    • Labels:
    • Hadoop Flags:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: