码迷,mamicode.com
首页 > 其他好文 > 详细

Ketama Consisent Hash

时间:2015-06-17 13:20:08      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:

问题描述

有一些目标节点 v1, v2...vn

需要一个算法,能够将任意key映射到目标节点中的一个vx

 

评价方式

1. 对于一个比较大的key集合,分布在各个目标节点的key的数量要尽可能均匀

2. 如果目标节点集合有增减,key和vx的映射关系变化最小

普通的一致性哈希有明显的问题,不做赘述。

Ketama的java实现如下:

 

  1 package com.alibaba.ketama;
  2 
  3 import java.security.MessageDigest;
  4 import java.security.NoSuchAlgorithmException;
  5 import java.util.ArrayList;
  6 import java.util.LinkedList;
  7 import java.util.List;
  8 import java.util.SortedMap;
  9 import java.util.TreeMap;
 10 
 11 public class KetamaConsistentHash {
 12     
 13     private List<String> dstNodes = null;
 14     private SortedMap<Integer, String> rMap = null;
 15     private List<Integer> rList = null;
 16     
 17     private final int VirtualFactor = 128;
 18     
 19     public void init() {
 20         this.rMap = new TreeMap<Integer, String>();
 21         
 22         for(String s: this.dstNodes) {
 23             for(int i = 0; i < VirtualFactor; i++) {
 24                 int md5 = hash(s + i);
 25                 this.rMap.put(md5, s);
 26             }
 27         }
 28         this.rMap.put(0, this.dstNodes.get(0));
 29         
 30         this.rList = new ArrayList<Integer>(this.rMap.size());
 31         this.rList.addAll(this.rMap.keySet());
 32         this.rList.sort(null);
 33     }
 34     
 35     private int hash(String key) {
 36         MessageDigest md = null;
 37         try {
 38             md = MessageDigest.getInstance("MD5");
 39         } catch (NoSuchAlgorithmException e) {
 40             e.printStackTrace();
 41         }
 42         if(null == md) {
 43             return 0;
 44         }
 45         md.update(key.getBytes());
 46         byte[] md5hash = md.digest();
 47         assert(md5hash.length == 4);
 48         return (((int)md5hash[0]) << 24) 
 49                 | (((int)md5hash[1]) << 16)
 50                 | (((int)md5hash[2]) << 8)
 51                 | (((int)md5hash[0]));
 52     }
 53     
 54     public KetamaConsistentHash() {
 55         dstNodes = new LinkedList<String>();
 56     }
 57     
 58     public List<String> getDstNodes() {
 59         return this.dstNodes;
 60     }
 61     
 62     public void removeDstNode(String node) {
 63         if(dstNodes.contains(node)) {
 64             dstNodes.remove(node);
 65             this.init();
 66         }
 67     }
 68     
 69     public void addNewDstNode(String node) {
 70         if(!dstNodes.contains(node)) {
 71             dstNodes.add(node);
 72             this.init();
 73         }
 74     }
 75     
 76     public String getNode(String key) {
 77         if(null == this.dstNodes) {
 78             return null;
 79         }
 80         int md5 = hash(key);
 81         int i;
 82         for(i = 0; i < this.rList.size(); i++) {
 83             if(md5 < this.rList.get(i)) {
 84                 break;
 85             }
 86         }
 87         return this.rMap.get(this.rList.get(i - 1));
 88     }
 89     
 90     public void print() {
 91         System.out.println("size of dstNodes: " + dstNodes.size());
 92         System.out.println("dstNodes:" + dstNodes.toString());
 93         System.out.println("rMap:" + rMap.toString());
 94         System.out.println("rList:" + rList.toString());
 95     }
 96 
 97 
 98 
 99     public static void main(String[] args) {
100         KetamaConsistentHash kch = new KetamaConsistentHash();
101         kch.addNewDstNode("127.0.0.1:11211");
102         kch.addNewDstNode("127.0.0.2:11211");
103         kch.addNewDstNode("127.0.0.3:11211");
104         kch.addNewDstNode("127.0.0.4:11211");
105         kch.init();
106         kch.print();
107         
108         System.out.println(kch.getNode("key1"));
109         System.out.println(kch.getNode("key2"));
110         System.out.println(kch.getNode("key3"));
111         System.out.println(kch.getNode("key4"));
112         System.out.println(kch.getNode("key5"));
113         System.out.println(kch.getNode("key6"));
114         System.out.println(kch.getNode("key7"));
115         System.out.println(kch.getNode("key8"));
116         System.out.println(kch.getNode("key9"));
117         System.out.println(kch.getNode("key10"));
118         System.out.println(kch.getNode("key11"));
119         System.out.println(kch.getNode("key12"));
120         
121         
122         kch.removeDstNode("127.0.0.1:11211");
123         kch.init();
124         kch.print();
125         
126         System.out.println(kch.getNode("key1"));
127         System.out.println(kch.getNode("key2"));
128         System.out.println(kch.getNode("key3"));
129         System.out.println(kch.getNode("key4"));
130         System.out.println(kch.getNode("key5"));
131         System.out.println(kch.getNode("key6"));
132         System.out.println(kch.getNode("key7"));
133         System.out.println(kch.getNode("key8"));
134         System.out.println(kch.getNode("key9"));
135         System.out.println(kch.getNode("key10"));
136         System.out.println(kch.getNode("key11"));
137         System.out.println(kch.getNode("key12"));
138         
139         
140         kch.addNewDstNode("127.0.0.1:11211");
141         kch.init();
142         kch.print();
143         System.out.println(kch.getNode("key1"));
144         System.out.println(kch.getNode("key2"));
145         System.out.println(kch.getNode("key3"));
146         System.out.println(kch.getNode("key4"));
147         System.out.println(kch.getNode("key5"));
148         System.out.println(kch.getNode("key6"));
149         System.out.println(kch.getNode("key7"));
150         System.out.println(kch.getNode("key8"));
151         System.out.println(kch.getNode("key9"));
152         System.out.println(kch.getNode("key10"));
153         System.out.println(kch.getNode("key11"));
154         System.out.println(kch.getNode("key12"));
155     }
156 }


运行结果
 1 size of dstNodes: 4
 2 dstNodes:[127.0.0.1:11211, 127.0.0.2:11211, 127.0.0.3:11211, 127.0.0.4:11211]
 3 rMap:{-8303758=127.0.0.2:11211, -8238828=127.0.0.4:11211, -7923916=127.0.0.2:11211, -7640999=127.0.0.1:11211, -7521006=127.0.0.4:11211, -7513765=127.0.0.1:11211, -7513539=127.0.0.4:11211, -7439323=127.0.0.3:11211, -6930900=127.0.0.1:11211, -6928840=127.0.0.4:11211, -6865642=127.0.0.4:11211, -6800881=127.0.0.1:11211, -6474452=127.0.0.4:11211, -6474378=127.0.0.3:11211, -6396384=127.0.0.2:11211, -6353117=127.0.0.3:11211, -6331267=127.0.0.4:11211, -6284704=127.0.0.3:11211, -6142912=127.0.0.3:11211, -6139552=127.0.0.3:11211, -6074297=127.0.0.2:11211, -6001111=127.0.0.3:11211, -5543596=127.0.0.2:11211, -5489869=127.0.0.3:11211, -5043351=127.0.0.1:11211, -4832717=127.0.0.1:11211, -4821406=127.0.0.2:11211, -4775392=127.0.0.4:11211, -4773547=127.0.0.3:11211, -4757890=127.0.0.3:11211, -4707986=127.0.0.4:11211, -4642804=127.0.0.3:11211, -4494809=127.0.0.1:11211, -4227319=127.0.0.1:11211, -4062854=127.0.0.2:11211, -3984819=127.0.0.1:11211, -3913919=127.0.0.3:11211, -3725796=127.0.0.2:11211, -3453839=127.0.0.4:11211, -3317716=127.0.0.4:11211, -3210979=127.0.0.2:11211, -3181717=127.0.0.3:11211, -2871545=127.0.0.4:11211, -2748069=127.0.0.4:11211, -2530274=127.0.0.3:11211, -2470122=127.0.0.2:11211, -2261495=127.0.0.2:11211, -2012117=127.0.0.3:11211, -1966040=127.0.0.4:11211, -1763986=127.0.0.4:11211, -1747382=127.0.0.2:11211, -1675219=127.0.0.1:11211, -1420531=127.0.0.4:11211, -1176201=127.0.0.1:11211, -1167814=127.0.0.1:11211, -1015998=127.0.0.4:11211, -821978=127.0.0.4:11211, -760210=127.0.0.2:11211, -638884=127.0.0.2:11211, -379105=127.0.0.4:11211, -255916=127.0.0.2:11211, -129259=127.0.0.4:11211, -32768=127.0.0.4:11211, -32711=127.0.0.2:11211, -32487=127.0.0.4:11211, -32227=127.0.0.1:11211, -32155=127.0.0.2:11211, -31716=127.0.0.2:11211, -31709=127.0.0.4:11211, -31659=127.0.0.2:11211, -31187=127.0.0.4:11211, -31182=127.0.0.1:11211, -30931=127.0.0.3:11211, -30425=127.0.0.3:11211, -30397=127.0.0.4:11211, -30385=127.0.0.2:11211, -30348=127.0.0.3:11211, -29896=127.0.0.3:11211, -29672=127.0.0.3:11211, -29654=127.0.0.3:11211, -29415=127.0.0.1:11211, -28805=127.0.0.1:11211, -28620=127.0.0.2:11211, -28361=127.0.0.1:11211, -28091=127.0.0.3:11211, -27791=127.0.0.4:11211, -27629=127.0.0.2:11211, -27606=127.0.0.1:11211, -27363=127.0.0.4:11211, -27277=127.0.0.2:11211, -27068=127.0.0.4:11211, -27061=127.0.0.2:11211, -26848=127.0.0.3:11211, -26843=127.0.0.1:11211, -26767=127.0.0.4:11211, -25822=127.0.0.4:11211, -25740=127.0.0.3:11211, -25550=127.0.0.2:11211, -25533=127.0.0.2:11211, -25279=127.0.0.2:11211, -25229=127.0.0.2:11211, -24997=127.0.0.3:11211, -24730=127.0.0.1:11211, -24514=127.0.0.3:11211, -24461=127.0.0.1:11211, -24028=127.0.0.4:11211, -23807=127.0.0.2:11211, -23488=127.0.0.1:11211, -23429=127.0.0.2:11211, -23281=127.0.0.3:11211, -23016=127.0.0.2:11211, -22688=127.0.0.4:11211, -22454=127.0.0.1:11211, -22149=127.0.0.1:11211, -21991=127.0.0.1:11211, -21986=127.0.0.4:11211, -21753=127.0.0.3:11211, -21244=127.0.0.2:11211, -21181=127.0.0.2:11211, -21178=127.0.0.4:11211, -20944=127.0.0.2:11211, -20881=127.0.0.4:11211, -20643=127.0.0.2:11211, -20474=127.0.0.2:11211, -20446=127.0.0.4:11211, -20198=127.0.0.1:11211, -19632=127.0.0.4:11211, -18939=127.0.0.1:11211, -18905=127.0.0.4:11211, -18410=127.0.0.4:11211, -17837=127.0.0.1:11211, -17601=127.0.0.2:11211, -17304=127.0.0.3:11211, -17284=127.0.0.2:11211, -16832=127.0.0.3:11211, -16604=127.0.0.1:11211, -16554=127.0.0.2:11211, -16347=127.0.0.4:11211, -16260=127.0.0.1:11211, -16011=127.0.0.3:11211, -15490=127.0.0.3:11211, -15048=127.0.0.4:11211, -15029=127.0.0.3:11211, -14817=127.0.0.2:11211, -14801=127.0.0.2:11211, -14332=127.0.0.4:11211, -14326=127.0.0.3:11211, -13815=127.0.0.3:11211, -13794=127.0.0.3:11211, -13746=127.0.0.1:11211, -13563=127.0.0.1:11211, -13551=127.0.0.2:11211, -13523=127.0.0.3:11211, -13458=127.0.0.3:11211, -12173=127.0.0.3:11211, -12027=127.0.0.4:11211, -12010=127.0.0.4:11211, -11916=127.0.0.3:11211, -11771=127.0.0.4:11211, -11492=127.0.0.2:11211, -11472=127.0.0.3:11211, -11428=127.0.0.1:11211, -11242=127.0.0.2:11211, -10702=127.0.0.2:11211, -10674=127.0.0.4:11211, -10232=127.0.0.1:11211, -10194=127.0.0.4:11211, -10147=127.0.0.2:11211, -9397=127.0.0.1:11211, -9184=127.0.0.1:11211, -9134=127.0.0.1:11211, -8951=127.0.0.2:11211, -8899=127.0.0.2:11211, -8656=127.0.0.1:11211, -8654=127.0.0.4:11211, -8614=127.0.0.4:11211, -8416=127.0.0.3:11211, -8362=127.0.0.3:11211, -7927=127.0.0.3:11211, -7616=127.0.0.2:11211, -7557=127.0.0.2:11211, -6911=127.0.0.3:11211, -6590=127.0.0.3:11211, -6051=127.0.0.1:11211, -5525=127.0.0.1:11211, -5269=127.0.0.3:11211, -4851=127.0.0.4:11211, -4737=127.0.0.4:11211, -4510=127.0.0.2:11211, -4266=127.0.0.2:11211, -4088=127.0.0.1:11211, -4066=127.0.0.3:11211, -4013=127.0.0.1:11211, -3536=127.0.0.2:11211, -3043=127.0.0.4:11211, -2559=127.0.0.3:11211, -2010=127.0.0.1:11211, -1713=127.0.0.3:11211, -1460=127.0.0.4:11211, -1259=127.0.0.3:11211, -1178=127.0.0.1:11211, -983=127.0.0.4:11211, -981=127.0.0.4:11211, -918=127.0.0.4:11211, -663=127.0.0.2:11211, -652=127.0.0.4:11211, -441=127.0.0.1:11211, -142=127.0.0.3:11211, -128=127.0.0.4:11211, -127=127.0.0.3:11211, -126=127.0.0.3:11211, -125=127.0.0.4:11211, -124=127.0.0.3:11211, -123=127.0.0.3:11211, -122=127.0.0.1:11211, -121=127.0.0.3:11211, -120=127.0.0.3:11211, -117=127.0.0.3:11211, -116=127.0.0.4:11211, -115=127.0.0.2:11211, -114=127.0.0.3:11211, -113=127.0.0.4:11211, -112=127.0.0.2:11211, -111=127.0.0.2:11211, -110=127.0.0.4:11211, -109=127.0.0.4:11211, -108=127.0.0.4:11211, -107=127.0.0.1:11211, -106=127.0.0.3:11211, -105=127.0.0.3:11211, -104=127.0.0.3:11211, -103=127.0.0.3:11211, -102=127.0.0.2:11211, -101=127.0.0.4:11211, -100=127.0.0.4:11211, -99=127.0.0.4:11211, -98=127.0.0.4:11211, -97=127.0.0.1:11211, -96=127.0.0.4:11211, -95=127.0.0.3:11211, -94=127.0.0.4:11211, -93=127.0.0.4:11211, -92=127.0.0.4:11211, -91=127.0.0.4:11211, -89=127.0.0.4:11211, -88=127.0.0.3:11211, -87=127.0.0.4:11211, -86=127.0.0.4:11211, -85=127.0.0.4:11211, -83=127.0.0.4:11211, -82=127.0.0.4:11211, -80=127.0.0.4:11211, -79=127.0.0.3:11211, -76=127.0.0.4:11211, -75=127.0.0.1:11211, -74=127.0.0.3:11211, -73=127.0.0.2:11211, -71=127.0.0.3:11211, -70=127.0.0.3:11211, -69=127.0.0.2:11211, -68=127.0.0.4:11211, -67=127.0.0.4:11211, -66=127.0.0.4:11211, -65=127.0.0.4:11211, -64=127.0.0.4:11211, -63=127.0.0.2:11211, -62=127.0.0.3:11211, -61=127.0.0.1:11211, -60=127.0.0.1:11211, -59=127.0.0.4:11211, -57=127.0.0.4:11211, -55=127.0.0.4:11211, -52=127.0.0.3:11211, -50=127.0.0.4:11211, -49=127.0.0.4:11211, -48=127.0.0.1:11211, -46=127.0.0.2:11211, -45=127.0.0.4:11211, -44=127.0.0.4:11211, -42=127.0.0.4:11211, -41=127.0.0.1:11211, -38=127.0.0.3:11211, -37=127.0.0.3:11211, -34=127.0.0.4:11211, -33=127.0.0.1:11211, -32=127.0.0.4:11211, -31=127.0.0.4:11211, -30=127.0.0.4:11211, -29=127.0.0.4:11211, -27=127.0.0.2:11211, -26=127.0.0.2:11211, -25=127.0.0.4:11211, -24=127.0.0.4:11211, -23=127.0.0.3:11211, -22=127.0.0.4:11211, -21=127.0.0.3:11211, -19=127.0.0.3:11211, -18=127.0.0.3:11211, -17=127.0.0.4:11211, -15=127.0.0.3:11211, -14=127.0.0.4:11211, -13=127.0.0.3:11211, -12=127.0.0.1:11211, -11=127.0.0.4:11211, -10=127.0.0.2:11211, -9=127.0.0.4:11211, -7=127.0.0.3:11211, -6=127.0.0.3:11211, -5=127.0.0.4:11211, -4=127.0.0.3:11211, -3=127.0.0.4:11211, -2=127.0.0.3:11211, -1=127.0.0.4:11211, 0=127.0.0.1:11211, 3166720=127.0.0.2:11211, 5725440=127.0.0.2:11211, 69939460=127.0.0.2:11211, 75391236=127.0.0.1:11211, 122299399=127.0.0.2:11211, 142151432=127.0.0.4:11211, 151264265=127.0.0.4:11211, 157958921=127.0.0.2:11211, 240848142=127.0.0.2:11211, 241119246=127.0.0.2:11211, 290593297=127.0.0.2:11211, 325071379=127.0.0.4:11211, 337903892=127.0.0.3:11211, 455881755=127.0.0.1:11211, 540084256=127.0.0.3:11211, 560072737=127.0.0.4:11211, 623787557=127.0.0.3:11211, 659427623=127.0.0.2:11211, 706698794=127.0.0.4:11211, 724514603=127.0.0.2:11211, 774722094=127.0.0.2:11211, 788610095=127.0.0.1:11211, 840464946=127.0.0.4:11211, 894778165=127.0.0.1:11211, 913855286=127.0.0.2:11211, 964384825=127.0.0.3:11211, 1062820927=127.0.0.1:11211, 1075674688=127.0.0.1:11211, 1076056384=127.0.0.2:11211, 1111319874=127.0.0.1:11211, 1162698821=127.0.0.1:11211, 1260091467=127.0.0.2:11211, 1264278859=127.0.0.2:11211, 1265501771=127.0.0.1:11211, 1313932878=127.0.0.3:11211, 1383203410=127.0.0.3:11211, 1400111955=127.0.0.2:11211, 1444098390=127.0.0.3:11211, 1480327256=127.0.0.2:11211, 1482497880=127.0.0.1:11211, 1496911449=127.0.0.3:11211, 1544519516=127.0.0.1:11211, 1579028574=127.0.0.3:11211, 1634095713=127.0.0.4:11211, 1763668585=127.0.0.1:11211, 1830028141=127.0.0.2:11211, 1845771118=127.0.0.2:11211, 1882290544=127.0.0.4:11211, 1885471088=127.0.0.2:11211, 1931487859=127.0.0.2:11211, 2000446327=127.0.0.1:11211, 2132835455=127.0.0.2:11211, 2134857599=127.0.0.4:11211, 2137145471=127.0.0.1:11211}
 4 rList:[-8303758, -8238828, -7923916, -7640999, -7521006, -7513765, -7513539, -7439323, -6930900, -6928840, -6865642, -6800881, -6474452, -6474378, -6396384, -6353117, -6331267, -6284704, -6142912, -6139552, -6074297, -6001111, -5543596, -5489869, -5043351, -4832717, -4821406, -4775392, -4773547, -4757890, -4707986, -4642804, -4494809, -4227319, -4062854, -3984819, -3913919, -3725796, -3453839, -3317716, -3210979, -3181717, -2871545, -2748069, -2530274, -2470122, -2261495, -2012117, -1966040, -1763986, -1747382, -1675219, -1420531, -1176201, -1167814, -1015998, -821978, -760210, -638884, -379105, -255916, -129259, -32768, -32711, -32487, -32227, -32155, -31716, -31709, -31659, -31187, -31182, -30931, -30425, -30397, -30385, -30348, -29896, -29672, -29654, -29415, -28805, -28620, -28361, -28091, -27791, -27629, -27606, -27363, -27277, -27068, -27061, -26848, -26843, -26767, -25822, -25740, -25550, -25533, -25279, -25229, -24997, -24730, -24514, -24461, -24028, -23807, -23488, -23429, -23281, -23016, -22688, -22454, -22149, -21991, -21986, -21753, -21244, -21181, -21178, -20944, -20881, -20643, -20474, -20446, -20198, -19632, -18939, -18905, -18410, -17837, -17601, -17304, -17284, -16832, -16604, -16554, -16347, -16260, -16011, -15490, -15048, -15029, -14817, -14801, -14332, -14326, -13815, -13794, -13746, -13563, -13551, -13523, -13458, -12173, -12027, -12010, -11916, -11771, -11492, -11472, -11428, -11242, -10702, -10674, -10232, -10194, -10147, -9397, -9184, -9134, -8951, -8899, -8656, -8654, -8614, -8416, -8362, -7927, -7616, -7557, -6911, -6590, -6051, -5525, -5269, -4851, -4737, -4510, -4266, -4088, -4066, -4013, -3536, -3043, -2559, -2010, -1713, -1460, -1259, -1178, -983, -981, -918, -663, -652, -441, -142, -128, -127, -126, -125, -124, -123, -122, -121, -120, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104, -103, -102, -101, -100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -89, -88, -87, -86, -85, -83, -82, -80, -79, -76, -75, -74, -73, -71, -70, -69, -68, -67, -66, -65, -64, -63, -62, -61, -60, -59, -57, -55, -52, -50, -49, -48, -46, -45, -44, -42, -41, -38, -37, -34, -33, -32, -31, -30, -29, -27, -26, -25, -24, -23, -22, -21, -19, -18, -17, -15, -14, -13, -12, -11, -10, -9, -7, -6, -5, -4, -3, -2, -1, 0, 3166720, 5725440, 69939460, 75391236, 122299399, 142151432, 151264265, 157958921, 240848142, 241119246, 290593297, 325071379, 337903892, 455881755, 540084256, 560072737, 623787557, 659427623, 706698794, 724514603, 774722094, 788610095, 840464946, 894778165, 913855286, 964384825, 1062820927, 1075674688, 1076056384, 1111319874, 1162698821, 1260091467, 1264278859, 1265501771, 1313932878, 1383203410, 1400111955, 1444098390, 1480327256, 1482497880, 1496911449, 1544519516, 1579028574, 1634095713, 1763668585, 1830028141, 1845771118, 1882290544, 1885471088, 1931487859, 2000446327, 2132835455, 2134857599, 2137145471]
 5 127.0.0.3:11211
 6 127.0.0.2:11211
 7 127.0.0.1:11211
 8 127.0.0.4:11211
 9 127.0.0.4:11211
10 127.0.0.3:11211
11 127.0.0.3:11211
12 127.0.0.1:11211
13 127.0.0.3:11211
14 127.0.0.3:11211
15 127.0.0.4:11211
16 127.0.0.1:11211
17 size of dstNodes: 3
18 dstNodes:[127.0.0.2:11211, 127.0.0.3:11211, 127.0.0.4:11211]
19 rMap:{-8303758=127.0.0.2:11211, -8238828=127.0.0.4:11211, -7923916=127.0.0.2:11211, -7521006=127.0.0.4:11211, -7513539=127.0.0.4:11211, -7439323=127.0.0.3:11211, -6928840=127.0.0.4:11211, -6865642=127.0.0.4:11211, -6474452=127.0.0.4:11211, -6474378=127.0.0.3:11211, -6396384=127.0.0.2:11211, -6353117=127.0.0.3:11211, -6331267=127.0.0.4:11211, -6284704=127.0.0.3:11211, -6142912=127.0.0.3:11211, -6139552=127.0.0.3:11211, -6074297=127.0.0.2:11211, -6001111=127.0.0.3:11211, -5543596=127.0.0.2:11211, -5489869=127.0.0.3:11211, -4821406=127.0.0.2:11211, -4775392=127.0.0.4:11211, -4773547=127.0.0.3:11211, -4757890=127.0.0.3:11211, -4707986=127.0.0.4:11211, -4642804=127.0.0.3:11211, -4062854=127.0.0.2:11211, -3913919=127.0.0.3:11211, -3725796=127.0.0.2:11211, -3453839=127.0.0.4:11211, -3317716=127.0.0.4:11211, -3210979=127.0.0.2:11211, -3181717=127.0.0.3:11211, -2871545=127.0.0.4:11211, -2748069=127.0.0.4:11211, -2530274=127.0.0.3:11211, -2470122=127.0.0.2:11211, -2261495=127.0.0.2:11211, -2012117=127.0.0.3:11211, -1966040=127.0.0.4:11211, -1763986=127.0.0.4:11211, -1747382=127.0.0.2:11211, -1420531=127.0.0.4:11211, -1015998=127.0.0.4:11211, -821978=127.0.0.4:11211, -760210=127.0.0.2:11211, -638884=127.0.0.2:11211, -379105=127.0.0.4:11211, -255916=127.0.0.2:11211, -129259=127.0.0.4:11211, -32768=127.0.0.4:11211, -32711=127.0.0.2:11211, -32487=127.0.0.4:11211, -32155=127.0.0.2:11211, -31716=127.0.0.2:11211, -31709=127.0.0.4:11211, -31659=127.0.0.2:11211, -31187=127.0.0.4:11211, -30931=127.0.0.3:11211, -30425=127.0.0.3:11211, -30397=127.0.0.4:11211, -30385=127.0.0.2:11211, -30348=127.0.0.3:11211, -29896=127.0.0.3:11211, -29672=127.0.0.3:11211, -29654=127.0.0.3:11211, -28620=127.0.0.2:11211, -28091=127.0.0.3:11211, -27791=127.0.0.4:11211, -27629=127.0.0.2:11211, -27363=127.0.0.4:11211, -27277=127.0.0.2:11211, -27068=127.0.0.4:11211, -27061=127.0.0.2:11211, -26848=127.0.0.3:11211, -26767=127.0.0.4:11211, -25822=127.0.0.4:11211, -25740=127.0.0.3:11211, -25550=127.0.0.2:11211, -25533=127.0.0.2:11211, -25279=127.0.0.2:11211, -25229=127.0.0.2:11211, -24997=127.0.0.3:11211, -24514=127.0.0.3:11211, -24028=127.0.0.4:11211, -23807=127.0.0.2:11211, -23429=127.0.0.2:11211, -23281=127.0.0.3:11211, -23016=127.0.0.2:11211, -22688=127.0.0.4:11211, -21986=127.0.0.4:11211, -21753=127.0.0.3:11211, -21244=127.0.0.2:11211, -21181=127.0.0.2:11211, -21178=127.0.0.4:11211, -20944=127.0.0.2:11211, -20881=127.0.0.4:11211, -20643=127.0.0.2:11211, -20474=127.0.0.2:11211, -20446=127.0.0.4:11211, -19632=127.0.0.4:11211, -18905=127.0.0.4:11211, -18410=127.0.0.4:11211, -17601=127.0.0.2:11211, -17304=127.0.0.3:11211, -17284=127.0.0.2:11211, -16832=127.0.0.3:11211, -16554=127.0.0.2:11211, -16347=127.0.0.4:11211, -16011=127.0.0.3:11211, -15490=127.0.0.3:11211, -15048=127.0.0.4:11211, -15029=127.0.0.3:11211, -14817=127.0.0.2:11211, -14801=127.0.0.2:11211, -14332=127.0.0.4:11211, -14326=127.0.0.3:11211, -13815=127.0.0.3:11211, -13794=127.0.0.3:11211, -13551=127.0.0.2:11211, -13523=127.0.0.3:11211, -13458=127.0.0.3:11211, -12173=127.0.0.3:11211, -12027=127.0.0.4:11211, -12010=127.0.0.4:11211, -11916=127.0.0.3:11211, -11771=127.0.0.4:11211, -11492=127.0.0.2:11211, -11472=127.0.0.3:11211, -11242=127.0.0.2:11211, -10702=127.0.0.2:11211, -10674=127.0.0.4:11211, -10194=127.0.0.4:11211, -10147=127.0.0.2:11211, -8951=127.0.0.2:11211, -8899=127.0.0.2:11211, -8654=127.0.0.4:11211, -8614=127.0.0.4:11211, -8416=127.0.0.3:11211, -8362=127.0.0.3:11211, -7927=127.0.0.3:11211, -7616=127.0.0.2:11211, -7557=127.0.0.2:11211, -6911=127.0.0.3:11211, -6590=127.0.0.3:11211, -5269=127.0.0.3:11211, -4851=127.0.0.4:11211, -4737=127.0.0.4:11211, -4510=127.0.0.2:11211, -4266=127.0.0.2:11211, -4066=127.0.0.3:11211, -3536=127.0.0.2:11211, -3043=127.0.0.4:11211, -2559=127.0.0.3:11211, -1713=127.0.0.3:11211, -1460=127.0.0.4:11211, -1259=127.0.0.3:11211, -983=127.0.0.4:11211, -981=127.0.0.4:11211, -918=127.0.0.4:11211, -663=127.0.0.2:11211, -652=127.0.0.4:11211, -142=127.0.0.3:11211, -128=127.0.0.4:11211, -127=127.0.0.3:11211, -126=127.0.0.3:11211, -125=127.0.0.4:11211, -124=127.0.0.3:11211, -123=127.0.0.3:11211, -121=127.0.0.3:11211, -120=127.0.0.3:11211, -117=127.0.0.3:11211, -116=127.0.0.4:11211, -115=127.0.0.2:11211, -114=127.0.0.3:11211, -113=127.0.0.4:11211, -112=127.0.0.2:11211, -111=127.0.0.2:11211, -110=127.0.0.4:11211, -109=127.0.0.4:11211, -108=127.0.0.4:11211, -106=127.0.0.3:11211, -105=127.0.0.3:11211, -104=127.0.0.3:11211, -103=127.0.0.3:11211, -102=127.0.0.2:11211, -101=127.0.0.4:11211, -100=127.0.0.4:11211, -99=127.0.0.4:11211, -98=127.0.0.4:11211, -96=127.0.0.4:11211, -95=127.0.0.3:11211, -94=127.0.0.4:11211, -93=127.0.0.4:11211, -92=127.0.0.4:11211, -91=127.0.0.4:11211, -89=127.0.0.4:11211, -88=127.0.0.3:11211, -87=127.0.0.4:11211, -86=127.0.0.4:11211, -85=127.0.0.4:11211, -83=127.0.0.4:11211, -82=127.0.0.4:11211, -80=127.0.0.4:11211, -79=127.0.0.3:11211, -76=127.0.0.4:11211, -74=127.0.0.3:11211, -73=127.0.0.2:11211, -71=127.0.0.3:11211, -70=127.0.0.3:11211, -69=127.0.0.2:11211, -68=127.0.0.4:11211, -67=127.0.0.4:11211, -66=127.0.0.4:11211, -65=127.0.0.4:11211, -64=127.0.0.4:11211, -63=127.0.0.2:11211, -62=127.0.0.3:11211, -59=127.0.0.4:11211, -57=127.0.0.4:11211, -55=127.0.0.4:11211, -52=127.0.0.3:11211, -50=127.0.0.4:11211, -49=127.0.0.4:11211, -46=127.0.0.2:11211, -45=127.0.0.4:11211, -44=127.0.0.4:11211, -42=127.0.0.4:11211, -38=127.0.0.3:11211, -37=127.0.0.3:11211, -34=127.0.0.4:11211, -32=127.0.0.4:11211, -31=127.0.0.4:11211, -30=127.0.0.4:11211, -29=127.0.0.4:11211, -27=127.0.0.2:11211, -26=127.0.0.2:11211, -25=127.0.0.4:11211, -24=127.0.0.4:11211, -23=127.0.0.3:11211, -22=127.0.0.4:11211, -21=127.0.0.3:11211, -19=127.0.0.3:11211, -18=127.0.0.3:11211, -17=127.0.0.4:11211, -15=127.0.0.3:11211, -14=127.0.0.4:11211, -13=127.0.0.3:11211, -11=127.0.0.4:11211, -10=127.0.0.2:11211, -9=127.0.0.4:11211, -7=127.0.0.3:11211, -6=127.0.0.3:11211, -5=127.0.0.4:11211, -4=127.0.0.3:11211, -3=127.0.0.4:11211, -2=127.0.0.3:11211, -1=127.0.0.4:11211, 0=127.0.0.2:11211, 3166720=127.0.0.2:11211, 5725440=127.0.0.2:11211, 69939460=127.0.0.2:11211, 122299399=127.0.0.2:11211, 142151432=127.0.0.4:11211, 151264265=127.0.0.4:11211, 157958921=127.0.0.2:11211, 240848142=127.0.0.2:11211, 241119246=127.0.0.2:11211, 290593297=127.0.0.2:11211, 325071379=127.0.0.4:11211, 337903892=127.0.0.3:11211, 540084256=127.0.0.3:11211, 560072737=127.0.0.4:11211, 623787557=127.0.0.3:11211, 659427623=127.0.0.2:11211, 706698794=127.0.0.4:11211, 724514603=127.0.0.2:11211, 774722094=127.0.0.2:11211, 840464946=127.0.0.4:11211, 913855286=127.0.0.2:11211, 964384825=127.0.0.3:11211, 1076056384=127.0.0.2:11211, 1260091467=127.0.0.2:11211, 1264278859=127.0.0.2:11211, 1313932878=127.0.0.3:11211, 1383203410=127.0.0.3:11211, 1400111955=127.0.0.2:11211, 1444098390=127.0.0.3:11211, 1480327256=127.0.0.2:11211, 1496911449=127.0.0.3:11211, 1579028574=127.0.0.3:11211, 1634095713=127.0.0.4:11211, 1830028141=127.0.0.2:11211, 1845771118=127.0.0.2:11211, 1882290544=127.0.0.4:11211, 1885471088=127.0.0.2:11211, 1931487859=127.0.0.2:11211, 2132835455=127.0.0.2:11211, 2134857599=127.0.0.4:11211}
20 rList:[-8303758, -8238828, -7923916, -7521006, -7513539, -7439323, -6928840, -6865642, -6474452, -6474378, -6396384, -6353117, -6331267, -6284704, -6142912, -6139552, -6074297, -6001111, -5543596, -5489869, -4821406, -4775392, -4773547, -4757890, -4707986, -4642804, -4062854, -3913919, -3725796, -3453839, -3317716, -3210979, -3181717, -2871545, -2748069, -2530274, -2470122, -2261495, -2012117, -1966040, -1763986, -1747382, -1420531, -1015998, -821978, -760210, -638884, -379105, -255916, -129259, -32768, -32711, -32487, -32155, -31716, -31709, -31659, -31187, -30931, -30425, -30397, -30385, -30348, -29896, -29672, -29654, -28620, -28091, -27791, -27629, -27363, -27277, -27068, -27061, -26848, -26767, -25822, -25740, -25550, -25533, -25279, -25229, -24997, -24514, -24028, -23807, -23429, -23281, -23016, -22688, -21986, -21753, -21244, -21181, -21178, -20944, -20881, -20643, -20474, -20446, -19632, -18905, -18410, -17601, -17304, -17284, -16832, -16554, -16347, -16011, -15490, -15048, -15029, -14817, -14801, -14332, -14326, -13815, -13794, -13551, -13523, -13458, -12173, -12027, -12010, -11916, -11771, -11492, -11472, -11242, -10702, -10674, -10194, -10147, -8951, -8899, -8654, -8614, -8416, -8362, -7927, -7616, -7557, -6911, -6590, -5269, -4851, -4737, -4510, -4266, -4066, -3536, -3043, -2559, -1713, -1460, -1259, -983, -981, -918, -663, -652, -142, -128, -127, -126, -125, -124, -123, -121, -120, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -106, -105, -104, -103, -102, -101, -100, -99, -98, -96, -95, -94, -93, -92, -91, -89, -88, -87, -86, -85, -83, -82, -80, -79, -76, -74, -73, -71, -70, -69, -68, -67, -66, -65, -64, -63, -62, -59, -57, -55, -52, -50, -49, -46, -45, -44, -42, -38, -37, -34, -32, -31, -30, -29, -27, -26, -25, -24, -23, -22, -21, -19, -18, -17, -15, -14, -13, -11, -10, -9, -7, -6, -5, -4, -3, -2, -1, 0, 3166720, 5725440, 69939460, 122299399, 142151432, 151264265, 157958921, 240848142, 241119246, 290593297, 325071379, 337903892, 540084256, 560072737, 623787557, 659427623, 706698794, 724514603, 774722094, 840464946, 913855286, 964384825, 1076056384, 1260091467, 1264278859, 1313932878, 1383203410, 1400111955, 1444098390, 1480327256, 1496911449, 1579028574, 1634095713, 1830028141, 1845771118, 1882290544, 1885471088, 1931487859, 2132835455, 2134857599]
21 127.0.0.3:11211
22 127.0.0.2:11211
23 127.0.0.4:11211
24 127.0.0.4:11211
25 127.0.0.4:11211
26 127.0.0.3:11211
27 127.0.0.3:11211
28 127.0.0.3:11211
29 127.0.0.3:11211
30 127.0.0.3:11211
31 127.0.0.4:11211
32 127.0.0.4:11211
33 size of dstNodes: 4
34 dstNodes:[127.0.0.2:11211, 127.0.0.3:11211, 127.0.0.4:11211, 127.0.0.1:11211]
35 rMap:{-8303758=127.0.0.2:11211, -8238828=127.0.0.4:11211, -7923916=127.0.0.2:11211, -7640999=127.0.0.1:11211, -7521006=127.0.0.4:11211, -7513765=127.0.0.1:11211, -7513539=127.0.0.4:11211, -7439323=127.0.0.3:11211, -6930900=127.0.0.1:11211, -6928840=127.0.0.4:11211, -6865642=127.0.0.4:11211, -6800881=127.0.0.1:11211, -6474452=127.0.0.4:11211, -6474378=127.0.0.3:11211, -6396384=127.0.0.2:11211, -6353117=127.0.0.3:11211, -6331267=127.0.0.4:11211, -6284704=127.0.0.3:11211, -6142912=127.0.0.3:11211, -6139552=127.0.0.3:11211, -6074297=127.0.0.2:11211, -6001111=127.0.0.3:11211, -5543596=127.0.0.2:11211, -5489869=127.0.0.3:11211, -5043351=127.0.0.1:11211, -4832717=127.0.0.1:11211, -4821406=127.0.0.2:11211, -4775392=127.0.0.4:11211, -4773547=127.0.0.3:11211, -4757890=127.0.0.3:11211, -4707986=127.0.0.4:11211, -4642804=127.0.0.3:11211, -4494809=127.0.0.1:11211, -4227319=127.0.0.1:11211, -4062854=127.0.0.2:11211, -3984819=127.0.0.1:11211, -3913919=127.0.0.3:11211, -3725796=127.0.0.2:11211, -3453839=127.0.0.4:11211, -3317716=127.0.0.4:11211, -3210979=127.0.0.2:11211, -3181717=127.0.0.3:11211, -2871545=127.0.0.4:11211, -2748069=127.0.0.4:11211, -2530274=127.0.0.3:11211, -2470122=127.0.0.2:11211, -2261495=127.0.0.2:11211, -2012117=127.0.0.3:11211, -1966040=127.0.0.4:11211, -1763986=127.0.0.4:11211, -1747382=127.0.0.2:11211, -1675219=127.0.0.1:11211, -1420531=127.0.0.4:11211, -1176201=127.0.0.1:11211, -1167814=127.0.0.1:11211, -1015998=127.0.0.4:11211, -821978=127.0.0.4:11211, -760210=127.0.0.2:11211, -638884=127.0.0.2:11211, -379105=127.0.0.4:11211, -255916=127.0.0.2:11211, -129259=127.0.0.4:11211, -32768=127.0.0.4:11211, -32711=127.0.0.2:11211, -32487=127.0.0.4:11211, -32227=127.0.0.1:11211, -32155=127.0.0.2:11211, -31716=127.0.0.2:11211, -31709=127.0.0.4:11211, -31659=127.0.0.2:11211, -31187=127.0.0.4:11211, -31182=127.0.0.1:11211, -30931=127.0.0.3:11211, -30425=127.0.0.3:11211, -30397=127.0.0.4:11211, -30385=127.0.0.2:11211, -30348=127.0.0.3:11211, -29896=127.0.0.3:11211, -29672=127.0.0.3:11211, -29654=127.0.0.3:11211, -29415=127.0.0.1:11211, -28805=127.0.0.1:11211, -28620=127.0.0.2:11211, -28361=127.0.0.1:11211, -28091=127.0.0.3:11211, -27791=127.0.0.4:11211, -27629=127.0.0.2:11211, -27606=127.0.0.1:11211, -27363=127.0.0.4:11211, -27277=127.0.0.2:11211, -27068=127.0.0.4:11211, -27061=127.0.0.2:11211, -26848=127.0.0.3:11211, -26843=127.0.0.1:11211, -26767=127.0.0.4:11211, -25822=127.0.0.4:11211, -25740=127.0.0.3:11211, -25550=127.0.0.2:11211, -25533=127.0.0.2:11211, -25279=127.0.0.2:11211, -25229=127.0.0.2:11211, -24997=127.0.0.3:11211, -24730=127.0.0.1:11211, -24514=127.0.0.3:11211, -24461=127.0.0.1:11211, -24028=127.0.0.4:11211, -23807=127.0.0.2:11211, -23488=127.0.0.1:11211, -23429=127.0.0.2:11211, -23281=127.0.0.3:11211, -23016=127.0.0.2:11211, -22688=127.0.0.4:11211, -22454=127.0.0.1:11211, -22149=127.0.0.1:11211, -21991=127.0.0.1:11211, -21986=127.0.0.4:11211, -21753=127.0.0.3:11211, -21244=127.0.0.2:11211, -21181=127.0.0.2:11211, -21178=127.0.0.4:11211, -20944=127.0.0.2:11211, -20881=127.0.0.4:11211, -20643=127.0.0.2:11211, -20474=127.0.0.2:11211, -20446=127.0.0.4:11211, -20198=127.0.0.1:11211, -19632=127.0.0.4:11211, -18939=127.0.0.1:11211, -18905=127.0.0.4:11211, -18410=127.0.0.4:11211, -17837=127.0.0.1:11211, -17601=127.0.0.2:11211, -17304=127.0.0.3:11211, -17284=127.0.0.2:11211, -16832=127.0.0.3:11211, -16604=127.0.0.1:11211, -16554=127.0.0.2:11211, -16347=127.0.0.4:11211, -16260=127.0.0.1:11211, -16011=127.0.0.3:11211, -15490=127.0.0.3:11211, -15048=127.0.0.4:11211, -15029=127.0.0.3:11211, -14817=127.0.0.2:11211, -14801=127.0.0.2:11211, -14332=127.0.0.4:11211, -14326=127.0.0.3:11211, -13815=127.0.0.3:11211, -13794=127.0.0.3:11211, -13746=127.0.0.1:11211, -13563=127.0.0.1:11211, -13551=127.0.0.2:11211, -13523=127.0.0.3:11211, -13458=127.0.0.3:11211, -12173=127.0.0.3:11211, -12027=127.0.0.4:11211, -12010=127.0.0.4:11211, -11916=127.0.0.3:11211, -11771=127.0.0.4:11211, -11492=127.0.0.2:11211, -11472=127.0.0.3:11211, -11428=127.0.0.1:11211, -11242=127.0.0.2:11211, -10702=127.0.0.2:11211, -10674=127.0.0.4:11211, -10232=127.0.0.1:11211, -10194=127.0.0.4:11211, -10147=127.0.0.2:11211, -9397=127.0.0.1:11211, -9184=127.0.0.1:11211, -9134=127.0.0.1:11211, -8951=127.0.0.2:11211, -8899=127.0.0.2:11211, -8656=127.0.0.1:11211, -8654=127.0.0.4:11211, -8614=127.0.0.4:11211, -8416=127.0.0.3:11211, -8362=127.0.0.3:11211, -7927=127.0.0.3:11211, -7616=127.0.0.2:11211, -7557=127.0.0.2:11211, -6911=127.0.0.3:11211, -6590=127.0.0.3:11211, -6051=127.0.0.1:11211, -5525=127.0.0.1:11211, -5269=127.0.0.3:11211, -4851=127.0.0.4:11211, -4737=127.0.0.4:11211, -4510=127.0.0.2:11211, -4266=127.0.0.2:11211, -4088=127.0.0.1:11211, -4066=127.0.0.3:11211, -4013=127.0.0.1:11211, -3536=127.0.0.2:11211, -3043=127.0.0.4:11211, -2559=127.0.0.3:11211, -2010=127.0.0.1:11211, -1713=127.0.0.3:11211, -1460=127.0.0.4:11211, -1259=127.0.0.3:11211, -1178=127.0.0.1:11211, -983=127.0.0.4:11211, -981=127.0.0.4:11211, -918=127.0.0.4:11211, -663=127.0.0.2:11211, -652=127.0.0.4:11211, -441=127.0.0.1:11211, -142=127.0.0.3:11211, -128=127.0.0.4:11211, -127=127.0.0.3:11211, -126=127.0.0.3:11211, -125=127.0.0.1:11211, -124=127.0.0.1:11211, -123=127.0.0.1:11211, -122=127.0.0.1:11211, -121=127.0.0.1:11211, -120=127.0.0.3:11211, -117=127.0.0.3:11211, -116=127.0.0.4:11211, -115=127.0.0.1:11211, -114=127.0.0.3:11211, -113=127.0.0.4:11211, -112=127.0.0.1:11211, -111=127.0.0.1:11211, -110=127.0.0.1:11211, -109=127.0.0.1:11211, -108=127.0.0.4:11211, -107=127.0.0.1:11211, -106=127.0.0.1:11211, -105=127.0.0.3:11211, -104=127.0.0.1:11211, -103=127.0.0.1:11211, -102=127.0.0.1:11211, -101=127.0.0.4:11211, -100=127.0.0.1:11211, -99=127.0.0.4:11211, -98=127.0.0.4:11211, -97=127.0.0.1:11211, -96=127.0.0.4:11211, -95=127.0.0.3:11211, -94=127.0.0.4:11211, -93=127.0.0.4:11211, -92=127.0.0.4:11211, -91=127.0.0.4:11211, -89=127.0.0.4:11211, -88=127.0.0.1:11211, -87=127.0.0.1:11211, -86=127.0.0.1:11211, -85=127.0.0.4:11211, -83=127.0.0.4:11211, -82=127.0.0.1:11211, -80=127.0.0.1:11211, -79=127.0.0.3:11211, -76=127.0.0.1:11211, -75=127.0.0.1:11211, -74=127.0.0.3:11211, -73=127.0.0.2:11211, -71=127.0.0.3:11211, -70=127.0.0.1:11211, -69=127.0.0.1:11211, -68=127.0.0.1:11211, -67=127.0.0.1:11211, -66=127.0.0.1:11211, -65=127.0.0.4:11211, -64=127.0.0.1:11211, -63=127.0.0.2:11211, -62=127.0.0.3:11211, -61=127.0.0.1:11211, -60=127.0.0.1:11211, -59=127.0.0.1:11211, -57=127.0.0.1:11211, -55=127.0.0.4:11211, -52=127.0.0.3:11211, -50=127.0.0.1:11211, -49=127.0.0.4:11211, -48=127.0.0.1:11211, -46=127.0.0.1:11211, -45=127.0.0.1:11211, -44=127.0.0.1:11211, -42=127.0.0.4:11211, -41=127.0.0.1:11211, -38=127.0.0.3:11211, -37=127.0.0.3:11211, -34=127.0.0.1:11211, -33=127.0.0.1:11211, -32=127.0.0.1:11211, -31=127.0.0.1:11211, -30=127.0.0.4:11211, -29=127.0.0.4:11211, -27=127.0.0.1:11211, -26=127.0.0.2:11211, -25=127.0.0.1:11211, -24=127.0.0.4:11211, -23=127.0.0.3:11211, -22=127.0.0.4:11211, -21=127.0.0.3:11211, -19=127.0.0.1:11211, -18=127.0.0.3:11211, -17=127.0.0.4:11211, -15=127.0.0.3:11211, -14=127.0.0.4:11211, -13=127.0.0.1:11211, -12=127.0.0.1:11211, -11=127.0.0.1:11211, -10=127.0.0.2:11211, -9=127.0.0.4:11211, -7=127.0.0.3:11211, -6=127.0.0.3:11211, -5=127.0.0.4:11211, -4=127.0.0.3:11211, -3=127.0.0.1:11211, -2=127.0.0.1:11211, -1=127.0.0.4:11211, 0=127.0.0.2:11211, 3166720=127.0.0.2:11211, 5725440=127.0.0.2:11211, 69939460=127.0.0.2:11211, 75391236=127.0.0.1:11211, 122299399=127.0.0.2:11211, 142151432=127.0.0.4:11211, 151264265=127.0.0.4:11211, 157958921=127.0.0.2:11211, 240848142=127.0.0.2:11211, 241119246=127.0.0.2:11211, 290593297=127.0.0.2:11211, 325071379=127.0.0.4:11211, 337903892=127.0.0.3:11211, 455881755=127.0.0.1:11211, 540084256=127.0.0.3:11211, 560072737=127.0.0.4:11211, 623787557=127.0.0.3:11211, 659427623=127.0.0.2:11211, 706698794=127.0.0.4:11211, 724514603=127.0.0.2:11211, 774722094=127.0.0.2:11211, 788610095=127.0.0.1:11211, 840464946=127.0.0.4:11211, 894778165=127.0.0.1:11211, 913855286=127.0.0.2:11211, 964384825=127.0.0.3:11211, 1062820927=127.0.0.1:11211, 1075674688=127.0.0.1:11211, 1076056384=127.0.0.2:11211, 1111319874=127.0.0.1:11211, 1162698821=127.0.0.1:11211, 1260091467=127.0.0.2:11211, 1264278859=127.0.0.2:11211, 1265501771=127.0.0.1:11211, 1313932878=127.0.0.3:11211, 1383203410=127.0.0.3:11211, 1400111955=127.0.0.2:11211, 1444098390=127.0.0.3:11211, 1480327256=127.0.0.2:11211, 1482497880=127.0.0.1:11211, 1496911449=127.0.0.3:11211, 1544519516=127.0.0.1:11211, 1579028574=127.0.0.3:11211, 1634095713=127.0.0.4:11211, 1763668585=127.0.0.1:11211, 1830028141=127.0.0.2:11211, 1845771118=127.0.0.2:11211, 1882290544=127.0.0.4:11211, 1885471088=127.0.0.2:11211, 1931487859=127.0.0.2:11211, 2000446327=127.0.0.1:11211, 2132835455=127.0.0.2:11211, 2134857599=127.0.0.4:11211, 2137145471=127.0.0.1:11211}
36 rList:[-8303758, -8238828, -7923916, -7640999, -7521006, -7513765, -7513539, -7439323, -6930900, -6928840, -6865642, -6800881, -6474452, -6474378, -6396384, -6353117, -6331267, -6284704, -6142912, -6139552, -6074297, -6001111, -5543596, -5489869, -5043351, -4832717, -4821406, -4775392, -4773547, -4757890, -4707986, -4642804, -4494809, -4227319, -4062854, -3984819, -3913919, -3725796, -3453839, -3317716, -3210979, -3181717, -2871545, -2748069, -2530274, -2470122, -2261495, -2012117, -1966040, -1763986, -1747382, -1675219, -1420531, -1176201, -1167814, -1015998, -821978, -760210, -638884, -379105, -255916, -129259, -32768, -32711, -32487, -32227, -32155, -31716, -31709, -31659, -31187, -31182, -30931, -30425, -30397, -30385, -30348, -29896, -29672, -29654, -29415, -28805, -28620, -28361, -28091, -27791, -27629, -27606, -27363, -27277, -27068, -27061, -26848, -26843, -26767, -25822, -25740, -25550, -25533, -25279, -25229, -24997, -24730, -24514, -24461, -24028, -23807, -23488, -23429, -23281, -23016, -22688, -22454, -22149, -21991, -21986, -21753, -21244, -21181, -21178, -20944, -20881, -20643, -20474, -20446, -20198, -19632, -18939, -18905, -18410, -17837, -17601, -17304, -17284, -16832, -16604, -16554, -16347, -16260, -16011, -15490, -15048, -15029, -14817, -14801, -14332, -14326, -13815, -13794, -13746, -13563, -13551, -13523, -13458, -12173, -12027, -12010, -11916, -11771, -11492, -11472, -11428, -11242, -10702, -10674, -10232, -10194, -10147, -9397, -9184, -9134, -8951, -8899, -8656, -8654, -8614, -8416, -8362, -7927, -7616, -7557, -6911, -6590, -6051, -5525, -5269, -4851, -4737, -4510, -4266, -4088, -4066, -4013, -3536, -3043, -2559, -2010, -1713, -1460, -1259, -1178, -983, -981, -918, -663, -652, -441, -142, -128, -127, -126, -125, -124, -123, -122, -121, -120, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104, -103, -102, -101, -100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -89, -88, -87, -86, -85, -83, -82, -80, -79, -76, -75, -74, -73, -71, -70, -69, -68, -67, -66, -65, -64, -63, -62, -61, -60, -59, -57, -55, -52, -50, -49, -48, -46, -45, -44, -42, -41, -38, -37, -34, -33, -32, -31, -30, -29, -27, -26, -25, -24, -23, -22, -21, -19, -18, -17, -15, -14, -13, -12, -11, -10, -9, -7, -6, -5, -4, -3, -2, -1, 0, 3166720, 5725440, 69939460, 75391236, 122299399, 142151432, 151264265, 157958921, 240848142, 241119246, 290593297, 325071379, 337903892, 455881755, 540084256, 560072737, 623787557, 659427623, 706698794, 724514603, 774722094, 788610095, 840464946, 894778165, 913855286, 964384825, 1062820927, 1075674688, 1076056384, 1111319874, 1162698821, 1260091467, 1264278859, 1265501771, 1313932878, 1383203410, 1400111955, 1444098390, 1480327256, 1482497880, 1496911449, 1544519516, 1579028574, 1634095713, 1763668585, 1830028141, 1845771118, 1882290544, 1885471088, 1931487859, 2000446327, 2132835455, 2134857599, 2137145471]
37 127.0.0.3:11211
38 127.0.0.2:11211
39 127.0.0.1:11211
40 127.0.0.4:11211
41 127.0.0.4:11211
42 127.0.0.3:11211
43 127.0.0.3:11211
44 127.0.0.1:11211
45 127.0.0.3:11211
46 127.0.0.3:11211
47 127.0.0.4:11211
48 127.0.0.1:11211

 

 

 

 

 

  

Ketama Consisent Hash

标签:

原文地址:http://www.cnblogs.com/igloo1986/p/4582873.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!