You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Aurel Sandu <as...@gmail.com> on 2019/12/23 16:30:33 UTC

Please give a link where I can explain myself what this can be ...

I'am reading the folowing code :
.......
        KTable<String, Long> wordCounts = textLines
            .flatMapValues(textLine -> Arrays.asList(textLine.toLowerCase().split("\\W+")))
            .groupBy((key, word) -> word)
            .count(Materialized.<String, Long, KeyValueStore<Bytes, byte[]>>as("counts-store"));
.......

I do not understand the last line ... what is this ?
Materialized.<String, Long, KeyValueStore<Bytes, byte[]>>as("counts-store")  ?
Materialized is from this https://kafka.apache.org/21/javadoc/org/apache/kafka/streams/kstream/Materialized.html
Please give me a link where I can find explanations ,
Many thanks,
Aurel 


Re: Please give a link where I can explain myself what this can be ...

Posted by "Matthias J. Sax" <ma...@confluent.io>.
Docs ->
https://kafka.apache.org/24/documentation/streams/developer-guide/dsl-api.html#aggregating



On 12/23/19 8:30 AM, Aurel Sandu wrote:
> I'am reading the folowing code :
> .......
>         KTable<String, Long> wordCounts = textLines
>             .flatMapValues(textLine -> Arrays.asList(textLine.toLowerCase().split("\\W+")))
>             .groupBy((key, word) -> word)
>             .count(Materialized.<String, Long, KeyValueStore<Bytes, byte[]>>as("counts-store"));
> .......
> 
> I do not understand the last line ... what is this ?
> Materialized.<String, Long, KeyValueStore<Bytes, byte[]>>as("counts-store")  ?
> Materialized is from this https://kafka.apache.org/21/javadoc/org/apache/kafka/streams/kstream/Materialized.html
> Please give me a link where I can find explanations ,
> Many thanks,
> Aurel 
>