1. Affinity knows that, because it does assignments. Method
assignPartitions() returns that assignments. Please read the javadoc [1].

2. I just described how keys could be assigned to partition. For example:
    @Override public int partition(Object key) {
        if (key instanceof Integer)
            return (Integer)key / 10000;

        return 0;
    }
How it should be applied to your case, you need to think.

3. Please check how assignPartitions() is implemented in
RendezvousAffinityFunction.

It doesn't matter from how many and what kind of nodes you're loading data,
affinity works equal for each node.

[1]
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/cache/affinity/AffinityFunction.html#assignPartitions-org.apache.ignite.cache.affinity.AffinityFunctionContext-

Thanks!
-Dmitry



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

Reply via email to