[ 
https://issues.apache.org/jira/browse/KAFKA-5047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Ursul updated KAFKA-5047:
------------------------------
    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.


  was:
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



> NullPointerException while using GlobalKTable in KafkaStreams
> -------------------------------------------------------------
>
>                 Key: KAFKA-5047
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5047
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 0.10.2.0
>            Reporter: Ivan Ursul
>            Priority: Trivial
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to