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 2017/11/01 11:22:36 UTC

WordCount Example using GlobalKStore

i have created 3 inputtopics with 10 partitions each and output Topic with
10 partitions

I did wordcount example  and stored it in GlobalKTable.
i initally stored counted value  in LocalStateStore and then it to
GlobalStateStore.

i have atteated the code here:
https://gist.github.com/Pk007790/d46236b1b5c394301f27b96891a94584

and i have supplied the inputs to the producers like this
:https://gist.github.com/Pk007790/ba934b7bcea42b8b05f4816de3cb84a0

my ques is:how to store the processed information in GlobalStateStore
without localStateStore

Re: WordCount Example using GlobalKStore

Posted by Damian Guy <da...@gmail.com>.
Count will always use a StateStore, but if you want you can use an InMemory
store if you don't want a persistent store. You can do this by using the
overloaded `count(StateStoreSupplier<KeyValueStore>)` method. You would use
`Stores.create(name).inMemory()...` to create the inmemory store

On Wed, 1 Nov 2017 at 11:22 pravin kumar <pk...@gmail.com> wrote:

> i have created 3 inputtopics with 10 partitions each and output Topic with
> 10 partitions
>
> I did wordcount example  and stored it in GlobalKTable.
> i initally stored counted value  in LocalStateStore and then it to
> GlobalStateStore.
>
> i have atteated the code here:
> https://gist.github.com/Pk007790/d46236b1b5c394301f27b96891a94584
>
> and i have supplied the inputs to the producers like this
> :https://gist.github.com/Pk007790/ba934b7bcea42b8b05f4816de3cb84a0
>
> my ques is:how to store the processed information in GlobalStateStore
> without localStateStore
>