kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5047) NullPointerException while using GlobalKTable in KafkaStreams
Date Mon, 10 Apr 2017 16:46:41 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-5047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15963145#comment-15963145
] 

ASF GitHub Bot commented on KAFKA-5047:
---------------------------------------

GitHub user dguy opened a pull request:

    https://github.com/apache/kafka/pull/2834

    KAFKA-5047: NullPointerException while using GlobalKTable in KafkaStreams

    Skip null keys when initializing GlobalKTables. This is inline with what happens during
normal processing.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dguy/kafka kafka-5047

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/2834.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2834
    
----
commit ada137175167e4d342056d658402e56d04cc1b6f
Author: Damian Guy <damian.guy@gmail.com>
Date:   2017-04-10T16:44:14Z

    skip null keys when restoring global state

----


> 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
>            Assignee: Damian Guy
>
> 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)

Mime
View raw message