In ignite 2.1, persist a particular cache rather than all caches

classic Classic list List threaded Threaded
4 messages Options
Marco Marco
Reply | Threaded
Open this post in threaded view
|

In ignite 2.1, persist a particular cache rather than all caches

This post has NOT been accepted by the mailing list yet.
Hi,
I'm using ignite 2.1 to simulate realtime adobe traffic analytics, currently I have 10+ caches like raws, cookies, sessions, pages, products etc. they simply works well, but because of the data size, I don't want to save all of them, is there any way to simply persist a particular cache to disk?


        <property name="persistentStoreConfiguration">
            <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"/>
        </property>

                this.ignite=Ignition.ignite();
                IgniteConfiguration ic = this.ignite.configuration();
                PersistentStoreConfiguration pc = ic.getPersistentStoreConfiguration();
                pc.setPersistentStorePath("E:\\project\\ignite\\localCache");
                this.ignite.active(true);
                this.cacheEntries =   this.ignite.getOrCreateCache(init_entry("RawEntries"));
                this.cacheSessions = this.ignite.getOrCreateCache(init_sessions("Sessions"));
                this.cachePages =   this.ignite.getOrCreateCache(init_pages("Pages"));
                .......
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: In ignite 2.1, persist a particular cache rather than all caches

Hi,

Please properly subscribe to the mailing list so that the community can receive email notifications for your messages. To subscribe, send empty email to user-subscribe@ignite.apache.org and follow simple instructions in the reply.

Marco wrote
Hi,
I'm using ignite 2.1 to simulate realtime adobe traffic analytics, currently I have 10+ caches like raws, cookies, sessions, pages, products etc. they simply works well, but because of the data size, I don't want to save all of them, is there any way to simply persist a particular cache to disk?


        <property name="persistentStoreConfiguration">
            <bean class="org.apache.ignite.configuration.PersistentStoreConfiguration"/>
        </property>

                this.ignite=Ignition.ignite();
                IgniteConfiguration ic = this.ignite.configuration();
                PersistentStoreConfiguration pc = ic.getPersistentStoreConfiguration();
                pc.setPersistentStorePath("E:\\project\\ignite\\localCache");
                this.ignite.active(true);
                this.cacheEntries =   this.ignite.getOrCreateCache(init_entry("RawEntries"));
                this.cacheSessions = this.ignite.getOrCreateCache(init_sessions("Sessions"));
                this.cachePages =   this.ignite.getOrCreateCache(init_pages("Pages"));
                .......
Right now, if persistence is enabled, all caches are persisted. This will be improved in next releases.

Also keep in mind that configuration changes can't be done after node start. So your pc.setPersistentStorePath invocation will not have any affect, you should set the path in the initial configuration.

-Val
Marco Marco
Reply | Threaded
Open this post in threaded view
|

Re: In ignite 2.1, persist a particular cache rather than all caches

Hi Val,
Thank you for the response and it's good to know this feature will be announced in next release.
dsetrakyan dsetrakyan
Reply | Threaded
Open this post in threaded view
|

Re: In ignite 2.1, persist a particular cache rather than all caches



On Thu, Aug 17, 2017 at 4:48 PM, Marco <[hidden email]> wrote:
Hi Val,
Thank you for the response and it's good to know this feature will be
announced in next release.

You should expect it in September time frame.