居然显示成这样的,屌屌屌。然而,16383还在 7002上。哎。无法理解。
check 下:
[url=][/url]
[root@web3 7000]# redis-trib.rb check 192.168.33.13:7000...M: 35bdcb51ceeff00f9cc608fa1b4364943c7c07ce 192.168.33.13:7003slots: (0 slots) master2 additional replica(s)...>>> Check for open slots...[WARNING] Node 192.168.33.13:7003 has slots in importing state (16383).[WARNING] The following slots are open: 16383>>> Check slots coverage...[ERR] Not all 16384 slots are covered by nodes.[url=][/url]
果然回去了,赞赞赞。再 check 下:
[ERR] Nodes don't agree about configuration!>>> Check for open slots...>>> Check slots coverage...[ERR] Not all 16384 slots are covered by nodes.
刚才那个错误消息了。好吧。继续学习其它命令吧。
cluster keyslot <\key>计算键 key 应该被放置在哪个槽上。这个是个蛮不错的功能。有时候很想找一个key在哪个节点。看下能不能用。
[url=][/url]
127.0.0.1:7000> cluster keyslot name(integer) 5798127.0.0.1:7000> get name-> Redirected to slot [5798] located at 192.168.33.13:7001"123"192.168.33.13:7001>[url=][/url]
127.0.0.1:7000> cluster getkeysinslot 5798 1(empty list or set)
那设置几个值吧:
[url=][/url]
192.168.33.13:7000> set name1 yangyi-> Redirected to slot [12933] located at 192.168.33.13:7003OK192.168.33.13:7003> set name2 yangyi-> Redirected to slot [742] located at 192.168.33.13:7000OK192.168.33.13:7000> set name3 yangyi-> Redirected to slot [4807] located at 192.168.33.13:7001OK192.168.33.13:7001> set name4 yangyi-> Redirected to slot [8736] located at 192.168.33.13:7002OK192.168.33.13:7002> set name5 yangyi-> Redirected to slot [12801] located at 192.168.33.13:7003OK192.168.33.13:7003> set name6 yangyi-> Redirected to slot [610] located at 192.168.33.13:7000OK192.168.33.13:7000> set name7 yangyi-> Redirected to slot [4675] located at 192.168.33.13:7001OK192.168.33.13:7001>[url=][/url]