1. Doris引擎扩容

Doris引擎扩容指的是增加doris BE节点数量,扩容过程中不影响当前系统运行以及正在执行的任务,并且不会影响当前系统的性能。数据均衡会自动进行。根据集群现有数据量的大小,集群会在几个小时到1天不等的时间内,恢复到负载均衡的状态

1.1. 增加机器扩容

1.1.1. 扩容前新机器准备工作

横向扩容前需要在新机器上进行如下准备工作。

请参考引擎新节点环境准备完成新节点准备工作。

1.1.2. 扩容操作

  1. 启动扩容节点BE服务

    $ ssh node2
    hengshi@node1$ cd /opt/hengshi
    hengshi@node1$ bin/hengshi-sense-bin start doris-be single
    
  2. 查看扩容节点BE服务启动状态

    $ ssh node2
    hengshi@node1$ cd /opt/hengshi
    hengshi@node1$ bin/hengshi-sense-bin status doris-be single
    # 提示下列信息表示BE服务启动成功
    [hengshi-sense-bin:48][ INFO ]: be status is started
    
  3. 将扩容节点BE服务增加到doris集群

    $ ssh node1
    hengshi@node1$ bin/doris-client.sh
    # 进入到mysql控制台 node2-host 为扩容节点的ip地址,
    mysql> ALTER SYSTEM ADD BACKEND 'node2-host:9050';
    mysql> show backends;
    # 结果 Alive 字段类型为 true,表示节点增加成功,如果结果为false,可能需要等待几分钟后再次执行 show backends;
    +-----------+-----------------+--------------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+--------------------------+-------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+
    | BackendId | Cluster         | IP           | HeartbeatPort | BePort | HttpPort | BrpcPort | LastStartTime       | LastHeartbeat       | Alive | SystemDecommissioned | ClusterDecommissioned | TabletNum | DataUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag                      | ErrMsg | Version                  | Status                                                                                                                        | HeartbeatFailureCounter | NodeRole |
    +-----------+-----------------+--------------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+--------------------------+-------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+
    | 10003     | default_cluster | node2-host   | 9050          | 9060   | 8040     | 8060     | 2023-01-11 14:26:57 | 2023-06-02 10:35:03 | true  | false                | false                 | 680       | 33.526 MB        | 416.611 GB    | 433.784 GB    | 3.96 %  | 3.96 %         | 0.000              | {"location" : "default"} |        | doris-1.2.1-rc01-075c88e | {"lastSuccessReportTabletsTime":"2023-06-02 10:34:05","lastStreamLoadTime":-1,"isQueryDisabled":false,"isLoadDisabled":false} | 0                       | mix      |
    +-----------+-----------------+--------------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+--------------------------+-------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+
    # 如果反复查看结果仍然未变成true,请联系技术人员支持。
    
  4. 修改衡石配置文件,增加扩容节点配置信息

    $ ssh node1
    hengshi@node1$ cd /opt/hengshi/conf
    hengshi@node1$ vi hengshi-sense-env.sh
    # 修改 DORIS_BE_HOSTS 变量
    export DORIS_BE_HOSTS=( `已部署BE节点host` `node2-host` )
    

注意: 数据均衡会自动进行。根据集群现有数据量的大小,集群会在几个小时到1天不等的时间内,恢复到负载均衡的状态

results matching ""

    No results matching ""

    Greenplum引擎高可用 Doris引擎高可用