Commit 81819b23 authored by dingjy's avatar dingjy

modify

parent afd71014
......@@ -26,7 +26,7 @@ public class PikaShardLoad {
public JedisPool getPool(byte[] key){
CRC32 ck = crc32.get();
CRC32 ck = new CRC32();
ck.update(key);
return dict[(int) (ck.getValue()%SLOT_SIZE)];
}
......
......@@ -13,12 +13,15 @@ pika-proxy:
timeBetweenEvictionRunsMillis: 5000
minEvictableIdleTimeMillis: 300000
shards:
- uri: redis://127.0.0.1:6379
- uri: redis://10.20.110.179:9221
slot_begin: 0
slot_end: 340
- uri: redis://127.0.0.1:6379
slot_begin: 341
slot_end: 683
- uri: redis://127.0.0.1:6379
slot_begin: 684
slot_end: 255
- uri: redis://10.20.110.178:9221
slot_begin: 256
slot_end: 511
- uri: redis://10.20.110.181:9221
slot_begin: 512
slot_end: 767
- uri: redis://10.20.110.180:9221
slot_begin: 768
slot_end: 1023
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment