In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
Note that nodes are added to Cassandra cluster
This document is only part of the system documentation. For more information on the previous documentation, please see:
Https://blog.51cto.com/michaelkang/2419518
Scene:
For node expansion, test method: clean up all data on the node (172.20.101.165) to simulate the addition of new nodes
Confirm content: 1: use the same version of Cassandra2: note that the seed node cannot boot. Make sure that the new nodes are not listed in the-seeds list, and do not seed all nodes. 3:copy adds the DC existing node configuration file to the new node, and then makes configuration modifications as follows: in the cassandra.yaml file and cassandra-topology.properties or cassandra-rackdc.properties4: note that the following property is set in the cassandra.yaml file: auto_bootstrap: if this option is set to false, it must be set to true. This option is not listed in the default cassandra.yaml configuration file and defaults to true. CLUSTER_NAME: the name of the cluster to which the new node is joining. Listen_address/broadcast_address: use the IP address that other Cassandra nodes use to connect to the new node. Endpoint_snitch: the whistleblower Cassandra is used to locate nodes and route requests. Num_tokens: the number of vnode to assign to the node. Use the same number of tokens as set on other nodes in the data center. Token ranges are allocated proportionally, and if the hardware capabilities are different, more token ranges are allocated to systems with higher capacity and better performance. Allocate_tokens_for_local_replication_factor: specifies the replication factor (RF) of the data center key space. 5: pay attention to monitoring traffic and processes during adding nodes to ensure that tasks do not die; process carding:
1: install the service
2: synchronize configuration files and modify configuration
3: modify the streaming_socket_timeout_in_ Ms value of the cassandra.ymal file. The default value is 3600000, that is, 1 hour, which is changed to 172800000 (48 hours) to ensure that there is enough time to transfer all data.
-- the synchronization process will bring a lot of load to the cluster, so turn off or restrict some functions as far as possible to avoid affecting the online business. Optional, execute command 4-5 color-
All nodes are shut down, including the new node (shut down after the new node is started)
4: turn off compression of all nodes: nodetool disableautocompaction
5: stop the compression in progress: nodetool stop COMPACTION
6: limit the data migration traffic of all nodes: nodetool setstreamthroughput 32 Universe 64 / greater
The limit is that 32mbps/64mbps/ is larger. Suppose your cluster has 10 machines, then the traffic of your new node is about 32*10mbps. You can adjust this value according to the progress of data migration, network pressure, node pressure, disk pressure, and the number of nodes completed.
7: modify the permissions of the data directory. If you adjust the configuration of the cluster-related directory folders, you must first modify the permissions: chown-R cassandra.cassandra / var/lib/cassandra
8: start the bootstrapper node (the new node executes): / etc/init.d/cassandra start
9. Use nodetool status to verify that the node is fully booted and that all other nodes are running (UN) and not in any other state.
10: now turn on automatic compression of all nodes again: nodetool enableautocompaction
11: turn off all node data migration traffic: nodetool setstreamthroughput 0
12: manually clean up the disk space of each old node: nodetool cleanup
After the new node is successfully joined, it takes a long time to run nodetool cleanup on each pre-existing node. It is recommended to run nodetool cleanup in the background. If you don't, the old data will still be on the old node, taking up disk space.
Cleanup is a single-threaded operation, which has little impact on the whole, and there is no need to turn off compression.
Cleanup is a stand-alone behavior, and there is no need to restrict node stream transmission.
Avoid the peak hours of business and execute it node by node.
Verify the cluster data [root@kubm-01 ~] # cqlsh 172.20.101.157-u 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 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.