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 Improvement
    • Status: Closed
    • Priority: Trivial 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.

      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

          Arun C Murthy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Arun C Murthy made changes -
          Fix Version/s 2.0.2-alpha [ 12322473 ]
          Fix Version/s 2.1.0-alpha [ 12321441 ]
          Harsh J made changes -
          Target Version/s 2.1.0-alpha [ 12321441 ]
          Harsh J made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Fix Version/s 2.1.0-alpha [ 12321441 ]
          Resolution Fixed [ 1 ]
          Harsh J made changes -
          Hadoop Flags Reviewed [ 10343 ]
          Harsh J made changes -
          Summary SequenceFile Writer can throw out a better error if a serializer isn't available SequenceFile Writer can throw out a better error if a serializer or deserializer isn't available
          Affects Version/s 2.0.0-alpha [ 12320352 ]
          Target Version/s 2.1.0-alpha [ 12321441 ]
          Component/s io [ 12310687 ]
          Harsh J made changes -
          Attachment HADOOP-8531-2.patch [ 12536561 ]
          Harsh J made changes -
          Attachment HADOOP-8531-2.patch [ 12535990 ]
          madhukara phatak made changes -
          Attachment HADOOP-8531-1.patch [ 12534147 ]
          madhukara phatak made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          madhukara phatak made changes -
          Attachment HADOOP-8531.patch [ 12533619 ]
          madhukara phatak made changes -
          Assignee madhukara phatak [ phatak.dev ]
          Harsh J made changes -
          Field Original Value New Value
          Link This issue relates to MAPREDUCE-2584 [ MAPREDUCE-2584 ]
          Harsh J created issue -

            People

            • Assignee:
              madhukara phatak
              Reporter:
              Harsh J
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development