此文阅读需要有Linux和服务器硬件基础!某些内容写的不是特别细,如果常见的linux基础命令tar、uzip、mv、mkdir、系统包的安装等等,以文字带过了,这样可以减少文章篇幅。
官方的安装部署方式一定要好好看一下,最好是尝试着做一下,再看本教程最好!
https://doris.apache.org/zh-CN/docs/dev/install/install-deploy
本文章基于Doris 1.2.3 relase更新:更新日志请看 Release 1.2.3
Doris安装部署分为两种方式:
- 下载Apache Doris源码进行编译:https://github.com/apache/doris/
- 下载预编译版本,不需要编译源码,直接安装就行【推荐】
- 官方下载途径:https://doris.apache.org/zh-CN/download
- SelectDB下载:https://cn.selectdb.com/distribution#download
- 现在社区版的Doris主要由SelectDB方进行快速迭代,团队很不错。
这里我们采用的是第2种,主要是安装省时、门槛低,更多SelectDB和Doris的区别可以看下方的注意内容。这里不再建议采用官方源码进行编译。如果能自己更改源码进行新功能的尝试,可以选择较新的分支进行编译,以体验最新功能。
注意:
- SelectDB版本为 Apache Doris快速迭代版本。包含全部 Apache Doris 的功能,并能快速迭代。因Apache发版过程较长,对于某些功能BUG影响到自己使用时,可以联系SelectDB侧渠道,获取最新的补丁包并尝鲜。
- Apache 官方 Release 版本请前往 Apache Doris 官方网站下载。
其他简单想说的:
我是从0.13版本开始跟Doris的,但未决定要上生产。直到1.2.3 release的发布,定下来把生产Hive数仓完整迁移到生产Doris上,so刚好也更新下该部署文章。
一是:Doris现在功能强大,特别在联邦查询、高性能计算、运维成本、先期投入、学习成本等方面都是较优的选择。
二是:Doris现在的Catalog用的很爽,我们可以通过Doris直接连上Hive、SAP HANA、Mysql、SQLServer、Oracle、ClickHouse等等,然后通过insert into select的方式,把数据load到Doris。也可以通过insert into select的方式把Doris数据insert到外部数据源中。
三是:Hive数仓1200多个job,目前我们的调度需要跑5-6个小时。可以预想到今后在现有资源的基础上,整个调度周期会再加长,当任务跑批失败故障处理完后,再跑,这个时间跨度慢慢不能被业务侧所接受。所以我们用Doris和hive跑批做了个对比。原先用Hive跑批需要15分钟完成的调度,用Doris只需要1.5分钟,效率提升9+倍有余。
最后:虽然Doirs性能很好,但还在成长,到现在为止也算较为稳定了,但是还达不到非常稳定,也会有一些小问题存在,不过现在看来也还好,毕竟瑕不掩瑜。

建议调研环境、测试环境可以用低配或者虚拟机。生产环境建议物理机,3台FE+7台BE组成。具体服务器配置相关问题,可以留言交流,或者浏览 Apache Doris安装与部署 章节.
推荐环境如下:

FE建议3台组成HA,后续如果发现BE计算能力不足,扩展BE即可,不需要在折腾FE了。
FE 的部署推荐,在 安装与部署文档 中有介绍,这里再做一些补充。
- 如果你并不十分了解 FE 元数据的运行逻辑,或者没有足够 FE 元数据的运维经验,我们强烈建议在实际使用中,只部署一个 FOLLOWER 类型的 FE 作为 MASTER,其余 FE 都是 OBSERVER,这样可以减少很多复杂的运维问题! 不用过于担心 MASTER 单点故障导致无法进行元数据写操作。首先,如果你配置合理,FE 作为 java 进程很难挂掉。其次,如果 MASTER 磁盘损坏(概率非常低),我们也可以用 OBSERVER 上的元数据,通过
故障恢复的方式手动恢复。- FE 进程的 JVM 一定要保证足够的内存。我们强烈建议 FE 的 JVM 内存至少在 10GB 以上,推荐 32GB 至 64GB。并且部署监控来监控 JVM 的内存使用情况。因为如果FE出现OOM,可能导致元数据写入失败,造成一些无法恢复的故障!
- FE 所在节点要有足够的磁盘空间,以防止元数据过大导致磁盘空间不足。同时 FE 日志也会占用十几G 的磁盘空间。
关于硬件最后一点想说的,BE节点的CPU、内存、硬盘、网络请尽量上高配。目前我们生产BE节点,CPU:32物理核心、内存:256GB 3200MT/s、硬盘:读5GB+/s 写2.5GB+/s、网络:万兆光纤,共大家参考
所有服务器都需要做。【必须】的内容一定要做,【按需】的 内容可以不用做:
(1)【必须】 Linux CentOS 7.9 安装所有最新补丁,在安装操作系统的时候,推荐选择ext4文件系统。
(2)【必须】 时钟同步:https://www.cnblogs.com/jhxxb/p/11526098.html
(3)【必须】关闭交换分区(swap):https://www.cnblogs.com/whm-blog/p/10920881.html
(4)【必须】把limits调到最大:https://www.jianshu.com/p/816911a8f90e
(5)【必须】 安装gcc 10.2.0+:https://www.cnblogs.com/sakela/p/14652712.html
(6)【必须】安装JDK1.8:https://blog.csdn.net/weixin_36365168/article/details/114194870,1.2.4版本也不需要了,安装自带JDK8
(7)【必须】 在所有BE节点上安装ODBC:https://www.jianshu.com/p/093f89723c8c 不需要了,请大家移步 多源数据目录 Multi-Catalog
(8)【按需】如果有新建root账号的需求,可以参照:https://www.jianshu.com/p/b9537e714399
(9)【按需】关于broker,因我们并没有用到涉及需使用broker接入内容,所以文章中并没有写broker的接入过程,可参照:https://doris.apache.org/zh-CN/installing/install-deploy.html#%E8%BD%AF%E7%A1%AC%E4%BB%B6%E9%9C%80%E6%B1%82,https://doris.apache.org/zh-CN/administrator-guide/broker.html
部署Doris时,用的都是root用户!
(1)先确认待安装的服务器的CPU是否支持avx2指令,这个过程所有服务器都需要确定。
0.14.13.1 及之后的版本需要运行环境的 CPU 支持 avx2 指令,你可以通过 cat /proc/cpuinfo 查看是否支持。如果不支持,请使用带 no-avx2 后缀的版本。avx2 指令会显著提升 bloomfilter 等数据结构的计算效率,从而影响索引过滤、runtime filter 等功能的效率。
使用以下命令查看:
[root@DORIS-FE-PRD01 ~]# cat /proc/cpuinfo

可以看到cpu是支持avx2指令的,那就可以下载支持avx2指令的已编译版本。如果cpu不支持avx2指令,需要下载不支持avx2指令的已编译版本。
先去下载已编译好的版本,以下是下载地址,点击图片中的Link下载适合的版本。X64(avx2)下的是支持avx2指令,X64(no avx2)下的是不支持avx2指令:
官方:Doris预编译版本下载地址
SelectDB:Doris预编译版本下载地址
-----------------刚更新到这 --------------
(2)下载完后得到PALO-0.15.1-rc09-binary.tar.gz,上传至服务器/opt/software目录,每台服务器都需要上传。本教程是10台服务器,所以10台服务器都上传。
(3)上传完成后解压得到PALO-0.15.1-rc09-binary目录,目录结构如下,主要关注be和fe目录,其他几个文件夹先忽略:

fe挪到/home/doris/目录下去,前提需要创建该目录。/home/doris/fe/conf, vim be.conf,有以下几项需要增加或修改:
以下配置中不会详述每个配置的含义,可以访问Doris文档查看具体释义和更多配置:
https://doris.apache.org/zh-CN/administrator-guide/config/fe_config.html
JAVA_OPTS中-Xmx调到32768m,即32GBJAVA_OPTS="-Xmx32768m -XX:+UseMembar -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=7 -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC
-XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:-CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:SoftRefLRUPolicyMSPerMB=0 -Xlogg
c:$DORIS_HOME/log/fe.gc.log.$DATE"
meta_dir中配置fe元数据的存放路径需要修改为/doris-meta。meta_dir = /doris-meta
这里需要注意,fe的源程序包是放在
/home/doris/下,是系统盘位置为480G RAID所在盘符目录。fe元数据的存放硬盘为/doris-meta,fe节点的3块960G的硬盘做了RAID5阵列,整体大小由960G*3的数量大小,变为960G*2即1.8TB左右的大小,并挂载到/doris-meta目录下。
enable_http_server_v2 = true配置,支持https,这样可以打开新的前端UI界面。http_port = 8030
rpc_port = 9020
query_port = 9030
edit_log_port = 9010
mysql_service_nio_enabled = true
enable_http_server_v2 = true # 在这里加该配置就行
这里稍微扩展一下,与本配置无太大关系:
我们在实际使用Flink Doris Connector.jar用http的方式进行sink时,一开始可以sink,但是用了一段时间,发现sink不了了。我们并未解决该问题,这个需要大家留意。所以最终还是采用了jdbc的方式进行sink,暂时放弃了http sink。
priority_networks需要设置fe所在的服务器IP,这里我的服务器只用了单网口只有一个IP。priority_networks = 192.168.16.44/24
dynamic_partition_enable = true增加动态分区配置,后续使用中动态分区用的比较多,先把它配置上。在文件末尾加上就行。dynamic_partition_enable = true
这里贴上我的fe.conf完整的文件内容,可以做个参照:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#####################################################################
## The uppercase properties are read and exported by bin/start_fe.sh.
## To see all Frontend configurations,
## see fe/src/org/apache/doris/common/Config.java
#####################################################################
# the output dir of stderr and stdout
LOG_DIR = ${DORIS_HOME}/log
DATE = `date +%Y%m%d-%H%M%S`
JAVA_OPTS="-Xmx32768m -XX:+UseMembar -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=7 -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSClassUnloadingEnabled -XX:-CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:SoftRefLRUPolicyMSPerMB=0 -Xloggc:$DORIS_HOME/log/fe.gc.log.$DATE"
# For jdk 9+, this JAVA_OPTS will be used as default JVM options
JAVA_OPTS_FOR_JDK_9="-Xmx32768m -XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=7 -XX:+CMSClassUnloadingEnabled -XX:-CMSParallelRemarkEnabled -XX:CMSInitiatingOccupancyFraction=80 -XX:SoftRefLRUPolicyMSPerMB=0 -Xlog:gc*:$DORIS_HOME/log/fe.gc.log.$DATE:time"
##
## the lowercase properties are read by main program.
##
# INFO, WARN, ERROR, FATAL
sys_log_level = INFO
# store metadata, must be created before start FE.
# Default value is ${DORIS_HOME}/doris-meta
# meta_dir = ${DORIS_HOME}/doris-meta
meta_dir = /doris-meta
http_port = 8030
rpc_port = 9020
query_port = 9030
edit_log_port = 9010
mysql_service_nio_enabled = true
enable_http_server_v2 = true
# Choose one if there are more than one ip except loopback address.
# Note that there should at most one ip match this list.
# If no ip match this rule, will choose one randomly.
# use CIDR format, e.g. 10.10.10.0/24
# Default value is empty.
# priority_networks = 10.10.10.0/24;192.168.0.0/16
priority_networks = 192.168.16.44/24
# Advanced configurations
# log_roll_size_mb = 1024
# sys_log_dir = ${DORIS_HOME}/log
# sys_log_roll_num = 10
# sys_log_verbose_modules = org.apache.doris
# audit_log_dir = ${DORIS_HOME}/log
# audit_log_modules = slow_query, query
# audit_log_roll_num = 10
# meta_delay_toleration_second = 10
# qe_max_connection = 1024
# max_conn_per_user = 100
# qe_query_timeout_second = 300
# qe_slow_log_ms = 5000
dynamic_partition_enable = true
(6)启动fe。启动和关闭fe的命令是sh start_fe.sh --daemon、sh stop_fe.sh --daemon
[root@DORIS-FE-PRD01 bin]# cd /home/doris/fe/bin
[root@DORIS-FE-PRD01 bin]# sh start_fe.sh --daemon
注意:
Doris启动过程中如果发生问题,可以进入/home/doris/fe/log目录下查看日志,找到异常寻求解决方案
(7)下面需要通过mysql客户端连接fe节点
mysql-5.7.36,上传至/opt/software/,并解压,解压后不用安装,只用它来连接doris。[root@DORIS-FE-PRD01 bin]# cd /opt/software/mysql-5.7.36-linux-glibc2.12-x86_64/bin
[root@DORIS-FE-PRD01 bin]# ./mysql -h 192.168.16.44 -P 9030 -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5781
Server version: 5.1.0 Doris version 0.15.1-rc09-Unknown
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
(8)剩下两台fe节点需要做一下第(1)至第(5)个步骤,但是在 首次启动 其余两个fe节点时,需要注意用以下命令执行,后续启动采用第(6)中的命令执行即可:
第二个节点:
[root@DORIS-FE-PRD02 bin]# cd /home/doris/fe/bin
[root@DORIS-FE-PRD02 bin]# ./start_fe.sh --helper 192.168.16.44:9010 --daemon
第三个节点:
[root@DORIS-FE-PRD03 bin]# cd /home/doris/fe/bin
[root@DORIS-FE-PRD03 bin]# ./start_fe.sh --helper 192.168.16.44:9010 --daemon
192.168.16.44为第一个启动的fe节点,该节点为master节点。剩下两台为follower节点,3台fe节点组成读写HA。
(9)在192.168.16.44 master fe节点服务器上,用mysql连接master fe,并用sql添加其余两台follower节点:
[root@DORIS-FE-PRD01 conf]# cd /opt/software/mysql-5.7.36-linux-glibc2.12-x86_64/bin
[root@DORIS-FE-PRD01 bin]# ./mysql -h 192.168.16.44 -P 9030 -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5782
Server version: 5.1.0 Doris version 0.15.1-rc09-Unknown
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ALTER SYSTEM ADD FOLLOWER "192.168.16.64:9010";
mysql> ALTER SYSTEM ADD FOLLOWER "192.168.16.53:9010";
添加完后,通过show proc '/frontends';查看fe节点的状态,主要关注Role角色、IsMaster是否主节点、alive节点存活状态 三列是否正常。
mysql> show proc '/frontends';
+----------------------------------+---------------+-----------------------------+-------------+----------+-----------+---------+----------+----------+------------+------+-------+-------------------+---------------------+----------+--------+---------------------+------------------+
| Name | IP | HostName | EditLogPort | HttpPort | QueryPort | RpcPort | Role | IsMaster | ClusterId | Join | Alive | ReplayedJournalId | LastHeartbeat | IsHelper | ErrMsg | Version | CurrentConnected |
+----------------------------------+---------------+-----------------------------+-------------+----------+-----------+---------+----------+----------+------------+------+-------+-------------------+---------------------+----------+--------+---------------------+------------------+
| 192.168.16.53_9010_1645235873427 | 192.168.16.53 | doris-fe-prd03.aimatech.com | 9010 | 8030 | 9030 | 9020 | FOLLOWER | false | 1773624491 | true | true | 53557 | 2022-02-21 10:41:28 | true | | 0.15.1-rc09-Unknown | No |
| 192.168.16.64_9010_1645235868726 | 192.168.16.64 | doris-fe-prd02.aimatech.com | 9010 | 8030 | 9030 | 9020 | FOLLOWER | false | 1773624491 | true | true | 53557 | 2022-02-21 10:41:28 | true | | 0.15.1-rc09-Unknown | No |
| 192.168.16.44_9010_1645235407812 | 192.168.16.44 | doris-fe-prd01.aimatech.com | 9010 | 8030 | 9030 | 9020 | FOLLOWER | true | 1773624491 | true | true | 53558 | 2022-02-21 10:41:28 | true | | 0.15.1-rc09-Unknown | Yes |
+----------------------------------+---------------+-----------------------------+-------------+----------+-----------+---------+----------+----------+------------+------+-------+-------------------+---------------------+----------+--------+---------------------+------------------+
3 rows in set (0.04 sec)
(10)到此为止,如果一切顺利,fe集群就搭建完了。
(1)首先在be节点服务器上,按照fe中的第(1)至(3)步骤完成相应内容。
(2)把be目录挪到/home/doris/下,需要创建该目录。
(3)进入/home/doris/be/conf目录下,修改配置:
以下配置中不会详述每个配置的含义,可以访问Doris文档查看具体释义和更多配置:
https://doris.apache.org/zh-CN/administrator-guide/config/be_config.html
priority_networks
priority_networks = 192.168.16.65/24
storage_root_path:storage_root_path = /doris-data1,medium:hdd,capacity:890;/doris-data2,medium:ssd,capacity:890;/doris-data3,medium:ssd,capacity:890
说明:
1.be节点与fe节点服务器配置是一样的,但是be节点的960G*3的SSD硬盘,没有做磁盘阵列,当做3块磁盘去用,分别挂载到/doris-data1 /doris-data2 /doris-data3目录下。
2.配置中第一个磁盘目录/doris-data1,medium:hdd,capacity:890medium指定的是hdd。这里需要注意,虽然说3块硬盘都是SSD,但是如果在配置时把medium都配置ssd,会发现在建表的时候会报错。所以这里把第一个改成了hdd,剩下两个还是ssd。报错日志没记录,各位一是便知。至于doris后面会不会修复这个问题,还不得知。
max_tablet_version_num = 5000
max_compaction_threads = 16
compaction_task_num_per_disk = 8
cumulative_size_based_promotion_size_mbytes = 2048
row_step_for_compaction_merge_log = 1
total_permits_for_compaction_score = 50000
以下是我的be.conf全部配置内容,供参照:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
PPROF_TMPDIR="$DORIS_HOME/log/"
# INFO, WARNING, ERROR, FATAL
sys_log_level = INFO
# ports for admin, web, heartbeat service
be_port = 9060
webserver_port = 8040
heartbeat_service_port = 9050
brpc_port = 8060
priority_networks = 192.168.16.66/24
storage_root_path = /doris-data1.hdd,890;/doris-data2.ssd,890;/doris-data3.ssd,890
max_tablet_version_num = 5000
max_compaction_threads = 16
compaction_task_num_per_disk = 8
cumulative_size_based_promotion_size_mbytes = 2048
row_step_for_compaction_merge_log = 1
total_permits_for_compaction_score = 50000
# Choose one if there are more than one ip except loopback address.
# Note that there should at most one ip match this list.
# If no ip match this rule, will choose one randomly.
# use CIDR format, e.g. 10.10.10.0/24
# Default value is empty.
# priority_networks = 10.10.10.0/24;192.168.0.0/16
# data root path, separate by ';'
# you can specify the storage medium of each root path, HDD or SSD
# you can add capacity limit at the end of each root path, seperate by ','
# eg:
# storage_root_path = /home/disk1/doris.HDD,50;/home/disk2/doris.SSD,1;/home/disk2/doris
# /home/disk1/doris.HDD, capacity limit is 50GB, HDD;
# /home/disk2/doris.SSD, capacity limit is 1GB, SSD;
# /home/disk2/doris, capacity limit is disk capacity, HDD(default)
#
# you also can specify the properties by setting '<property>:<value>', seperate by ','
# property 'medium' has a higher priority than the extension of path
#
# Default value is ${DORIS_HOME}/storage, you should create it by hand.
# storage_root_path = ${DORIS_HOME}/storage
# Advanced configurations
# sys_log_dir = ${DORIS_HOME}/log
# sys_log_roll_mode = SIZE-MB-1024
# sys_log_roll_num = 10
# sys_log_verbose_modules = *
# log_buffer_level = -1
# palo_cgroups
be节点,都按照以上内容进行配置,后者把be放到/home/doris/下后,同步一下be.conf改一下ip地址就行。be节点[root@DORIS-BE-PRD01 conf]# cd /home/doris/be/bin
[root@DORIS-BE-PRD01 bin]# sh start_be.sh --daemon
[root@DORIS-BE-PRD02 conf]# cd /home/doris/be/bin
[root@DORIS-BE-PRD02 bin]# sh start_be.sh --daemon
[root@DORIS-BE-PRD03 conf]# cd /home/doris/be/bin
[root@DORIS-BE-PRD03 bin]# sh start_be.sh --daemon
[root@DORIS-BE-PRD04 conf]# cd /home/doris/be/bin
[root@DORIS-BE-PRD04 bin]# sh start_be.sh --daemon
[root@DORIS-BE-PRD05 conf]# cd /home/doris/be/bin
[root@DORIS-BE-PRD05 bin]# sh start_be.sh --daemon
[root@DORIS-BE-PRD06 conf]# cd /home/doris/be/bin
[root@DORIS-BE-PRD06 bin]# sh start_be.sh --daemon
[root@DORIS-BE-PRD07 conf]# cd /home/doris/be/bin
[root@DORIS-BE-PRD07 bin]# sh start_be.sh --daemon
fe master 节点,用mysql连接进入sql命令行模式,挨个添加be节点[root@DORIS-FE-PRD01 bin]# cd /opt/software/mysql-5.7.36-linux-glibc2.12-x86_64/bin
[root@DORIS-FE-PRD01 bin]# ./mysql -h 192.168.16.44 -P 9030 -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5783
Server version: 5.1.0 Doris version 0.15.1-rc09-Unknown
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> ALTER SYSTEM ADD BACKEND "192.168.16.66:9050";
mysql> ALTER SYSTEM ADD BACKEND "192.168.16.59:9050";
mysql> ALTER SYSTEM ADD BACKEND "192.168.16.60:9050";
mysql> ALTER SYSTEM ADD BACKEND "192.168.16.51:9050";
mysql> ALTER SYSTEM ADD BACKEND "192.168.16.65:9050";
mysql> ALTER SYSTEM ADD BACKEND "192.168.16.63:9050";
添加完后,通过show proc '/backends';查看be节点的状态,主要关注alive节点存活状态 是否正常。
mysql> show proc '/backends';
+-----------+-----------------+---------------+-----------------------------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+---------+----------------+--------------------------+--------+---------------------+--------------------------------------------------------------------------------+
| BackendId | Cluster | IP | HostName | HeartbeatPort | BePort | HttpPort | BrpcPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | ClusterDecommissioned | TabletNum | DataUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | Tag | ErrMsg | Version | Status |
+-----------+-----------------+---------------+-----------------------------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+---------+----------------+--------------------------+--------+---------------------+--------------------------------------------------------------------------------+
| 10009 | default_cluster | 192.168.16.66 | doris-be-prd01.aimatech.com | 9050 | 9060 | 8040 | 8060 | 2022-02-19 10:50:31 | 2022-02-21 11:21:11 | true | false | false | 68 | 2.802 GB | 2.615 TB | 2.619 TB | 0.14 % | 0.42 % | {"location" : "default"} | | 0.15.1-rc09-Unknown | {"lastSuccessReportTabletsTime":"2022-02-21 11:20:46","lastStreamLoadTime":-1} |
| 10010 | default_cluster | 192.168.16.59 | doris-be-prd02.aimatech.com | 9050 | 9060 | 8040 | 8060 | 2022-02-19 10:50:31 | 2022-02-21 11:21:11 | true | false | false | 59 | 2.471 GB | 2.614 TB | 2.619 TB | 0.18 % | 0.54 % | {"location" : "default"} | | 0.15.1-rc09-Unknown | {"lastSuccessReportTabletsTime":"2022-02-21 11:20:41","lastStreamLoadTime":-1} |
| 10011 | default_cluster | 192.168.16.60 | doris-be-prd03.aimatech.com | 9050 | 9060 | 8040 | 8060 | 2022-02-19 10:50:31 | 2022-02-21 11:21:11 | true | false | false | 54 | 2.243 GB | 2.613 TB | 2.619 TB | 0.21 % | 0.63 % | {"location" : "default"} | | 0.15.1-rc09-Unknown | {"lastSuccessReportTabletsTime":"2022-02-21 11:20:32","lastStreamLoadTime":-1} |
| 10012 | default_cluster | 192.168.16.51 | doris-be-prd04.aimatech.com | 9050 | 9060 | 8040 | 8060 | 2022-02-19 10:50:31 | 2022-02-21 11:21:11 | true | false | false | 55 | 2.202 GB | 2.613 TB | 2.619 TB | 0.22 % | 0.66 % | {"location" : "default"} | | 0.15.1-rc09-Unknown | {"lastSuccessReportTabletsTime":"2022-02-21 11:20:47","lastStreamLoadTime":-1} |
| 10012 | default_cluster | 192.168.16.52 | doris-be-prd05.aimatech.com | 9050 | 9060 | 8040 | 8060 | 2022-02-19 10:50:31 | 2022-02-21 11:21:11 | true | false | false | 55 | 2.202 GB | 2.613 TB | 2.619 TB | 0.22 % | 0.66 % | {"location" : "default"} | | 0.15.1-rc09-Unknown | {"lastSuccessReportTabletsTime":"2022-02-21 11:20:47","lastStreamLoadTime":-1} |
| 10013 | default_cluster | 192.168.16.65 | doris-be-prd06.aimatech.com | 9050 | 9060 | 8040 | 8060 | 2022-02-19 10:50:31 | 2022-02-21 11:21:11 | true | false | false | 79 | 3.302 GB | 2.614 TB | 2.619 TB | 0.16 % | 0.47 % | {"location" : "default"} | | 0.15.1-rc09-Unknown | {"lastSuccessReportTabletsTime":"2022-02-21 11:21:14","lastStreamLoadTime":-1} |
| 10014 | default_cluster | 192.168.16.63 | doris-be-prd07.aimatech.com | 9050 | 9060 | 8040 | 8060 | 2022-02-19 10:50:31 | 2022-02-21 11:21:11 | true | false | false | 52 | 1.983 GB | 2.613 TB | 2.619 TB | 0.23 % | 0.67 % | {"location" : "default"} | | 0.15.1-rc09-Unknown | {"lastSuccessReportTabletsTime":"2022-02-21 11:20:54","lastStreamLoadTime":-1} |
+-----------+-----------------+---------------+-----------------------------+---------------+--------+----------+----------+---------------------+---------------------+-------+----------------------+-----------------------+-----------+------------------+---------------+---------------+---------+----------------+--------------------------+--------+---------------------+--------------------------------------------------------------------------------+
6 rows in set (0.02 sec)
当部署多个 FE 节点时,用户可以在多个 FE 之上部署负载均衡层来实现 Doris 的高可用。
该步骤是建议在生产环境一定要做的!
主要步骤可以完全按照官网给的安装手册进行,写的很详细,完全参照即可:
https://doris.apache.org/zh-CN/article/articles/fe-load-balance.html
部署完ProxySQL就可以连接ProxySQL代理地址和端口,连接doris了。
下面是当已经启动ProxySQL时,如果需要修改已配置的ProxySQL的代理端口,可以参照:
https://www.cnblogs.com/XY-Heruo/p/15741246.html
在第四步中已经做好了ProxySQL的代理,下面将通过连接Proxy代理的IP和端口,连接Doris。
我的ProxySQL地址端口:192.168.16.53:9033
我的FE地址端口:192.168.16.53:9030、192.168.16.64:9030、192.168.16.44:9030
(1)通过DBeaver连接Proxy,选择 mysql,点击下一步




-- 设置并发度为8
set parallel_fragment_exec_instance_num=8;
-- 设置runtime_filter为BLOOM_FILTER
set runtime_filter_type="BLOOM_FILTER";
-- 执行sql
SELECT d_year, c_nation,
SUM(lo_revenue - lo_supplycost) AS PROFIT
FROM date, customer, supplier, part, lineorder
WHERE lo_custkey = c_custkey
AND lo_suppkey = s_suppkey
AND lo_partkey = p_partkey
AND lo_orderdate = d_datekey
AND c_region = 'AMERICA'
AND s_region = 'AMERICA'
AND (p_mfgr = 'MFGR#1'
OR p_mfgr = 'MFGR#2')
GROUP BY d_year, c_nation
ORDER BY d_year, c_nation;

我想为Heroku构建一个Rails3应用程序。他们使用Postgres作为他们的数据库,所以我通过MacPorts安装了postgres9.0。现在我需要一个postgresgem并且共识是出于性能原因你想要pggem。但是我对我得到的错误感到非常困惑当我尝试在rvm下通过geminstall安装pg时。我已经非常明确地指定了所有postgres目录的位置可以找到但仍然无法完成安装:$envARCHFLAGS='-archx86_64'geminstallpg--\--with-pg-config=/opt/local/var/db/postgresql90/defaultdb/po
我打算为ruby脚本创建一个安装程序,但我希望能够确保机器安装了RVM。有没有一种方法可以完全离线安装RVM并且不引人注目(通过不引人注目,就像创建一个可以做所有事情的脚本而不是要求用户向他们的bash_profile或bashrc添加一些东西)我不是要脚本本身,只是一个关于如何走这条路的快速指针(如果可能的话)。我们还研究了这个很有帮助的问题:RVM-isthereawayforsimpleofflineinstall?但有点误导,因为答案只向我们展示了如何离线在RVM中安装ruby。我们需要能够离线安装RVM本身,并查看脚本https://raw.github.com/wayn
我有一个奇怪的问题:我在rvm上安装了rubyonrails。一切正常,我可以创建项目。但是在我输入“railsnew”时重新启动后,我有“程序'rails'当前未安装。”。SystemUbuntu12.04ruby-v"1.9.3p194"gemlistactionmailer(3.2.5)actionpack(3.2.5)activemodel(3.2.5)activerecord(3.2.5)activeresource(3.2.5)activesupport(3.2.5)arel(3.0.2)builder(3.0.0)bundler(1.1.4)coffee-rails(
我刚刚为fedora安装了emacs。我想用emacs编写ruby。为ruby提供代码提示、代码完成类型功能所需的工具、扩展是什么? 最佳答案 ruby-mode已经包含在Emacs23之后的版本中。不过,它也可以通过ELPA获得。您可能感兴趣的其他一些事情是集成RVM、feature-mode(Cucumber)、rspec-mode、ruby-electric、inf-ruby、rinari(用于Rails)等。这是我当前用于Ruby开发的Emacs配置:https://github.com/citizen428/emacs
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我的最终目标是安装当前版本的RubyonRails。我在OSXMountainLion上运行。到目前为止,这是我的过程:已安装的RVM$\curl-Lhttps://get.rvm.io|bash-sstable检查已知(我假设已批准)安装$rvmlistknown我看到当前的稳定版本可用[ruby-]2.0.0[-p247]输入命令安装$rvminstall2.0.0-p247注意:我也试过这些安装命令$rvminstallruby-2.0.0-p247$rvminstallruby=2.0.0-p247我很快就无处可去了。结果:$rvminstall2.0.0-p247Search
我实际上是在尝试使用RVM在我的OSX10.7.5上更新ruby,并在输入以下命令后:rvminstallruby我得到了以下回复:Searchingforbinaryrubies,thismighttakesometime.Checkingrequirementsforosx.Installingrequirementsforosx.Updatingsystem.......Errorrunning'requirements_osx_brew_update_systemruby-2.0.0-p247',pleaseread/Users/username/.rvm/log/138121
由于fast-stemmer的问题,我很难安装我想要的任何rubygem。我把我得到的错误放在下面。Buildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingfast-stemmer:ERROR:Failedtobuildgemnativeextension./System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/rubyextconf.rbcreatingMakefilemake"DESTDIR="cleanmake"DESTDIR=
我是Google云的新手,我正在尝试对其进行首次部署。我的第一个部署是RubyonRails项目。我基本上是在关注thisguideinthegoogleclouddocumentation.唯一的区别是我使用的是我自己的项目,而不是他们提供的“helloworld”项目。这是我的app.yaml文件runtime:customvm:trueentrypoint:bundleexecrackup-p8080-Eproductionconfig.ruresources:cpu:0.5memory_gb:1.3disk_size_gb:10当我转到我的项目目录并运行gcloudprevie
当我尝试安装Ruby时遇到此错误。我试过查看this和this但无济于事➜~brewinstallrubyWarning:YouareusingOSX10.12.Wedonotprovidesupportforthispre-releaseversion.Youmayencounterbuildfailuresorotherbreakages.Pleasecreatepull-requestsinsteadoffilingissues.==>Installingdependenciesforruby:readline,libyaml,makedepend==>Installingrub