What do you mean by "store the data in appropriate bucket"? Affinity key is used to locate the partition, but the (regular) key is used to store the entry itself, so entries don't override each other since each entry has a unique key.
Stan prasadbhalerao1983 wrote > Hi, > > With affinity key ignite locates the partition and from partition it > locates the node using partition to node mapping. Now in this partition (I > believe that partition is nothing but a Map like data structure) to store > the data in appropriate bucket ignite must be using some thing apart from > affinity key. If every time is uses the affinity key then multiple records > with same affinity key will land in same map bucket resulting in > overwriting the data. > > So in my case if it just uses assetGroupId to locate the bucket inside > partition then it will simply overwrite the previous values. That's why I > asked, does ignite use any other properties from Key object to locate the > appropriate bucket in a given partition? > > Thanks, > Prasad > > On Mon, Mar 12, 2018 at 9:31 PM, Stanislav Lukyanov < > stanlukyanov@ > > > wrote: > >> There may be some misunderstanding. >> What I meant was that the data most likely WILL have good distribution >> with >> assetGroupId being @AffinityMappedId. To have a good distribution it is >> generally enough to have a lot of data groups, so that it is likely that >> each partition stores more or less equal number of groups. You have 100K >> groups - that seems to be a large enough number to me. >> >> Also, no, Ignite doesn't use all the fields to define where to put the >> data. >> Only affinity matters (which is in your case defined by assetGroupId). >> >> Thanks, >> Stan >> >> >> >> -- >> Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >> -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
