kafka-jira 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-6592) NullPointerException thrown when executing ConsoleCosumer with deserializer set to `WindowedDeserializer`
Date Fri, 30 Mar 2018 07:27:00 GMT

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

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

huxihx opened a new pull request #4797: KAFKA-6592: ConsoleConsumer should support WindowedSerdes
URL: https://github.com/apache/kafka/pull/4797
 
 
   https://issues.apache.org/jira/browse/KAFKA-6592
   
   
   Have Console consumer support TimeWindowedDeserializer/SessionWindowedDeserializer by adding
new parameters `default.windowed.key.serde.inner` and `default.windowed.value.serde.inner`.
   
   An example would be like this:
   `... --property value.deserializer=org.apache.kafka.common.serialization.StringDeserializer
--property key.deserializer=org.apache.kafka.streams.kstream.TimeWindowedDeserializer --default.windowed.key.serde.inner
org.apache.kafka.common.serialization.Serdes\$StringSerde
   `
   
   When key/value.deserializer is not TimeWindowedDeserializer or SessionWindowedDeserializer,
specifying `default.windowed.key.serde.inner` or `default.windowed.value.serde.inner` takes
no effect.
   
   *More detailed description of your change,
   if necessary. The PR title and PR message become
   the squashed commit message, so use a separate
   comment to ping reviewers.*
   
   *Summary of testing strategy (including rationale)
   for the feature or bug fix. Unit and/or integration
   tests are expected for any behaviour change and
   system tests should be considered for larger changes.*
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> NullPointerException thrown when executing ConsoleCosumer with deserializer set to `WindowedDeserializer`
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-6592
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6592
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams, tools
>    Affects Versions: 1.0.0
>            Reporter: huxihx
>            Assignee: huxihx
>            Priority: Minor
>
> When reading streams app's output topic with WindowedDeserializer deserilizer using
kafka-console-consumer.sh, NullPointerException was thrown due to the fact that the inner
deserializer was not initialized since there is no place in ConsoleConsumer to set this class.
> Complete stack trace is shown below:
> {code:java}
> [2018-02-26 14:56:04,736] ERROR Unknown error when running consumer:  (kafka.tools.ConsoleConsumer$)
> java.lang.NullPointerException
> at org.apache.kafka.streams.kstream.internals.WindowedDeserializer.deserialize(WindowedDeserializer.java:89)
> at org.apache.kafka.streams.kstream.internals.WindowedDeserializer.deserialize(WindowedDeserializer.java:35)
> at kafka.tools.DefaultMessageFormatter.$anonfun$writeTo$2(ConsoleConsumer.scala:544)
> at scala.Option.map(Option.scala:146)
> at kafka.tools.DefaultMessageFormatter.write$1(ConsoleConsumer.scala:545)
> at kafka.tools.DefaultMessageFormatter.writeTo(ConsoleConsumer.scala:560)
> at kafka.tools.ConsoleConsumer$.process(ConsoleConsumer.scala:147)
> at kafka.tools.ConsoleConsumer$.run(ConsoleConsumer.scala:84)
> at kafka.tools.ConsoleConsumer$.main(ConsoleConsumer.scala:54)
> at kafka.tools.ConsoleConsumer.main(ConsoleConsumer.scala)
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message