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

NullPointerException while using GlobalKTable in KafkaStreams

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.2.0
    • 0.11.0.0
    • streams
    • None

    Description

      Main.java : https://gist.github.com/ivanursul/dcd4bb382c05843606a96417561b4b31
      pom.xml : https://gist.github.com/ivanursul/25baebc584e57c1fa200335f2cd21b43
      Logs: https://gist.github.com/ivanursul/4d023c783a80ea745f6ebade88c6b810

      WordsWithCountsTopic messages: https://gist.github.com/ivanursul/42b2312055ab200bd4bba1d4cab5791a

      I use kafka_2.10-0.10.2.0 downloaded from official website.

      Am I doing something wrong here ? I tried to follow this example:
      https://github.com/confluentinc/examples/blob/3.2.x/kafka-streams/src/main/java/io/confluent/examples/streams/GlobalKTablesExample.java

      Most probably, the problem is because there are missing keys for some messages:
      https://gist.github.com/ivanursul/87949fd35b67c6a7b22ceef7af72ea1c
      https://gist.github.com/ivanursul/366689aed57ee9d861846dcf4ccdae7c

      So, to finalize, the problem is that I mistakenly choose a wrong topic for a raw text lines and put them to another topic, which should have keys and which was connected to GlobalKTable. Since there were nulls, GlobalKTable failed to initialize. It would be nice if Kafka can send a warning, that partition contains messages with null keys.

      Attachments

        Issue Links

          Activity

            People

              damianguy Damian Guy
              ivanurusl Ivan Ursul
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: