You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by pragmaticbigdata <am...@gmail.com> on 2017/01/11 12:15:20 UTC

Re-partitioning when partition key changes

Does Ignite (1.8) support re-partitioning of data at runtime? We have a use
case where the partition key (group of attributes) could change based on
user input. This should reflect in the data grid too. Does Ignite support
this capability? If it does how does it implement - Is there a specific API
(synchronous/asynchronous)? Is the data grid locked for that duration?
If this feature isn't supported kindly recommend possible approaches through
which this could be handled efficiently.

Thanks.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-partitioning-when-partition-key-changes-tp10031.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Re-partitioning when partition key changes

Posted by pragmaticbigdata <am...@gmail.com>.
Ok. That clears my understanding on how partitioning would work. Thanks 



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-partitioning-when-partition-key-changes-tp10031p10071.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Re-partitioning when partition key changes

Posted by vkulichenko <va...@gmail.com>.
Affinity key is part of the configuration and can't be change in runtime. The
only way to do this is to create another cache with new config and migrate
the data.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-partitioning-when-partition-key-changes-tp10031p10067.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Re-partitioning when partition key changes

Posted by pragmaticbigdata <am...@gmail.com>.
We have a dynamic model hence we plan to use the BinaryObject API. Our cache
looks like IgniteCache<BinaryObject, BinaryObject>. Out of the number of
attributes that could be part of the cache key, we plan to define the
partition key through the AffinityKeyMapper interface implementation. In the
affinityKey(key) method we would define the attributes whose values should
be used by Ignite to partition the cache across server nodes. 
These attributes could change at runtime based on user input. How can we let
Ignite know that the key partition has changed and it should recall the
AffinityKeyMapper? What would be the locking behavior? 
If re-partitioning cannot be done, what are the recommended workarounds?

Thanks!



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-partitioning-when-partition-key-changes-tp10031p10052.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Re-partitioning when partition key changes

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

What is 'partition key' and how is it used? Can you give an example for this
use case?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Re-partitioning-when-partition-key-changes-tp10031p10039.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.