You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "krkumar24061975@gmail.com" <kr...@gmail.com> on 2020/04/30 13:28:58 UTC
Event Listners when we use DataStreamer
Hi Guys - When I am adding entries into cache through DataStreamer.addData,
does it invoke the event listeners configured for EVT_CACHE_ENTRY_CREATED,
EventType.EVT_CACHE_OBJECT_PUT??
I am configuring a local listener in the following way
engine.events().localListen(cacheChangeHandler,
EventType.EVT_CACHE_ENTRY_CREATED,
EventType.EVT_CACHE_ENTRY_DESTROYED, EventType.EVT_CACHE_OBJECT_PUT,
EventType.EVT_CACHE_OBJECT_READ, EventType.EVT_CACHE_OBJECT_REMOVED,
EventType.EVT_CACHE_OBJECT_EXPIRED);
and in the configuration xml, I have the following:
<util:constant
static-field="org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_CREATED"/>
<util:constant
static-field="org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_DESTROYED"/>
<util:constant
static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT"/>
<util:constant
static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ"/>
<util:constant
static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED"/>
<util:constant
static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_EXPIRED"/>
Thanx and Regards,
KR Kumar
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Event Listners when we use DataStreamer
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
We have a test for this in our code base,
org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorSelfTest#testFlushTimeout
It passes in 2.8.
Do you have a reproducer where you don't see EVT_CACHE_OBJECT_PUT for cache
populated by data streamer with allowOverride(true)? Can you share it as a
small runnable project?
Are you sure you install your listener correctly?
Regards,
--
Ilya Kasnacheev
пт, 1 мая 2020 г. в 15:06, krkumar24061975@gmail.com <
krkumar24061975@gmail.com>:
> Hi Ilya - I have tried that but not firing the event. But it does fire for
> put and putAll
>
> Thanx and Regards,
> KR Kumar
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: Event Listners when we use DataStreamer
Posted by "krkumar24061975@gmail.com" <kr...@gmail.com>.
Hi Ilya - I have tried that but not firing the event. But it does fire for
put and putAll
Thanx and Regards,
KR Kumar
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Event Listners when we use DataStreamer
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
Does this change if you set allowOverride(true) on Data Streamer?
Regards,
--
Ilya Kasnacheev
чт, 30 апр. 2020 г. в 16:29, krkumar24061975@gmail.com <
krkumar24061975@gmail.com>:
> Hi Guys - When I am adding entries into cache through DataStreamer.addData,
> does it invoke the event listeners configured for EVT_CACHE_ENTRY_CREATED,
> EventType.EVT_CACHE_OBJECT_PUT??
>
> I am configuring a local listener in the following way
>
> engine.events().localListen(cacheChangeHandler,
> EventType.EVT_CACHE_ENTRY_CREATED,
>
> EventType.EVT_CACHE_ENTRY_DESTROYED, EventType.EVT_CACHE_OBJECT_PUT,
> EventType.EVT_CACHE_OBJECT_READ,
> EventType.EVT_CACHE_OBJECT_REMOVED,
>
> EventType.EVT_CACHE_OBJECT_EXPIRED);
>
> and in the configuration xml, I have the following:
> <util:constant
> static-field="org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_CREATED"/>
> <util:constant
>
> static-field="org.apache.ignite.events.EventType.EVT_CACHE_ENTRY_DESTROYED"/>
> <util:constant
> static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_PUT"/>
> <util:constant
> static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_READ"/>
> <util:constant
>
> static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_REMOVED"/>
> <util:constant
>
> static-field="org.apache.ignite.events.EventType.EVT_CACHE_OBJECT_EXPIRED"/>
>
>
> Thanx and Regards,
> KR Kumar
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>