You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by volijaadu <vo...@gmail.com> on 2017/07/04 06:24:21 UTC

Dynamically update the Cache Configuration without restsrting client and serve

Hi,

I am using Apache Ignite in client mode true with my web application. I am
using Java Configuration using IgniteConfiguration and CacheConfiguation
beans to configure the Caches and my Ignite 
Configuration.

I want to the update the  Apache Ignite Cache Configuration without
restarting the web application.

So, I have externalised the cache configuration (type,expiry and eviction
policies) to a properties file in a file based repository maintained by
Spring Cloud Configuration server.

Also, I am using SpringCacheManager and Spring Cache abstraction which
includes the @Cacheable annotation at method level.

I understand that caches are created automatically at first access and need
not be created in advance using Apache Ignite Configuration.

So, whenever I want to change any of the attributes of any of the caches I
update the configuration in 
 repository and then push the changes to the web application using Spring
Boot Actuator. I only reapply the changes to the CacheConfiguration and
IgniteConfiguration beans and set them again to SpringCacheManager.

The changes would typically be changing the expiration policy interval for
specific caches.


My question is I do not see the changes reflected when I push the changes to
the application by dynamically updating Configuration beans again and set
them to the SpringCacheManager bean instance will Apache Ignite update the
cache configuration in servers in the Apache Ignite instance running outside
my application in a different JVM. Since I use clientMode false.

Is this possible. Can we dynamically update/change the properties like
change the cache mode or change the expiry times at runtime.

Also, I get an checked exception about inconsistencies in Cache
Configuration and I am trying to change a cache mode to PARTITIONED in local
cache whereas in Remote it is REPLICATED.

Can someone guide me if it is possible to update the attributes in this way
and will the changes be reflected.










--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Dynamically-update-the-Cache-Configuration-without-restsrting-client-and-serve-tp14303.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

RE: Dynamically update the Cache Configuration without restsrting client and serve

Posted by vkulichenko <va...@gmail.com>.
Priya,

There are no configuration properties that can be changed in runtime.
However, most of your requirements seem to be related to dynamic schema
change. This already happens transparently on object level thanks to binary
format [1] used as a default data storage format. On SQL level this will be
possible when we have full DDL support.

[1] https://apacheignite.readme.io/docs/binary-marshaller

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Dynamically-update-the-Cache-Configuration-without-restsrting-client-and-serve-tp14303p14427.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

RE: Dynamically update the Cache Configuration without restsrting client and serve

Posted by Gracelin Priya <gp...@kodiakptt.com>.
Val,

Thanks for the information.

Cache property changes to list few.

1. field data type change from Short to long
2. Memory parameter changes for a cache
3. Writebehind parameters related to persistent store
4. New field addition to the cache 

Can you please confirm whether the above configuration can be changed in runtime?

It will be very helpful if you can point me to some documentation which lists all the parameters for cache configuration in a single place. 

Regards,
Priya


-----Original Message-----
From: vkulichenko [mailto:valentin.kulichenko@gmail.com] 
Sent: 06 July 2017 01:48
To: user@ignite.apache.org
Subject: RE: Dynamically update the Cache Configuration without restsrting client and serve

Hi Priya,

Cache configuration can't be changed in runtime in any of the versions. What properties are you looking to change exactly?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Dynamically-update-the-Cache-Configuration-without-restsrting-client-and-serve-tp14303p14346.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

RE: Dynamically update the Cache Configuration without restsrting client and serve

Posted by vkulichenko <va...@gmail.com>.
Hi Priya,

Cache configuration can't be changed in runtime in any of the versions. What
properties are you looking to change exactly?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Dynamically-update-the-Cache-Configuration-without-restsrting-client-and-serve-tp14303p14346.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

RE: Dynamically update the Cache Configuration without restsrting client and serve

Posted by Gracelin Priya <gp...@kodiakptt.com>.
Nikoli,

In gridgain 8.1.1, is the change of configuration of working caches supported? Can you please confirm.

Once a cache is created with certain attribute and is loaded with data can the attributes of the cache can  be changed later?

Is there a list of attributes of cache which can be updated/cannot be updated listed in any document? Any reference to the link will help a lot.

Thanks,
Priya


From: Nikolai Tikhonov [mailto:ntikhonov@apache.org]
Sent: 04 July 2017 22:58
To: user@ignite.apache.org
Subject: Re: Dynamically update the Cache Configuration without restsrting client and serve

Hello,

Ignite does not support to change configuration for working caches. You only can only destroy cache and create new cache with the same name with new configuration.

On Tue, Jul 4, 2017 at 9:24 AM, volijaadu <vo...@gmail.com>> wrote:
Hi,

I am using Apache Ignite in client mode true with my web application. I am
using Java Configuration using IgniteConfiguration and CacheConfiguation
beans to configure the Caches and my Ignite
Configuration.

I want to the update the  Apache Ignite Cache Configuration without
restarting the web application.

So, I have externalised the cache configuration (type,expiry and eviction
policies) to a properties file in a file based repository maintained by
Spring Cloud Configuration server.

Also, I am using SpringCacheManager and Spring Cache abstraction which
includes the @Cacheable annotation at method level.

I understand that caches are created automatically at first access and need
not be created in advance using Apache Ignite Configuration.

So, whenever I want to change any of the attributes of any of the caches I
update the configuration in
 repository and then push the changes to the web application using Spring
Boot Actuator. I only reapply the changes to the CacheConfiguration and
IgniteConfiguration beans and set them again to SpringCacheManager.

The changes would typically be changing the expiration policy interval for
specific caches.


My question is I do not see the changes reflected when I push the changes to
the application by dynamically updating Configuration beans again and set
them to the SpringCacheManager bean instance will Apache Ignite update the
cache configuration in servers in the Apache Ignite instance running outside
my application in a different JVM. Since I use clientMode false.

Is this possible. Can we dynamically update/change the properties like
change the cache mode or change the expiry times at runtime.

Also, I get an checked exception about inconsistencies in Cache
Configuration and I am trying to change a cache mode to PARTITIONED in local
cache whereas in Remote it is REPLICATED.

Can someone guide me if it is possible to update the attributes in this way
and will the changes be reflected.










--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Dynamically-update-the-Cache-Configuration-without-restsrting-client-and-serve-tp14303.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Re: Dynamically update the Cache Configuration without restsrting client and serve

Posted by Nikolai Tikhonov <nt...@apache.org>.
Hello,

Ignite does not support to change configuration for working caches. You
only can only destroy cache and create new cache with the same name with
new configuration.

On Tue, Jul 4, 2017 at 9:24 AM, volijaadu <vo...@gmail.com> wrote:

> Hi,
>
> I am using Apache Ignite in client mode true with my web application. I am
> using Java Configuration using IgniteConfiguration and CacheConfiguation
> beans to configure the Caches and my Ignite
> Configuration.
>
> I want to the update the  Apache Ignite Cache Configuration without
> restarting the web application.
>
> So, I have externalised the cache configuration (type,expiry and eviction
> policies) to a properties file in a file based repository maintained by
> Spring Cloud Configuration server.
>
> Also, I am using SpringCacheManager and Spring Cache abstraction which
> includes the @Cacheable annotation at method level.
>
> I understand that caches are created automatically at first access and need
> not be created in advance using Apache Ignite Configuration.
>
> So, whenever I want to change any of the attributes of any of the caches I
> update the configuration in
>  repository and then push the changes to the web application using Spring
> Boot Actuator. I only reapply the changes to the CacheConfiguration and
> IgniteConfiguration beans and set them again to SpringCacheManager.
>
> The changes would typically be changing the expiration policy interval for
> specific caches.
>
>
> My question is I do not see the changes reflected when I push the changes
> to
> the application by dynamically updating Configuration beans again and set
> them to the SpringCacheManager bean instance will Apache Ignite update the
> cache configuration in servers in the Apache Ignite instance running
> outside
> my application in a different JVM. Since I use clientMode false.
>
> Is this possible. Can we dynamically update/change the properties like
> change the cache mode or change the expiry times at runtime.
>
> Also, I get an checked exception about inconsistencies in Cache
> Configuration and I am trying to change a cache mode to PARTITIONED in
> local
> cache whereas in Remote it is REPLICATED.
>
> Can someone guide me if it is possible to update the attributes in this way
> and will the changes be reflected.
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Dynamically-update-the-Cache-Configuration-without-
> restsrting-client-and-serve-tp14303.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>