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

Application Reset Tool Returns NPE when --to-datetime or --by-duration are run on --input-topics with empty partitions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • 3.0.0
    • streams, tools
    • None

    Description

      When running the streams application reset tool with --by-duration or --to-datetime if any partitions for a given input topic are empty a NPE is thrown.  I tested this with a topic with 3 partitions, I received a NPE until all 3 partitions had at least one message.  The behavior was the same for both --to-datetime and --by-duration. 

      Error below:

      Reset-offsets for input topics [sample-cdc-topic]Reset-offsets for input topics [sample-cdc-topic]Following input topics offsets will be reset to (for consumer group des-demo-stream)ERROR: java.lang.NullPointerExceptionjava.lang.NullPointerException at kafka.tools.StreamsResetter.resetToDatetime(StreamsResetter.java:496) at kafka.tools.StreamsResetter.maybeReset(StreamsResetter.java:426) at kafka.tools.StreamsResetter.maybeResetInputAndSeekToEndIntermediateTopicOffsets(StreamsResetter.java:374) at kafka.tools.StreamsResetter.run(StreamsResetter.java:164) at kafka.tools.StreamsResetter.run(StreamsResetter.java:131) at kafka.tools.StreamsResetter.main(StreamsResetter.java:678)

       

       

      Attachments

        Issue Links

          Activity

            People

              marcolotz Marco Lotz
              jbfletch jbfletch
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: