Your code for getting a partition ID is correct.

Ignite can't use your "id" field to calculate partition - it just doesn't
know anything about it. It doesn't depend on the name, so calling it "id"
doesn't help, and it doesn't depend on the backing Oracle DB, so it doesn't
know that "id" is an autoincremented primary key.

You're correct about that with your setup all objects with the same
assetGroupId will end up in the same partition. That's just the semantics of
the @AffinityKeyMapped - "put all data with the same value in the same
partition". It isn't a bad thing per se - if you have 100K unique
assetGroupId values, it should be enough to have a decent data distribution
across the cluster.


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

Reply via email to