You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by pravin kumar <pk...@gmail.com> on 2018/02/22 07:08:56 UTC

usage of depricated method in kafka 2_12.1.0.0

i have tried wikifeed example with Kafka 2_12.1.0.0.the count method is now
depricated ,

previously in kafka_2.11-0.10.2.1 i have given count(localStateStoreName).

how to give the statestore name in Kafka 2_12.1.0.0.

i have attached the code below,

Re: usage of depricated method in kafka 2_12.1.0.0

Posted by "Matthias J. Sax" <ma...@confluent.io>.
As the JavaDocs point out
(https://kafka.apache.org/10/javadoc/org/apache/kafka/streams/kstream/KGroupedStream.html#count-java.lang.String-),
the new method is

#count(Materialized)

for example


stream.groupByKey.count(Materialized.as("store-name"));


-Matthias

On 2/21/18 11:08 PM, pravin kumar wrote:
> i have tried wikifeed example with Kafka 2_12.1.0.0.the count method is
> now depricated ,
> 
> previously in kafka_2.11-0.10.2.1 i have given count(localStateStoreName).
> 
> how to give the statestore name in Kafka 2_12.1.0.0.
> 
> i have attached the code below,
>