DaveAKing / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

Consistent hash that can grow and shrink #1675

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I need a consistent hash and the only one in guava only grows which isn't 
useful. I ended up having to write my own which could shrink as well as grow. 
Also allowed load balancing which was kind of nice.

Any change of guava getting a decent consistent hash?

(via 
http://www.reddit.com/r/java/comments/1y9e6t/ama_were_the_google_team_behind_gua
va_dagger/cfitip5 )

Original issue reported on code.google.com by kak@google.com on 19 Feb 2014 at 5:28

GoogleCodeExporter commented 9 years ago
The existing Hashing.consistentHash can handle some kinds of shrinking -- say, 
if you go from having tasks 0-9 to having only 0-4. What it can't handle is 
something like "I still have tasks 0-3, 6, and 8-9 but not 4-5 or 7." I assume 
that the requester wants something like the latter?

Original comment by cpov...@google.com on 19 Feb 2014 at 5:32

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:09

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:17

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:07