如果机器有多个IP,需要配置priority_networks
1、启动Broker
代码语言:javascript复制[root@node1 ~]# cd /app/doris-0.14.13/apache_hdfs_broker/
[root@node1 apache_hdfs_broker]# sh bin/start_broker.sh --daemon
[root@node1 apache_hdfs_broker]# jps
10400 PaloFe
12744 Worker
14153 BrokerBootstrap
12249 Master
14218 Jps
[root@node1 apache_hdfs_broker]#
代码语言:javascript复制[root@node2 ~]# cd /app/doris-0.14.13/apache_hdfs_broker/
[root@node2 apache_hdfs_broker]# sh bin/start_broker.sh --daemon
[root@node2 apache_hdfs_broker]# jps
6144 Worker
23955 BrokerBootstrap
18516 PaloFe
8551 Jps
[root@node2 apache_hdfs_broker]#
代码语言:javascript复制[root@node3 apache_hdfs_broker]# sh bin/start_broker.sh --daemon
[root@node3 apache_hdfs_broker]# jps
22993 Jps
5971 PaloFe
1940 Worker
22940 BrokerBootstrap
[root@node3 apache_hdfs_broker]#
2、添加broker节点到集群中
代码语言:javascript复制[root@node1 ~]# mysql -h10.17.12.158 -P9030 -uroot -p123456
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 8
Server version: 5.1.0 Palo version 0.14.13-release-Unknown
Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
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 BROKER broker_name "node1:8000","node2:8000","node3:8000";
Query OK, 0 rows affected (0.01 sec)
mysql> SHOW PROC "/brokers";
------------- -------------- ---------- ------ ------- --------------------- --------------------- --------
| Name | IP | HostName | Port | Alive | LastStartTime | LastUpdateTime | ErrMsg |
------------- -------------- ---------- ------ ------- --------------------- --------------------- --------
| broker_name | 10.17.12.158 | node1 | 8000 | true | 2021-08-31 15:19:00 | 2021-08-31 15:19:10 | |
| broker_name | 10.17.12.159 | node2 | 8000 | true | 2021-08-31 15:19:00 | 2021-08-31 15:19:10 | |
| broker_name | 10.17.12.160 | node3 | 8000 | true | 2021-08-31 15:19:00 | 2021-08-31 15:19:10 | |
------------- -------------- ---------- ------ ------- --------------------- --------------------- --------
3 rows in set (0.01 sec)
mysql>