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

Hadoop records can't serialize zero length string

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 0.13.0
    • Fix Version/s: None
    • Component/s: record
    • Labels:
      None
    • Environment:

      [jssarma@hadoop001 hadoop-0.13.0]$ uname -a
      Linux 2.6.12-1.1398_FC4smp #1 SMP Fri Jul 15 01:05:\
      24 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux

      Description

      java.lang.NullPointerException
      at org.apache.hadoop.record.Utils.toBinaryString(Utils.java:307)
      at org.apache.hadoop.record.BinaryRecordOutput.writeString(BinaryRecordOutput.java:95)
      at com.facebook.infrastructure.profiles.users_extended.serialize(users_extended.java:153)
      at org.apache.hadoop.record.Record.serialize(Record.java:58)
      at org.apache.hadoop.record.Record.write(Record.java:72)
      at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.collect(MapTask.java:365)
      at com.facebook.infrastructure.profiles.conv_users_extended$MapClass.map(conv_users_extended.java:133)
      at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:48)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:186)
      at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:1707)

      final int strlen = str.length();
      byte[] bytes = new byte[strlen*4]; // Codepoints expand to 4 bytes max

      barfs on trying to allocate zero length array?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jsensarma Joydeep Sen Sarma
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: