BE 节点的扩容和缩容过程,不影响当前系统运行以及正在执行的任务,并且不会影响当前系统的性能。数据均衡会自动进行。根据集群现有数据量的大小,集群会在几个小时到1天不等的时间内,恢复到负载均衡的状态。
1、添加两个BE节点
(1)命令ALTER SYSTEM ADD BACKEND
MySQL [(none)]> ALTER SYSTEM ADD BACKEND "10.17.12.158:9050";
Query OK, 0 rows affected (0.02 sec)
MySQL [(none)]> ALTER SYSTEM ADD BACKEND "10.17.12.159:9050";
Query OK, 0 rows affected (0.00 sec)
MySQL [(none)]>
(2)查看BE状态,两个BE节点尚未链接
代码语言:javascript复制MySQL [(none)]> SHOW PROC '/backends'G
*************************** 1. row ***************************
BackendId: 11001
Cluster: default_cluster
IP: 10.17.12.158
HostName: node1
HeartbeatPort: 9050
BePort: -1
HttpPort: -1
BrpcPort: -1
LastStartTime: N/A
LastHeartbeat: N/A
Alive: false
SystemDecommissioned: false
ClusterDecommissioned: false
TabletNum: 0
DataUsedCapacity: .000
AvailCapacity: 1.000 B
TotalCapacity: .000
UsedPct: 0.00 %
MaxDiskUsedPct: 0.00 %
ErrMsg: java.net.ConnectException: 拒绝连接 (Connection refused)
Version:
*************************** 2. row ***************************
BackendId: 11002
Cluster: default_cluster
IP: 10.17.12.159
HostName: node2
HeartbeatPort: 9050
BePort: -1
HttpPort: -1
BrpcPort: -1
LastStartTime: N/A
LastHeartbeat: N/A
Alive: false
SystemDecommissioned: false
ClusterDecommissioned: false
TabletNum: 0
DataUsedCapacity: .000
AvailCapacity: 1.000 B
TotalCapacity: .000
UsedPct: 0.00 %
MaxDiskUsedPct: 0.00 %
ErrMsg: java.net.ConnectException: 拒绝连接 (Connection refused)
Version:
*************************** 3. row ***************************
BackendId: 10002
Cluster: default_cluster
IP: 10.17.12.160
HostName: node3
HeartbeatPort: 9050
BePort: 9060
HttpPort: 8040
BrpcPort: 8060
LastStartTime: 2021-08-06 15:18:07
LastHeartbeat: 2021-08-06 23:37:52
Alive: true
SystemDecommissioned: false
ClusterDecommissioned: false
TabletNum: 40
DataUsedCapacity: 5.991 KB
AvailCapacity: 8.051 GB
TotalCapacity: 49.090 GB
UsedPct: 83.60 %
MaxDiskUsedPct: 83.60 %
ErrMsg:
Version: 0.12.0-rc03-Unknown
3 rows in set (0.01 sec)
MySQL [(none)]>
2、部署BE节点
代码语言:javascript复制[root@node1 fe]# cd /app/be
[root@node1 be]# mkdir storage
[root@node1 be]# sh bin/start_be.sh --daemon
[root@node1 be]#
代码语言:javascript复制[root@node2 fe]# cd /app/be
[root@node2 be]# ls
bin conf lib
[root@node2 be]# mkdir storage
[root@node2 be]# sh bin/start_be.sh --daemon
[root@node2 be]#
3、查看BE集群状态
代码语言:javascript复制MySQL [(none)]> SHOW PROC '/backends'G
*************************** 1. row ***************************
BackendId: 11001
Cluster: default_cluster
IP: 10.17.12.158
HostName: node1
HeartbeatPort: 9050
BePort: 9060
HttpPort: 8040
BrpcPort: 8060
LastStartTime: 2021-08-06 23:42:38
LastHeartbeat: 2021-08-06 23:42:38
Alive: true
SystemDecommissioned: false
ClusterDecommissioned: false
TabletNum: 0
DataUsedCapacity: .000
AvailCapacity: 1.000 B
TotalCapacity: .000
UsedPct: 0.00 %
MaxDiskUsedPct: 0.00 %
ErrMsg:
Version: 0.12.0-rc03-Unknown
*************************** 2. row ***************************
BackendId: 11002
Cluster: default_cluster
IP: 10.17.12.159
HostName: node2
HeartbeatPort: 9050
BePort: 9060
HttpPort: 8040
BrpcPort: 8060
LastStartTime: 2021-08-06 23:42:08
LastHeartbeat: 2021-08-06 23:42:38
Alive: true
SystemDecommissioned: false
ClusterDecommissioned: false
TabletNum: 0
DataUsedCapacity: .000
AvailCapacity: 1.000 B
TotalCapacity: .000
UsedPct: 0.00 %
MaxDiskUsedPct: 0.00 %
ErrMsg:
Version: 0.12.0-rc03-Unknown
*************************** 3. row ***************************
BackendId: 10002
Cluster: default_cluster
IP: 10.17.12.160
HostName: node3
HeartbeatPort: 9050
BePort: 9060
HttpPort: 8040
BrpcPort: 8060
LastStartTime: 2021-08-06 15:18:07
LastHeartbeat: 2021-08-06 23:42:38
Alive: true
SystemDecommissioned: false
ClusterDecommissioned: false
TabletNum: 40
DataUsedCapacity: 5.991 KB
AvailCapacity: 8.050 GB
TotalCapacity: 49.090 GB
UsedPct: 83.60 %
MaxDiskUsedPct: 83.60 %
ErrMsg:
Version: 0.12.0-rc03-Unknown
3 rows in set (0.01 sec)
MySQL [(none)]>