ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislav Lukyanov <stanlukya...@gmail.com>
Subject Re: Partition Id for a Data key in case of data colocation
Date Mon, 12 Mar 2018 13:17:52 GMT
Hi,

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.

Thanks,
Stan



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

Mime
View raw message