In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Goal: to remove a group of masters and slaves from the cluster (5007 / 5008)
After adding 50075008 master-slave service node in the previous section, the current situation of the cluster is as follows:
B3363a81c3c59d57143cd3323481259c044e66d2 192.168.196VR 5006 "15006 slave 1b7aa419065c5477c0def9d5e25106963fbdda76 01573003356000 3 connected1b7aa419065c5477c0def9d5e25106963fbdda76 192.168.196Vl500315003 master-01573003352829 3 connected 11089-16383fbf9f23ecf0fea399debf7db42c73fece04b98fd 192.168.19615005 slave b1b67d4e554e29605bdbe40deab6670a42dd8836 01573003356842 2 connectedb1b67d4e554e29605bdbe40deab6670a42dd8836 192.168.1968.196VOV 5002" 15002 master-01573003355000 2 connected 5628-10922d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 192.168.1961815 master-0 1573003354837 1 connected 1 connected 166-54609dc870942555447543694e42e40061823ed91271 192.168.196Val 500415004 slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 0 1573003357846 1 connected63aa476d990dfa9f5f40eeeaa0315e7f9948554d 192.168.196: 5007 "15007 master-01573003356000 7 connected 0165 5461-5627 10923-11088d3a9de370962873d17f1124bcf9ac166cc6ba950 192.168.196pur5008" 15008 myself Slave 63aa476d990dfa9f5f40eeeaa0315e7f9948554d 0 1573003350000 0 connected serial number master nodeslave node1192.168.8.196:5001192.168.8.196:50042192.168.8.196:5002192.168.8.196:50053192.168.8.196:5003192.168.8.196:50064192.168.8.196:5007192.168.8.196:5008
Begin to implement:
1. Remove 192.168.8.196pur5008 slave node first
Redis-cli-- cluster del-node 192.168.8.196pur5008 d3a9de370962873d17f1124bcf9ac166cc6ba950
> > Removing node d3a9de370962873d17f1124bcf9ac166cc6ba950 from cluster 192.168.196 SHUTDOWN the node 5008 > > Sending CLUSTER FORGET messages to the cluster... > > SHUTDOWN the node. >
At this point, the 192.168.8.196virtual 5008 slave node has been deleted.
192.168.196slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 5001 > cluster nodesb3363a81c3c59d57143cd3323481259c044e66d2 192.168.196cluster nodesb3363a81c3c59d57143cd3323481259c044e66d2 192.168.196cluster nodesb3363a81c3c59d57143cd3323481259c044e66d2 5006 15006 connected 0 1573004309001 6 connected9dc870942555447543694e42e40061823ed91271 192.168.19615004 slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 01573004310000 4 connected1b7aa419065c5477c0def9d5e25106963fbdda76 192.168.196cluster nodesb3363a81c3c59d57143cd3323481259c044e66d2 5003 15003 master-01573004311007 3 connected 11089-16383b1b67d4e554e29605bdbe40deab6670a42dd8836 192.168.196pur5002 15002 master-01573004307000 2 connected 5628-1092263aa476d990dfa9f5f40eeeaa0315e7f9948554d 192.168.196VO500715007 master-0 15730043070007 connected 0-1655461-5627 10923-11088fbf9f23ecf0fea399debf7db42c73fece04b98fd 192.168.196Vol 5005 @ 15005 slave b1b67d4e554e29605bdbe40deab6670a42dd8836 0 1573004310004 5 connectedd1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 192.168.196pur5001mm 15001 myself Master-0 1573004308000 1 connected 166-5460 pairs of 192.168.196pur5007 master nodes from the new shard Transfer shards on 5007 to other nodes
$redis-cli-- cluster reshard 192.168.8.196pur5007
There will be a question and answer conversation.
# the number of data slots to be moved How many slots do you want to move (from 1 to 16384)? 50mm requires the ID of the master node that accepts the data slot. Here we enter the number of master service node IDWhat is the receiving node ID 5001? D1a4b1aa3e924a5917efc240cdb2e3ada39e01c2# fill in the data slot source node Please enter all the source node IDs. Type 'all' to use all the nodes as source nodes for the hash slots. Type 'done' once you entered all the source nodes IDs.Source node # 1: 63aa476d990dfa9f5f40eeeaa0315e7f9948554dSource node # 2: done
After the execution, the data slot on the 5007 master node has been transferred to the 5001 master node. At this point, there are no data slots on the 5007.
B3363a81c3c59d57143cd3323481259c044e66d2 192.168.196connected9dc870942555447543694e42e40061823ed91271 5006 "15006" 15006 slave 1b7aa419065c5477c0def9d5e25106963fbdda76 01573004510000 6 connected9dc870942555447543694e42e40061823ed91271 192.168.196Vl5004004 slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 01573004510589 8 connected1b7aa419065c5477c0def9d5e25106963fbdda76 192.168.196Vera 5003 "15003 master-01573004508000 3 connected 11089-16383b1b67d4e554e29605bdbe40deab6670a42dd8836 192.168.196Vist5002" 15002 master-01573004510000 2 connected 5628-1092263aa476d990dfa9f5f40eeeaa0315e7f9948554d 192.168.196VO500715007 master-015730045080007 connectedfbf9f23ecf0fea399debf7db42c73fece04b98fd 192.168.19619VO5005005 slave b1b67d4e554e29605bdbe40deab6670a42dd8836 01573004511594 connectedd1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 192.168.1968.196VIE5005002 master-015730045080002 myself Master-0 1573004509000 8 connected 0-5627 10923-11088
3. The last step is to remove 192.168.196pur5007.
$redis-cli-- cluster del-node 192.168.8.196pur5007 63aa476d990dfa9f5f40eeeaa0315e7f9948554d
> Sending CLUSTER FORGET messages to the cluster... > SHUTDOWN the node.
4.5007 the master and slave nodes of 5008 have been removed, and the work is done.
192.168.196slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 5001 > cluster nodesb3363a81c3c59d57143cd3323481259c044e66d2 192.168.196cluster nodesb3363a81c3c59d57143cd3323481259c044e66d2 192.168.196cluster nodesb3363a81c3c59d57143cd3323481259c044e66d2 5006 15006 connected 0 1573004592840 6 connected9dc870942555447543694e42e40061823ed91271 192.168.196V 5004 slave d1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 01573004591000 8 connected1b7aa419065c5477c0def9d5e25106963fbdda76 192.168.196Vera 5003 "15003 master-01573004591000 3 connected 11089-16383b1b67d4e554e29605bdbe40deab6670a42dd8836 192.168.196VR 5002 15002 master-01573004591838 2 connected 5628-10922fbf9f23ecf0fea399debf7db42c73fece04b98fd 192.168.19618 5005 slave b1b67d4e554e29605bdbe40deab6670a42dd8836 0 1573004591000 5 connectedd1a4b1aa3e924a5917efc240cdb2e3ada39e01c2 192.168.196Rover 5001001 myself,master-0 1573004589000 8 connected 0-5627 10923-11088
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.