You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2017/02/01 01:13:45 UTC

Re: Partition mapping to Ignite node

Take a look at AffinityFunction interface and its implementations provided by
Ignite. This should give you good understanding of how it works.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Partition-mapping-to-Ignite-node-tp10300p10347.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Partition mapping to Ignite node

Posted by vkulichenko <va...@gmail.com>.
AffinityFunctionContext is the input, it provides information about topology
for which the mapping has to be created. assignPartitions() method then has
to return this mapping. Here is the JavaDoc quote for this method:

Returns: Unmodifiable list indexed by partition number. Each element of
array is a collection in which first node is a primary node and other nodes
are backup nodes.

Everything else depends on what exactly you want to achieve. You can put any
logic you want in this method.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Partition-mapping-to-Ignite-node-tp10300p10491.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Partition mapping to Ignite node

Posted by rishi007bansod <ri...@gmail.com>.
I looked at following link,
https://ignite.apache.org/releases/1.7.0/javadoc/org/apache/ignite/cache/affinity/AffinityFunction.html
<https://ignite.apache.org/releases/1.7.0/javadoc/org/apache/ignite/cache/affinity/AffinityFunction.html>  
But i am not getting idea, how can i use AffinityFunctionContext to map
certain partition to certain node(i.e. how can i define my own mapping)? can
you give example for same(As above documentation does not explains this part
in detail)?

Thanks.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Partition-mapping-to-Ignite-node-tp10300p10485.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.