Riak's CHash library.
Erlang Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.eqc_ci
.gitignore
EQC_CI_LICENCE.txt
LICENSE
Makefile
README.md
rebar
rebar.config
rebar.lock
rebar_eqc.config
rebar_eqc_ci.config

README.md

Riak's Consistant Hashing Library

This library is an extraction of the chash functionality from riak_core.

Use

CH = chash:fresh(64, mariano).
CHB = chashbin:create(CH).
Key = {<<"foo">>, <<"bar">>},
DocIdx = chash:key_of(Key).
Itr = chashbin:iterator(DocIdx, CHB).
N = 3.
{Primaries, _} = chashbin:itr_pop(N, Itr).

change N to a different value to get a different amount of partitions.

Test

make test
make qc

License

Apache Public License 2.0, see LICENSE for details