You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Florian Hussonnois <fh...@gmail.com> on 2017/11/07 20:59:20 UTC

Invalid topology building: Processor has no access to StateStore

Hi,

Currently it's possible to register a store from a Processor instance via
the method StateStore#init(ProcessorContext, StateStore).

However, when this method is used the registered store seems to never be
add to the the variable ProcessorNode#stateStores which is leading
to Invalid topology building exception when accessing store with the method
ProcessorContext#getStateStore

Is it the desired behavior or a bug ?

-- 
Florian HUSSONNOIS

Re: Invalid topology building: Processor has no access to StateStore

Posted by Guozhang Wang <wa...@gmail.com>.
Hello Florian,

In PAPI, you need to associate the state store with the processor node via
the Topology#addStateStore(StoreBuilder); note that StateStore#init() is
supposed to be triggered by the Streams library only but not by the users:
it is called when the library is constructing the specified topology.


Guozhang


On Tue, Nov 7, 2017 at 12:59 PM, Florian Hussonnois <fh...@gmail.com>
wrote:

> Hi,
>
> Currently it's possible to register a store from a Processor instance via
> the method StateStore#init(ProcessorContext, StateStore).
>
> However, when this method is used the registered store seems to never be
> add to the the variable ProcessorNode#stateStores which is leading
> to Invalid topology building exception when accessing store with the method
> ProcessorContext#getStateStore
>
> Is it the desired behavior or a bug ?
>
> --
> Florian HUSSONNOIS
>



-- 
-- Guozhang