You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/09/13 10:48:45 UTC

[GitHub] [inlong-website] duowan1520 commented on a diff in pull request #536: [INLONG-535][Sort] Add docs for Apache Doris

duowan1520 commented on code in PR #536:
URL: https://github.com/apache/inlong-website/pull/536#discussion_r969464392


##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/data_node/extract_node/doris.md:
##########
@@ -0,0 +1,150 @@
+---
+title: Doris
+sidebar_position: 11
+---
+
+import {siteVariables} from '../../version';
+
+## 概述
+
+`Doris Extract` 节点 支持从 Doris 中读取数据。本章节介绍如何设置 Doris Extract 节点以对 Doris 数据库运行 SQL 查询。
+
+## 支持的版本
+
+| Extract 节点          | Doris 版本 |                                                                                                                                                                                                                                                                                                                                                                                           
+|---------------------|----------|
+| [Doris](./doris.md) | 0.13+    |  
+
+## 依赖
+
+为了设置 Doris Extract 节点, 下面提供了使用构建自动化工具(例如 Maven 或 SBT)所需要的依赖信息。
+
+### Maven 依赖
+
+<pre><code parentName="pre">
+{`<dependency>
+    <groupId>org.apache.inlong</groupId>
+    <artifactId>sort-connector-doris</artifactId>
+    <version>${siteVariables.inLongVersion}</version>
+</dependency>
+`}
+</code></pre>
+
+## 准备
+### 创建 Doris Extract 表
+先在 Doris数据库中创建表 `doris_extract_node`, 命令如下:
+```
+[root@fe001 ~]# mysql -u root -h localhost -P 9030 -p000000
+mysql> use test;
+Reading table information for completion of table and column names
+You can turn off this feature to get a quicker startup with -A
+
+Database changed
+mysql> CREATE TABLE `doris_extract_node` (
+       `id` int(11) NOT NULL COMMENT "用户id",
+       `name` varchar(50) NOT NULL COMMENT "昵称",
+       `dr` tinyint(4) NULL COMMENT "逻辑删除"
+       ) ENGINE=OLAP
+       UNIQUE KEY(`id`)
+       COMMENT "OLAP"
+       DISTRIBUTED BY HASH(`id`) BUCKETS 1
+       PROPERTIES (
+       "replication_allocation" = "tag.location.default: 1",
+       "in_memory" = "false",
+       "storage_format" = "V2"
+       );
+Query OK, 0 rows affected (0.03 sec)
+
+mysql> insert into doris_extract_node values(1, 'zhangsan', 0),(2, 'lisi', 0),(3, 'wangwu', 0);
+Query OK, 3 rows affected (0.07 sec)
+{'label':'insert_29d973e9509a48d4-a20e9f0e2d510605', 'status':'VISIBLE', 'txnId':'1032'}
+
+mysql> select * from doris_extract_node;
++------+---------+------+
+| id   | name    | dr   |
++------+---------+------+
+|    1 | zhansan |    0 |
+|    2 | lisi    |    0 |
+|    3 | wangwu  |    0 |
++------+---------+------+
+3 rows in set (0.02 sec)       
+```
+## 如何创建 Doris Extract 节点
+
+### SQL API 用法
+
+下面这个例子展示了如何用 `Flink SQL` 创建一个 Doris Extract 节点:
+* 连接器是 `doris`
+```sql
+# 启动flink sql-client, 加载 doris connector jar包
+[root@tasknode001 flink-1.13.5]# ./bin/sql-client.sh -l ./opt/connectors/doris/
+
+-- 使用 Flink SQL 创建 Doris 表 'doris_extract_node'
+Flink SQL> CREATE TABLE doris_extract_node (
+           `id` INT,
+           `name` STRINTG,
+           `dr` TINYINT
+           ) WITH (
+           'connector' = 'doris',
+           'fenodes' = 'localhost:8030',
+           'table.identifier' = 'test.doris_extract_node',
+           'username' = 'root',
+           'password' = '000000'
+           );
+  
+-- 读取数据
+Flink SQL> SELECT * FROM doris_extract_node;
+```
+
+### InLong Dashboard 用法
+
+TODO: 将在未来支持此功能。
+
+### InLong Manager Client 用法
+
+TODO: 将在未来支持此功能。
+
+## Doris Extract 节点参数
+
+| 参数                                | 是否必选    | 默认值               | 数据类型    | 描述                                                                                           |
+|-----------------------------------|---------|-------------------|---------|----------------------------------------------------------------------------------------------|
+| connector                         | 必选      | (none)            | string  | 指定要使用的连接器 `doris`                                                                            |
+| fenodes                           | 必选      | (none)            | string  | Doris FE http 地址                                                                             |
+| table.identifier	                 | 必选      | (none)            | string  | Doris 表名,如:db1.tbl1                                                                          |
+| username	                         | 必选      | (none)            | string  | 访问Doris的用户名                                                                                  |

Review Comment:
   ok, i have fixed it



##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/data_node/extract_node/doris.md:
##########
@@ -0,0 +1,150 @@
+---
+title: Doris
+sidebar_position: 11
+---
+
+import {siteVariables} from '../../version';
+
+## 概述
+
+`Doris Extract` 节点 支持从 Doris 中读取数据。本章节介绍如何设置 Doris Extract 节点以对 Doris 数据库运行 SQL 查询。
+
+## 支持的版本
+
+| Extract 节点          | Doris 版本 |                                                                                                                                                                                                                                                                                                                                                                                           
+|---------------------|----------|
+| [Doris](./doris.md) | 0.13+    |  
+
+## 依赖
+
+为了设置 Doris Extract 节点, 下面提供了使用构建自动化工具(例如 Maven 或 SBT)所需要的依赖信息。
+
+### Maven 依赖
+
+<pre><code parentName="pre">
+{`<dependency>
+    <groupId>org.apache.inlong</groupId>
+    <artifactId>sort-connector-doris</artifactId>
+    <version>${siteVariables.inLongVersion}</version>
+</dependency>
+`}
+</code></pre>
+
+## 准备
+### 创建 Doris Extract 表
+先在 Doris数据库中创建表 `doris_extract_node`, 命令如下:
+```
+[root@fe001 ~]# mysql -u root -h localhost -P 9030 -p000000
+mysql> use test;
+Reading table information for completion of table and column names
+You can turn off this feature to get a quicker startup with -A
+
+Database changed
+mysql> CREATE TABLE `doris_extract_node` (
+       `id` int(11) NOT NULL COMMENT "用户id",
+       `name` varchar(50) NOT NULL COMMENT "昵称",
+       `dr` tinyint(4) NULL COMMENT "逻辑删除"
+       ) ENGINE=OLAP
+       UNIQUE KEY(`id`)
+       COMMENT "OLAP"
+       DISTRIBUTED BY HASH(`id`) BUCKETS 1
+       PROPERTIES (
+       "replication_allocation" = "tag.location.default: 1",
+       "in_memory" = "false",
+       "storage_format" = "V2"
+       );
+Query OK, 0 rows affected (0.03 sec)
+
+mysql> insert into doris_extract_node values(1, 'zhangsan', 0),(2, 'lisi', 0),(3, 'wangwu', 0);
+Query OK, 3 rows affected (0.07 sec)
+{'label':'insert_29d973e9509a48d4-a20e9f0e2d510605', 'status':'VISIBLE', 'txnId':'1032'}
+
+mysql> select * from doris_extract_node;
++------+---------+------+
+| id   | name    | dr   |
++------+---------+------+
+|    1 | zhansan |    0 |
+|    2 | lisi    |    0 |
+|    3 | wangwu  |    0 |
++------+---------+------+
+3 rows in set (0.02 sec)       
+```
+## 如何创建 Doris Extract 节点
+
+### SQL API 用法
+
+下面这个例子展示了如何用 `Flink SQL` 创建一个 Doris Extract 节点:
+* 连接器是 `doris`
+```sql
+# 启动flink sql-client, 加载 doris connector jar包
+[root@tasknode001 flink-1.13.5]# ./bin/sql-client.sh -l ./opt/connectors/doris/
+
+-- 使用 Flink SQL 创建 Doris 表 'doris_extract_node'
+Flink SQL> CREATE TABLE doris_extract_node (
+           `id` INT,
+           `name` STRINTG,
+           `dr` TINYINT
+           ) WITH (
+           'connector' = 'doris',
+           'fenodes' = 'localhost:8030',
+           'table.identifier' = 'test.doris_extract_node',
+           'username' = 'root',
+           'password' = '000000'
+           );
+  
+-- 读取数据
+Flink SQL> SELECT * FROM doris_extract_node;
+```
+
+### InLong Dashboard 用法
+
+TODO: 将在未来支持此功能。
+
+### InLong Manager Client 用法
+
+TODO: 将在未来支持此功能。
+
+## Doris Extract 节点参数
+
+| 参数                                | 是否必选    | 默认值               | 数据类型    | 描述                                                                                           |
+|-----------------------------------|---------|-------------------|---------|----------------------------------------------------------------------------------------------|
+| connector                         | 必选      | (none)            | string  | 指定要使用的连接器 `doris`                                                                            |
+| fenodes                           | 必选      | (none)            | string  | Doris FE http 地址                                                                             |
+| table.identifier	                 | 必选      | (none)            | string  | Doris 表名,如:db1.tbl1                                                                          |
+| username	                         | 必选      | (none)            | string  | 访问Doris的用户名                                                                                  |
+| password                          | 必选      | (none)            | string  | 访问Doris的密码                                                                                   |
+| doris.request.retries	            | 可选      | 3                 | int     | 向Doris发送请求的重试次数                                                                              |
+| doris.request.connect.timeout.ms	 | 可选      | 30000             | int     | 向Doris发送请求的连接超时时间                                                                            |
+| doris.request.read.timeout.ms	    | 可选      | 30000             | int     | 向Doris发送请求的读取超时时间                                                                            |
+| doris.request.query.timeout.s	    | 可选      | 3600              | int     | 查询doris的超时时间,默认值为1小时,-1表示无超时限制                                                               |

Review Comment:
   ok, i have fixed it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org