|
|
#配置
|
|
|
|
|
|
## doris 参考资料
|
|
|
|
|
|
1. http://doris.apache.org/master/zh-CN/
|
|
|
1. https://cloud.baidu.com/doc/PALO/s/Ikivhcwb5
|
|
|
1. http://doc.dorisdb.com/2146003
|
|
|
|
|
|
## doris 硬件配置
|
|
|
|
|
|
http://doc.dorisdb.com/2228586
|
|
|
BE推荐16核64GB以上,FE推荐8核16GB以上。
|
|
|
磁盘可以使用HDD或者SSD。
|
|
|
CPU需要支持AVX2指令集,cat /proc/cpuinfo |grep avx2 确认有输出即可,如果没有支持,建议更换机器,DorisDB的向量化技术需要CPU指令集支持才能发挥更好的效果。
|
|
|
网络需要万兆网卡和万兆交换机。
|
|
|
|
|
|
## kafka connect
|
|
|
|
|
|
1. https://www.confluent.io/hub/confluentinc/kafka-connect-elasticsearch
|
|
|
1. https://www.confluent.io/hub/debezium/debezium-connector-mysql
|
|
|
1. https://github.com/zendesk/maxwell
|
|
|
|
|
|
|
|
|
## cockroachdb cdc
|
|
|
|
|
|
1. cockroachdb to kafka :https://www.cockroachlabs.com/docs/v21.1/stream-data-out-of-cockroachdb-using-changefeeds.html#create-a-core-changefeed
|
|
|
|
|
|
## mysql
|
|
|
|
|
|
mysql配置了主从,创建了数据库example,新建了User表
|
|
|
|
|
|
## kafka
|
|
|
|
|
|
通过 kafkacat 查看实时信息
|
|
|
|
|
|
## kafaka-connect
|
|
|
|
|
|
查看全部插件:http://localhost:8083/connector-plugins
|
|
|
查看运行插件:http://localhost:8083/connectors 查看插件
|
|
|
|
|
|
## mysql 导入 kafka
|
|
|
|
|
|
debezium 默认每个表一个 topic
|
|
|
|
|
|
设置时间格式:
|
|
|
time.precision.mode
|
|
|
|
|
|
多个表导入一个 topic:
|
|
|
"transforms":"Reroute",
|
|
|
"transforms.Reroute.type":"io.debezium.transforms.ByLogicalTableRouter",
|
|
|
"transforms.Reroute.topic.regex":"(.*)",
|
|
|
"transforms.Reroute.topic.replacement":"mysql.example"
|
|
|
|
|
|
## elastic 导入 doris:
|
|
|
|
|
|
使用 topics.regex 动态处理多个 topic 到 index
|
|
|
|
|
|
## kibana
|
|
|
|
|
|
查看 elasticsearch 状态: http://localhost:5601
|
|
|
|
|
|
### 进入 mysql 容器内,连接 doris fe:
|
|
|
|
|
|
mysql -h doris-fe -P 9030 -u root
|
|
|
|
|
|
### 设置root密码:
|
|
|
|
|
|
SET PASSWORD FOR 'root' = PASSWORD('aA123456!');
|
|
|
|
|
|
### 添加 doris be:
|
|
|
|
|
|
进入 doris be 容器内,运行 cat /etc/hosts 获取当前的ip,使用该 ip 替换 hostname 或固定容器 的ip
|
|
|
ALTER SYSTEM ADD BACKEND "172.172.0.41:9050";
|
|
|
|
|
|
### 移除 doris be:
|
|
|
|
|
|
ALTER SYSTEM DROPP BACKEND "172.172.0.41:9050";
|
|
|
|
|
|
### 查看be状态:
|
|
|
|
|
|
SHOW PROC '/backends';
|
|
|
|
|
|
### 创建数据库:
|
|
|
|
|
|
CREATE DATABASE example;
|
|
|
|
|
|
### 切换数据库:
|
|
|
|
|
|
USE example;
|
|
|
|
|
|
### 导入数据:
|
|
|
|
|
|
//curl -i -v --location-trusted -u root:aA123456! -H "format: json" -H "strip_outer_array: true" -T example.json http://doris-fe:8030/api/example/mysql_example_User/_stream_load
|
|
|
|
|
|
## doris 創建 Elasticsearch 外部表:
|
|
|
|
|
|
參考:http://doc.dorisdb.com/2146013#6531__85
|
|
|
|
|
|
CREATE EXTERNAL TABLE ES_User01
|
|
|
(
|
|
|
Id CHAR(36),
|
|
|
UserName VARCHAR(2048)
|
|
|
)
|
|
|
ENGINE=ELASTICSEARCH
|
|
|
PROPERTIES (
|
|
|
"hosts" = "http://172.172.0.30:9200",
|
|
|
"index" = "mysql.example.user",
|
|
|
"type" = "_doc"
|
|
|
);
|
|
|
|
|
|
|
|
|
## superset 使用
|
|
|
|
|
|
1. 参考地址:https://hub.docker.com/r/apache/superset
|
|
|
2. 连接字符串:mysql://root:aA123456!@192.168.100.144:3306/example?charset=utf8
|
|
|
|
|
|
## 开源 im
|
|
|
|
|
|
tinode\Rocket.Chat |