kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avi Flax <avi.f...@parkassist.com>
Subject Re: KStreams.reduceByKey passing nulls to my Deserializer?
Date Tue, 14 Jun 2016 14:41:25 GMT

> On Jun 10, 2016, at 18:47, Guozhang Wang <wangguoz@gmail.com> wrote:
> 
> Yes, this is possible

OK, good to know — thanks!

I just checked the code in the Deserializers included with Kafka and I see that they check
for null values and simply pass them through; I guess that’s the correct behavior. I’ve
opened a PR to clarify the Javadocs for Deserializer: https://github.com/apache/kafka/pull/1503

> although we checked nullable keys when doing reduce
> / aggregations

Yeah, I’ve seen that, it makes sense and is very helpful.

> We do not check if the there are any values returned from the underlying
> state store, and when we cannot find such a match, null is returned to
> deserializer.

OK, got it.

> I think in general the library should guard this case instead of letting
> desers worry about it. Do you want to file a JIRA reporting this bug so we
> can follow-up?

I agree. Done: https://issues.apache.org/jira/browse/KAFKA-3836

Thanks!
Avi
Mime
View raw message