In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Cassandra cluster management-replace exception nodes
Replace the abnormal cluster node with the JVM startup flag Dcassandra.replace_address_first_boot = start. Once this property is enabled, the node will start in a dormant state, during which time all other nodes will see this node shut down. The replacement node will immediately start booting data from the rest of the cluster. The main difference in the normal boot of a new node is that the new node does not accept any writes at this stage. Once the boot is completed, the node will be marked as "UP", and we rely on implicit startup to ensure that the new node data exists independently. (because the new node does not accept writing since the boot starts).
If the replacement process takes longer than max_hint_window_in_ms, you must run repair to make the placed node consistent again, because it missed the write in progress during boot.
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
Check the cluster status [root@kubm-01 ~] # nodetool status Datacenter: dc1-- Address Load Tokens Owns Host ID Rack. The exception node status is DNDN 172.20.101.166 76.83 MiB 256? 88e16e35-50dd-4ee3-aa1a-f10a8c61a3eb rack1 replacement node-Note
Refer to "# # Cassandra Cluster add Node"
Https://blog.51cto.com/michaelkang/2419521
Modify configuration file vi / etc/cassandra/conf/jvm.options if you want to replace a dead node, restart the new node with the specified dead node address in its location. The data directory of the new node must not contain any data. 47 lines #-Dcassandra.replace_address=listen_address or broadcast_address of dead node modify configuration file:-Dcassandra.replace_address=172.20.101.166 cleans up useless data, delete the following folders and contents before starting service execution:-data/- commitlog/- saved_caches/rm-rf / var/lib/cassandra/ startup: / etc/init.d/cassandra start waits for cluster data recovery to complete Verify the cluster status: [root@kubnode-02 cassandra] # nodetool statusDatacenter: dc1=Status=Up/Down | / State=Normal/Leaving/Joining/Moving-- Address Load Tokens Owns Host ID Rack UN 172.20.101.164 68.13 MiB 256? Dcbbad83-fe7c-4580-ade7-aa763b8d2c40 rack1 UN 172.20.101.165 59.21 MiB 256? B985de23-6ad1-40b9-a252-dbaeb5d4cb12 rack1 restore = "UN 172.20.101.166 154.7 KiB 256? F9a72fb2-55bd-40ec-b8e7-717404b80f19 rack1 UN 172.20.101.167 71.93 MiB 256? 8808aaf7-690c-4f0c-be9b-ce655c1464d4 rack1 UN 172.20.101.160 66.23 MiB 256? 57cc39fc-e47b-4c96-b9b0-b004f2b79242 rack1 UN 172.20.101.157 55.23 MiB 256? 091ff0dc-415b-48a7-b4ce-e70c84bbfafc rack1 verification query cqlsh 172.20.101. 157u cassandra-p cassandra cassandra@cqlsh > SELECT * from kevin_test.t_users User_id | emails | first_name | last_name-+--+-+- 6 | {'k6-6roomgmail.com' 'k6roompt.com'} | kevin6 | kang 7 | {'K7-7roomgmail.composts, 'k7roompt.com'} | kevin7 | kang 9 | {' k9-9roomgmail.compositions, 'k9roompt.com'} | kevin9 | kang 4 | {' k4-4roomgmail.compositions, 'k4roompt.com'} | kevin4 | kang 3 | {' k3-3roomgmail.com' 'k3roompt.com'} | kevin3 | kang 5 | {'k5-5roomgmail.composts, 'k5roompt.com'} | kevin5 | kang 0 | {' k0-0roomgmail.compositions, 'k0roompt.com'} | kevin0 | kang 8 | {' k8-8roomgmail.compositions, 'k8roompt.com'} | kevin8 | kang 2 | {' K2-2roomgmail.com' 'k2roompt.com'} | kevin2 | kang 1 | {'K1-1roomgmail.compose, 'k1roompt.com'} | kevin1 | kang test result:
Restart the node repeatedly, and the query table content is normal.
Reference Information:
Https://blog.csdn.net/yuanjian0814/article/details/78768889
Https://www.jianshu.com/p/1dcca8f19894
Http://cassandra.apache.org/doc/latest/tools/nodetool/nodetool.html?highlight=setstreamthroughput
Https://zhaoyanblog.com/archives/684.html
Https://blog.csdn.net/yuanjian0814/article/details/78777735
Https://blog.csdn.net/iteye_19004/article/details/82648737
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.