You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by nithin91 <ni...@franklintempleton.com> on 2020/03/23 18:34:54 UTC

Ignite.cache.loadcache.Does this method do Increamental Load?

Hi 

I am trying to load the data into ignite cache using JDBC Pojo Store method
ignite.cache("cacheName").loadCache(null).I have used this method and got
the following results for the following scenarios.

*Scenario-1:Trying to load the same key which is available in cache*

In this case, the value part corresponding to the key is not updated in the
cache based on the latest available record.

*Scenario -2:When loading a key which is not present in cache.*

in this case, it is appending the new key and value pair to the cache and
preserving the old data.


But my doubt is why in scenario-1, it is not  updating the value
corresponding to the when i am  trying to load the same key.

Does this method do incremental load?.
Is this the expected behavior or do i need to set any additional property in
the bean file.Attaching you the bean configuration of the cache.

cache.xml
<http://apache-ignite-users.70518.x6.nabble.com/file/t2737/cache.xml>  









--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite.cache.loadcache.Does this method do Increamental Load?

Posted by Andrei Aleksandrov <ae...@gmail.com>.
Hi,

loadCache - will load all the keys and values from third party store 
into Ignite. It can be used for initial loading and for restore of the 
Ignite cache.

There are no incremental updates.

In case if you are going to do updates in the third party store not 
using Ignite API then you also should do the same for Ignite.

However, you can use read-through and write-through properties. They can 
help you to make your updates in 3-rd party store using Ignite API:

https://apacheignite.readme.io/docs/3rd-party-store#section-read-through-and-write-through

BR,
Andrei

3/23/2020 9:34 PM, nithin91 пишет:
> Hi
>
> I am trying to load the data into ignite cache using JDBC Pojo Store method
> ignite.cache("cacheName").loadCache(null).I have used this method and got
> the following results for the following scenarios.
>
> *Scenario-1:Trying to load the same key which is available in cache*
>
> In this case, the value part corresponding to the key is not updated in the
> cache based on the latest available record.
>
> *Scenario -2:When loading a key which is not present in cache.*
>
> in this case, it is appending the new key and value pair to the cache and
> preserving the old data.
>
>
> But my doubt is why in scenario-1, it is not  updating the value
> corresponding to the when i am  trying to load the same key.
>
> Does this method do incremental load?.
> Is this the expected behavior or do i need to set any additional property in
> the bean file.Attaching you the bean configuration of the cache.
>
> cache.xml
> <http://apache-ignite-users.70518.x6.nabble.com/file/t2737/cache.xml>
>
>
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite.cache.loadcache.Does this method do Increamental Load?

Posted by nithin91 <ni...@franklintempleton.com>.
Thanks for the inputs.It is really helpful.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite.cache.loadcache.Does this method do Increamental Load?

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

You can use Data Streamer with allowOverride flag set can do incremental
load with keys replacement. Load cache is tailored for initial loading only.

Of course, you will have to write your own code around Data Streamer.

Regards,
-- 
Ilya Kasnacheev


пт, 15 мая 2020 г. в 18:53, nithin91 <
nithinbharadwaj.govindaraju@franklintempleton.com>:

> Then what is the best way to do perform incremental load.
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: Ignite.cache.loadcache.Does this method do Increamental Load?

Posted by nithin91 <ni...@franklintempleton.com>.
Then what is the best way to do perform incremental load.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Ignite.cache.loadcache.Does this method do Increamental Load?

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

Yes, LoadCache will not overwrite keys with existing values.

Regards,
-- 
Ilya Kasnacheev


пн, 23 мар. 2020 г. в 21:35, nithin91 <
nithinbharadwaj.govindaraju@franklintempleton.com>:

> Hi
>
> I am trying to load the data into ignite cache using JDBC Pojo Store method
> ignite.cache("cacheName").loadCache(null).I have used this method and got
> the following results for the following scenarios.
>
> *Scenario-1:Trying to load the same key which is available in cache*
>
> In this case, the value part corresponding to the key is not updated in the
> cache based on the latest available record.
>
> *Scenario -2:When loading a key which is not present in cache.*
>
> in this case, it is appending the new key and value pair to the cache and
> preserving the old data.
>
>
> But my doubt is why in scenario-1, it is not  updating the value
> corresponding to the when i am  trying to load the same key.
>
> Does this method do incremental load?.
> Is this the expected behavior or do i need to set any additional property
> in
> the bean file.Attaching you the bean configuration of the cache.
>
> cache.xml
> <http://apache-ignite-users.70518.x6.nabble.com/file/t2737/cache.xml>
>
>
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>