[ https://issues.apache.org/jira/browse/KAFKA-9527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17278390#comment-17278390 ]
Jorge Esteban Quilcate Otoya commented on KAFKA-9527: ----------------------------------------------------- > Interesting. Was this part of the KIP design or just a PR-scoped decision? > Overall, it might be best to align both tools to do the same thing? I can't find comments about this in the KIP or the thread, so a PR-scoped decision most probably. > Well, what would --dry-run print for this case? Atm prints the end offset. > The later seems more reasonable to me? Personally, I would still suggest to > also log a WARN for this case during execution, as we should not rely on > people to do a dry-run first. Good point. Will create a ticket to follow this up. > Application Reset Tool Returns NPE when --to-datetime or --by-duration are > run on --input-topics with empty partitions > ----------------------------------------------------------------------------------------------------------------------- > > Key: KAFKA-9527 > URL: https://issues.apache.org/jira/browse/KAFKA-9527 > Project: Kafka > Issue Type: Bug > Components: streams, tools > Affects Versions: 2.3.0 > Reporter: jbfletch > Assignee: jbfletch > Priority: Minor > > 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) > > -- This message was sent by Atlassian Jira (v8.3.4#803005)