Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

Riak's CHash library.

Resources

License

Packages

No packages published