ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkarachentsev <dkarachent...@gridgain.com>
Subject Re: How to use Affinity Function to Map a set of Keys to a particular node in a cluster?
Date Tue, 12 Jun 2018 09:07:03 GMT
Hi,

Make sure that your keys are go to specific partition. Only one node could
keep that partition at a time (except backups, of course). To do that, you
may use @AffinityKeyMapped annotation [1].

Additionally you can implement your own AffinityFunction that will assign
partitions that you need to specific node(s). You may try to extend
RendezvousAffinityFunction for that. In this case you may assign number of
partitions to proper node that you need.

[1]
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/model/EmployeeKey.java#L33

Thanks!
-Dmitry



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

Mime
View raw message