Skip to content

chlin501/consistent-hashing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This is a demo for consistent hashing with zookeeper.

Prerequisite

  • java version 8
  • scala version 2.11.7
  • sbt version 0.13.9

Usage

val hashing = ConsistenHashing.create(ZooKeeper(host="127.0.0.1", port=1234))
// post a node to zookeeper with 2 replicas
hashing.post(Node(port = 1000, replicas = 2)) 
// list mapping in zookeeper
val mapping = hashing.list
// find mapped node 
val node = hashing.findBy("smith")

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages