新节点跨专线的时候,专线延迟速度影响集群的响应延迟。
[root@172-16-121-153 scylla]# nodetool -h ::FFFF:127.0.0.1 status
Datacenter: my_data_center
==========================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 172.16.121.151 37.05 MB 256 ? dfb03e20-6c5c-4360-b1d5-0735369b61fb my_rack
UN 172.16.121.152 36.98 MB 256 ? ff2beda1-1253-419b-a2e5-415f072ba25c my_rack
UN 172.16.121.153 36.56 MB 256 ? 8efc9e61-2316-4a65-9de5-e2edb2af4eca my_rack
检查配置脚本:
cat /etc/scylla/scylla.yaml | grep cluster_name
cat /etc/scylla/scylla.yaml | grep seeds:
cat /etc/scylla/scylla.yaml | grep endpoint_snitch
cat /etc/scylla/scylla.yaml | grep authenticator
cat /etc/scylla/scylla.yaml | grep -E "listen_address|rpc_address"
scylla --version
集群名称
[root@172-16-121-152 scylla]# cat /etc/scylla/scylla.yaml | grep cluster_name
cluster_name: 'dtstack'
种子节点配置:
[root@172-16-121-152 scylla]# cat /etc/scylla/scylla.yaml | grep seeds:
- seeds: "172.16.121.151"
告密者策略:
[root@172-16-121-152 scylla]# cat /etc/scylla/scylla.yaml | grep endpoint_snitch
#endpoint_snitch: SimpleSnitch
endpoint_snitch: GossipingPropertyFileSnitch
scylla版本:
[root@172-16-121-152 scylla]# scylla --version
4.2.4-0.20210302.0ac069fdc
身份验证状态:
[root@172-16-121-152 scylla]# cat /etc/scylla/scylla.yaml | grep authenticator
# Please increase system_auth keyspace replication factor if you use this authenticator.
# authenticator: AllowAllAuthenticator
vi /etc/scylla/scylla.yaml
cluster_name: 'dtstack' --集群名称
listen_address: 172.16.121.154 --本节点ip
rpc_address: 172.16.121.154 --本节点ip
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "172.16.121.151,172.16.121.154"
endpoint_snitch: GossipingPropertyFileSnitch
vi /etc/scylla/cassandra-rackdc.properties
dc=my_data_center --设置数据中心名称
rack=my_rack --设置机架名称
prefer_local=true
systemctl start scylla-server
[root@172-16-121-154 lib]# nodetool -h ::FFFF:127.0.0.1 status
Datacenter: my_data_center
==========================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 172.16.121.151 37.06 MB 256 ? dfb03e20-6c5c-4360-b1d5-0735369b61fb my_rack
UN 172.16.121.152 36.99 MB 256 ? ff2beda1-1253-419b-a2e5-415f072ba25c my_rack
UN 172.16.121.153 36.57 MB 256 ? 8efc9e61-2316-4a65-9de5-e2edb2af4eca my_rack
UN 172.16.121.154 30.65 MB 256 ? 4f8e0b46-3115-4415-a2c1-60a458859f1d my_rack
Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless
iftop
nodetool -h ::FFFF:127.0.0.1 netstats
nodetool -h ::FFFF:127.0.0.1 cleanup
nodetool -h ::FFFF:127.0.0.1 status
nodetool -h ::FFFF:127.0.0.1 decommission
--观察下线数据传输进度
iftop
nodetool -h ::FFFF:127.0.0.1 netstats
--传输完成后验证集群状态
nodetool -h ::FFFF:127.0.0.1 status
sudo rm -rf /var/lib/scylla/data
sudo find /var/lib/scylla/commitlog -type f -delete
sudo find /var/lib/scylla/hints -type f -delete
sudo find /var/lib/scylla/view_hints -type f -del
cat /etc/scylla/scylla.yaml | grep cluster_name
cat /etc/scylla/scylla.yaml | grep seeds:
cat /etc/scylla/scylla.yaml | grep endpoint_snitch
cat /etc/scylla/scylla.yaml | grep authenticator
cat /etc/scylla/scylla.yaml | grep -E "listen_address|rpc_address"
scylla --version
--endpoint_snitch默认配置为SimpleSnitch,不支持多数据中心,需要修改为GossipingPropertyFileSnitch
vi /etc/scylla/scylla.yaml
endpoint_snitch: GossipingPropertyFileSnitch
--根据实际配置数据中心名称和机架名称
vi /etc/scylla/cassandra-rackdc.properties
dc=my_data_center
rack=my_rack
prefer_local=true
systemctl restart scylla-server
vi /etc/scylla/scylla.yaml
cluster_name: 'dtstack' --集群名称
listen_address: 172.16.121.154 --本节点ip
rpc_address: 172.16.121.154 --本节点ip
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
- seeds: "172.16.121.151,172.16.121.154"
endpoint_snitch: GossipingPropertyFileSnitch
vi /etc/scylla/cassandra-rackdc.properties
dc=my_data_center --设置数据中心名称
rack=my_rack --设置机架名称
prefer_local=true
systemctl start scylla-server
nodetool -h ::FFFF:127.0.0.1 status
--查看所有的keyspaces
[root@172-16-121-151 ~]# cqlsh 172.16.121.151
Connected to dtstack at 172.16.121.151:9042.
[cqlsh 5.0.1 | Cassandra 3.0.8 | CQL spec 3.3.1 | Native protocol v4]
Use HELP for help.
cqlsh> describe keyspaces;
案例:
更改前:
cqlsh> desc test;
CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
更改为多中心多副本:
ALTER KEYSPACE test WITH replication = {'class':'NetworkTopologyStrategy', 'my_data_center' : '3', 'my_data_center1' : '3'};
更改后:
cqlsh> desc test;
CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'my_data_center': '3', 'my_data_center1': '3'} AND durable_writes = true;
nodetool -h ::FFFF:127.0.0.1 rebuild --my_data_center
nodetool -h ::FFFF:127.0.0.1 repair -pr
nodetool -h ::FFFF:127.0.0.1 repair -pr
--查看所有的keyspaces
[root@172-16-121-151 ~]# cqlsh 172.16.121.151
Connected to dtstack at 172.16.121.151:9042.
[cqlsh 5.0.1 | Cassandra 3.0.8 | CQL spec 3.3.1 | Native protocol v4]
Use HELP for help.
cqlsh> describe keyspaces;
案例:
更改前:
cqlsh> desc test;
CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'my_data_center': '3', 'my_data_center1': '3'} AND durable_writes = true;
更改为新中心多副本:
ALTER KEYSPACE test WITH replication = {'class':'NetworkTopologyStrategy', 'my_data_center1' : '3'};
更改后:
cqlsh> desc test;
CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'my_data_center1': '3'} AND durable_writes = true;
主要步骤:
nodetool -h ::FFFF:127.0.0.1 decommission
《数据资产管理白皮书》下载地址:https://www.dtstack.com/resources/1073/?src=bbs
《行业指标体系白皮书》下载地址:https://www.dtstack.com/resources/1057/?src=bbs
《数据治理行业实践白皮书》下载地址:https://www.dtstack.com/resources/1001/?src=bbs
《数栈V6.0产品白皮书》下载地址:https://www.dtstack.com/resources/1004/?src=bbs
想了解或咨询更多有关袋鼠云大数据产品、行业解决方案、客户案例的朋友,浏览袋鼠云官网:https://www.dtstack.com/?src=bbs
同时,欢迎对大数据开源项目有兴趣的同学加入「袋鼠云开源框架钉钉技术群」,交流最新开源技术信息,群号码:30537511,项目地址:https://github.com/DTStack