You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Paul Callahan (Jira)" <ji...@apache.org> on 2022/02/17 22:03:00 UTC

[jira] [Created] (KAFKA-13675) Null pointer exception with kafka streams application reset tool with --to-datetime

Paul Callahan created KAFKA-13675:
-------------------------------------

             Summary: Null pointer exception with kafka streams application reset tool with --to-datetime
                 Key: KAFKA-13675
                 URL: https://issues.apache.org/jira/browse/KAFKA-13675
             Project: Kafka
          Issue Type: Bug
    Affects Versions: 2.8.1
            Reporter: Paul Callahan


When I try to run the the reset tool with {{{}--to-datetime{}}}, such as:

{{{{}}}}
{code:java}
kafka-streams-application-reset.sh --application-id "my-service" --bootstrap-servers 1.1.1.1:9092 --input-topics "my-topic" --to-datetime '2022-02-12T23:27:00.000' --execute{code}
{{{{}}}}

{{{{I get the following exception}}}}
{code:java}
Reset-offsets for input topics [my-topic] Following input topics offsets will be reset to (for consumer group my-service) ERROR: java.lang.NullPointerException: Cannot invoke "org.apache.kafka.clients.consumer.OffsetAndTimestamp.offset()" because the return value of "java.util.Map.get(Object)" is null java.lang.NullPointerException: Cannot invoke "org.apache.kafka.clients.consumer.OffsetAndTimestamp.offset()" because the return value of "java.util.Map.get(Object)" is null at kafka.tools.StreamsResetter.resetToDatetime(StreamsResetter.java:506) at kafka.tools.StreamsResetter.maybeReset(StreamsResetter.java:448) at kafka.tools.StreamsResetter.maybeResetInputAndSeekToEndIntermediateTopicOffsets(StreamsResetter.java:397) at kafka.tools.StreamsResetter.run(StreamsResetter.java:167) at kafka.tools.StreamsResetter.run(StreamsResetter.java:135) at kafka.tools.StreamsResetter.main(StreamsResetter.java:665){code}
Note when I run the above with {{--to-earliest}} or {{--to-offset}} instead of {{--to-datetime, the tool runs successfully.}}

{{{{}}}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)