kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guozhang Wang <wangg...@gmail.com>
Subject Re: In Kafka Streaming, Serdes should use Optionals
Date Fri, 07 Oct 2016 20:07:11 GMT
Hello Ali,

We do have corresponding overloaded functions for most of KStream / KTable
operators to avoid enforcing users to specify "null"; in these cases the
default serdes specified in the configs are then used. For example:

<T> KTable<K, T> aggregate(Initializer<T> initializer,
                           Aggregator<K, V, T> adder,
                           Aggregator<K, V, T> subtractor,
                           Serde<T> aggValueSerde,
                           String storeName);

/**
 * .. using default serializers and deserializers.
 */
<T> KTable<K, T> aggregate(Initializer<T> initializer,
                           Aggregator<K, V, T> adder,
                           Aggregator<K, V, T> subtractor,
                           String storeName);



Guozhang


On Fri, Oct 7, 2016 at 9:20 AM, Michael Noll <michael@confluent.io> wrote:

> Ali, the Apache Kafka project still targets Java 7, which means we can't
> use Java 8 features just yet.
>
> FYI: There's on ongoing conversation about when Kafka would move from Java
> 7 to Java 8.
>
> On Fri, Oct 7, 2016 at 6:14 PM, Ali Akhtar <ali.rac200@gmail.com> wrote:
>
> > Since we're using Java 8 in most cases anyway, Serdes / Serialiazers
> should
> > use options, to avoid having to deal with the lovely nulls.
> >
>



-- 
-- Guozhang

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message