Hi,

You can solve the problem as follows:
1) create your pojo at the client, where all the classes are present;
2) convert pojo to the BinaryObject on the client;
3) put binary object in the cache.

In such a way, you can add new fields whenever you want. However, if you want to change the type of existing field, that will be still painfull

Vladimir
6:53, 27 октября 2021 г., Surinder Mehra <redni...@gmail.com>:
Peer class loading doesnt work on key and value objects of class as per ignite documentation

On Wed, Oct 27, 2021, 08:44 Ilya Kazakov <kazakov.i...@gmail.com> wrote:
Hi Rick. Actually, if you do not need to use your POJO classes on the server-side (e.g. for some compute tasks or in services) you can try just enabling peerClassLoding and put a new object from your client without any interruption. In this case, Ignite will serialize a new object and create in the cluster metadata a new schema for your POJO-type. The best way is a monotonic expansion of object fields set.

------------------
Ilya

ср, 27 окт. 2021 г. в 09:34, Rick Lee <eerick...@gmail.com>:
Dear all,

I'm currently on version 2.8 and use ignite.getOrCreateCache(cacheCfg) to create a cache, e.g., cache Account object, etc, on startup. Now whenever I want to add field to the Account class, I need to restart all nodes in the cluster in order to make the change effective, but obviously it will introduce service interruption. Any other way I can modify the class structure by only rolling restart the nodes instead of restarting the whole cluster?

Thanks & Regards,
Rick


--
Отправлено из мобильного приложения Яндекс.Почты

Reply via email to