ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denis Mekhanikov <dmekhani...@gmail.com>
Subject Re: hashcode() collisions for data having more than 2 power 32(around 4.3 billion) entries in ignite cache
Date Fri, 01 Sep 2017 09:21:20 GMT

Hash code used by Ignite is indeed 32-bit, but it seems to be enough in
most use-cases.

If you put so many objects into a cache, then collisions will definitely
occur, but they will be resolved using 'equals' methods. Collisions happen
on much smaller datasets, this is part of normal work of a cache or a hash
table, but they may make the cache work slower.

Do you have a use-case when you want to put more than 4 billion objects
into cache?

Thank you!

пт, 1 сент. 2017 г. в 11:20, kotamrajuyashasvi <kotamrajuyashasvi@gmail.com

> Hi
> I am using a user-defined java object as a cache key in my ignite cache.
> Ignite uses the cache key objects overridden hashcode() method during
> mapping in cache. But hashcode() method returns an int which is 32 bits.
> Now
> if my cache has entries more than 2 power 32 which is around 4.3 billion ,
> then definitely collisions occur. How to tackle this situation. Does ignite
> provide an option where it could use some other own implemented method
> which
> would return a hashcode presumably containing more number of
> bits(64,128,256
> etc) which could be used by ignite while mapping.
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/

View raw message