Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-9293

NPE in DumpLogSegments with --offsets-decoder

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.1
    • Component/s: None
    • Labels:
      None

      Description

      Exception in thread "main" java.lang.NullPointerException
              at org.apache.kafka.common.utils.Utils.toArray(Utils.java:230)
              at kafka.tools.DumpLogSegments$OffsetsMessageParser.$anonfun$parseGroupMetadata$2(DumpLogSegments.scala:287)
              at kafka.tools.DumpLogSegments$OffsetsMessageParser.parseGroupMetadata(DumpLogSegments.scala:284)
              at kafka.tools.DumpLogSegments$OffsetsMessageParser.parse(DumpLogSegments.scala:317)
              at kafka.tools.DumpLogSegments$.$anonfun$dumpLog$2(DumpLogSegments.scala:372)
              at kafka.tools.DumpLogSegments$.$anonfun$dumpLog$2$adapted(DumpLogSegments.scala:343)
              at scala.collection.Iterator.foreach(Iterator.scala:941)
              at scala.collection.Iterator.foreach$(Iterator.scala:941)
              at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
              at scala.collection.IterableLike.foreach(IterableLike.scala:74)
              at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
              at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
              at kafka.tools.DumpLogSegments$.$anonfun$dumpLog$1(DumpLogSegments.scala:343)
              at kafka.tools.DumpLogSegments$.$anonfun$dumpLog$1$adapted(DumpLogSegments.scala:340)
              at scala.collection.Iterator.foreach(Iterator.scala:941)
              at scala.collection.Iterator.foreach$(Iterator.scala:941)
              at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
              at scala.collection.IterableLike.foreach(IterableLike.scala:74)
              at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
              at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
              at kafka.tools.DumpLogSegments$.dumpLog(DumpLogSegments.scala:340)
              at kafka.tools.DumpLogSegments$.$anonfun$main$1(DumpLogSegments.scala:60)
              at kafka.tools.DumpLogSegments$.main(DumpLogSegments.scala:51)
              at kafka.tools.DumpLogSegments.main(DumpLogSegments.scala)
      

      The problem is that "userData" is nullable, but the dump log tool doesn't check for null.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hachikuji Jason Gustafson
                Reporter:
                hachikuji Jason Gustafson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: