You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Igor Gnatyuk <gn...@gmail.com> on 2016/12/28 11:49:07 UTC

Make changes to cache entry before data rebalanicng.

Is there a way to make changes to cache entry before it is sent to another
node during rebalance? I want new node receive some additional data with
every cache entry. This data should be added to the object before
marshaling on the node where it was before rebalancing.

Re: Make changes to cache entry before data rebalanicng.

Posted by Igor Gnatyuk <gn...@gmail.com>.
Well, i am running ignite nodes on an "alien"(meh) architecture. JVM
implementation there has high latency when accessing data in memory, so i
am trying to move my data to c++ side of my code and then run some
processing on it. So my idea was to implement my own Marshaller wich would
"strip" my data when it enters ignite node. Marshaller would unmarshall my
data object and move the "heavy" part to c++ side via JNI, leaving only
small amount of meta data in ignite cache. But crawling through ignite
source code i found, that ignite actually stores serialized data as it
comes to a node, rather then storing only deserialized value
(CacheObjectImpl). So the problem is that i will have all this "heavy" data
still in java heap(or offheap) and its duplicate on the c++ side. When i
was asking the original question i didnt know this, so i think it does not
matter now =).

2016-12-28 17:50 GMT+03:00 Yakov Zhdanov <yz...@apache.org>:

> Igor, it is impossible to alter the value since it may cause data
> inconsistency. Imagine you have 2 nodes and cache with 1 backup.  3 node
> joins and you alter cache entries being sent from node 1 and 2 to 3, but
> those entries are currently backed up on 2 and 1 respectively.
>
> Please explain why you need this? I will try to come up with suggestions.
> Btw, what if rebalancing never happen? :) this is still possible, you know
>
> --Yakov
>
> 2016-12-28 14:49 GMT+03:00 Igor Gnatyuk <gn...@gmail.com>:
>
>> Is there a way to make changes to cache entry before it is sent to
>> another node during rebalance? I want new node receive some additional data
>> with every cache entry. This data should be added to the object before
>> marshaling on the node where it was before rebalancing.
>>
>
>

Re: Make changes to cache entry before data rebalanicng.

Posted by Yakov Zhdanov <yz...@apache.org>.
Igor, it is impossible to alter the value since it may cause data
inconsistency. Imagine you have 2 nodes and cache with 1 backup.  3 node
joins and you alter cache entries being sent from node 1 and 2 to 3, but
those entries are currently backed up on 2 and 1 respectively.

Please explain why you need this? I will try to come up with suggestions.
Btw, what if rebalancing never happen? :) this is still possible, you know

--Yakov

2016-12-28 14:49 GMT+03:00 Igor Gnatyuk <gn...@gmail.com>:

> Is there a way to make changes to cache entry before it is sent to another
> node during rebalance? I want new node receive some additional data with
> every cache entry. This data should be added to the object before
> marshaling on the node where it was before rebalancing.
>

Re: Make changes to cache entry before data rebalanicng.

Posted by dkarachentsev <dk...@gridgain.com>.
No, but you can subscribe on such events:
EventType.EVT_CACHE_REBALANCE_OBJECT_LOADED,
EventType.EVT_CACHE_REBALANCE_OBJECT_UNLOADED [1] and, for example, update
another cache with some metadata.

[1] https://apacheignite.readme.io/v1.8/docs/events



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Make-changes-to-cache-entry-before-data-rebalanicng-tp9777p9782.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.