In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Cassandra Cluster Management-Delete exception nodes
Fault simulation node: 172.20.101.166, the simulation node system is directly damaged and all data is lost.
Note:
This document is only part of the system documentation. For more information on the previous documentation, please see:
Test preparation + offline normal node: https://blog.51cto.com/michaelkang/2419518
Node abnormal restart: https://blog.51cto.com/michaelkang/2419524
Add a new node: https://blog.51cto.com/michaelkang/2419521
Delete exception node: https://blog.51cto.com/michaelkang/2419525
View the logs of other nodes in the cluster
The printed content of the log is basically consistent with the node abnormal restart.
View exception nodes
[root@kubm-01 ~] # nodetool describecluster
Cluster Information: Name: pttest Snitch: org.apache.cassandra.locator.GossipingPropertyFileSnitch DynamicEndPointSnitch: enabled Partitioner: org.apache.cassandra.dht.Murmur3Partitioner Schema versions: cfce5a85-19c8-327a-ab19-e1faae2358f7: [172.20.101.164,172.20.101.165,172.20.101.167,172.20.101.160 172.20.101.157] UNREACHABLE: [172.20.101.166] treatment method
1: execute the nodetool status command on a normal node to get the id of the down node
[root@kubm-01 ~] # nodetool status
Datacenter: dc1
Status=Up/Down
| / State=Normal/Leaving/Joining/Moving |
-- Address Load Tokens Owns Host ID Rack
.
Exception node status is DN
DN 172.20.101.166 76.83 MiB? 88e16e35-50dd-4ee3-aa1a-f10a8c61a3eb rack1
UN 172.20.101.167 71.78 MiB 256? 8808aaf7-690c-4f0c-be9b-ce655c1464d4 rack1
UN 172.20.101.160 66.31 MiB 256? 57cc39fc-e47b-4c96-b9b0-b004f2b79242 rack1
UN 172.20.101.157 55 MiB 256? 091ff0dc-415b-48a7-b4ce-e70c84bbfafc rack1
2: confirm that the exception node is a seed node, and if the dead node is a seed node, change the cluster seed node configuration on each node: in the cassandra.yaml file of each node, remove the IP address of the invalid node from the-seeds list of the seed-provider attribute. If the cluster needs a new seed node to replace the dead seed node, add the IP address of the new node to the-seeds list. Node services need to be restarted. 3: if a normal node executes: nodetool removenode host-id removes the node
Nodetool removenode 88e16e35-50dd-4ee3-aa1a-f10a8c61a3eb
After the task is executed successfully, the cluster detects the copy of the data and restores the necessary copy.
# verify that the node deletion exception node has disappeared and the node has been deleted successfully.
[root@kubm-02 ~] # nodetool status
Datacenter: dc1
Status=Up/Down
| / State=Normal/Leaving/Joining/Moving |
-- Address Load Tokens Owns Host ID Rack
UN 172.20.101.164 68.2 MiB 256? Dcbbad83-fe7c-4580-ade7-aa763b8d2c40 rack1
UN 172.20.101.165 59.06 MiB 256? B985de23-6ad1-40b9-a252-dbaeb5d4cb12 rack1
UN 172.20.101.167 71.8 MiB 256? 8808aaf7-690c-4f0c-be9b-ce655c1464d4 rack1
UN 172.20.101.160 66.32 MiB 256? 57cc39fc-e47b-4c96-b9b0-b004f2b79242 rack1
UN 172.20.101.157 55.06 MiB 256? 091ff0dc-415b-48a7-b4ce-e70c84bbfafc rack1
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.