https://github.com/igorcoding/guavahash
Google's Guava consistent hashing implementation
https://github.com/igorcoding/guavahash
Last synced: 3 months ago
JSON representation
Google's Guava consistent hashing implementation
- Host: GitHub
- URL: https://github.com/igorcoding/guavahash
- Owner: igorcoding
- License: mit
- Created: 2016-02-27T13:58:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-27T20:34:48.000Z (over 9 years ago)
- Last Synced: 2024-07-10T07:21:00.430Z (12 months ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi?name=guavahash&:action=display
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# guavahash
[](https://travis-ci.org/igorcoding/guavahash)Google's Guava consistent hashing implementation
Assign to `input` a "bucket" in the range `[0, buckets)`, in a uniform manner
that minimizes the need for remapping as `buckets` grows.
That is, `consistentHash(h, n)` equals:* `n - 1`, with approximate probability `1/n`;
* `consistentHash(h, n - 1)`, otherwise (probability `1 - 1/n`).See the [wikipedia article on consistent hashing](http://en.wikipedia.org/wiki/Consistent_hashing)
for more information.