第五周 实现一致性 hash 算法
运行结果:
2020-10-24 17:36:30.158 INFO com.demo.NodeManager - node id:1, key size:100086
2020-10-24 17:36:30.160 INFO com.demo.NodeManager - node id:2, key size:99729
2020-10-24 17:36:30.160 INFO com.demo.NodeManager - node id:3, key size:99602
2020-10-24 17:36:30.160 INFO com.demo.NodeManager - node id:4, key size:99794
2020-10-24 17:36:30.160 INFO com.demo.NodeManager - node id:5, key size:100051
2020-10-24 17:36:30.160 INFO com.demo.NodeManager - node id:6, key size:99978
2020-10-24 17:36:30.160 INFO com.demo.NodeManager - node id:7, key size:100040
2020-10-24 17:36:30.160 INFO com.demo.NodeManager - node id:8, key size:100326
2020-10-24 17:36:30.160 INFO com.demo.NodeManager - node id:9, key size:100406
2020-10-24 17:36:30.160 INFO com.demo.NodeManager - node id:10, key size:99988
2020-10-24 17:36:30.161 INFO com.demo.ClientTest - 标准差=236.13936562970605
多次运行,标准差均在200左右。
评论