Merge branch '3.0' of https://github.com/taosdata/TDengine into fix/hzcheng_3.0

This commit is contained in:
Hongze Cheng 2022-05-25 05:40:50 +00:00
commit 38ee1dbc69
280 changed files with 111 additions and 111 deletions

View File

@ -62,7 +62,7 @@ TDengine的主要功能如下
<figure> <figure>
![TDengine技术生态图](eco_system.png) ![TDengine技术生态图](eco_system.webp)
</figure> </figure>
<center>图 1. TDengine技术生态图</center> <center>图 1. TDengine技术生态图</center>

View File

@ -11,7 +11,7 @@ TDengine 支持按时间段窗口切分方式进行聚合结果查询,比如
INTERVAL 子句用于产生相等时间周期的窗口SLIDING 用以指定窗口向前滑动的时间。每次执行的查询是一个时间窗口时间窗口随着时间流动向前滑动。在定义连续查询的时候需要指定时间窗口time window 大小和每次前向增量时间forward sliding times。如图[t0s, t0e] [t1s , t1e] [t2s, t2e] 是分别是执行三次连续查询的时间窗口范围,窗口的前向滑动的时间范围 sliding time 标识 。查询过滤、聚合等操作按照每个时间窗口为独立的单位执行。当 SLIDING 与 INTERVAL 相等的时候,滑动窗口即为翻转窗口。 INTERVAL 子句用于产生相等时间周期的窗口SLIDING 用以指定窗口向前滑动的时间。每次执行的查询是一个时间窗口时间窗口随着时间流动向前滑动。在定义连续查询的时候需要指定时间窗口time window 大小和每次前向增量时间forward sliding times。如图[t0s, t0e] [t1s , t1e] [t2s, t2e] 是分别是执行三次连续查询的时间窗口范围,窗口的前向滑动的时间范围 sliding time 标识 。查询过滤、聚合等操作按照每个时间窗口为独立的单位执行。当 SLIDING 与 INTERVAL 相等的时候,滑动窗口即为翻转窗口。
![时间窗口示意图](/img/sql/timewindow-1.png) ![时间窗口示意图](./timewindow-1.webp)
INTERVAL 和 SLIDING 子句需要配合聚合和选择函数来使用。以下 SQL 语句非法: INTERVAL 和 SLIDING 子句需要配合聚合和选择函数来使用。以下 SQL 语句非法:
@ -33,7 +33,7 @@ _ 从 2.1.5.0 版本开始INTERVAL 语句允许的最短时间间隔调整为
使用整数(布尔值)或字符串来标识产生记录时候设备的状态量。产生的记录如果具有相同的状态量数值则归属于同一个状态窗口,数值改变后该窗口关闭。如下图所示,根据状态量确定的状态窗口分别是[2019-04-28 14:22:072019-04-28 14:22:10]和[2019-04-28 14:22:112019-04-28 14:22:12]两个。(状态窗口暂不支持对超级表使用) 使用整数(布尔值)或字符串来标识产生记录时候设备的状态量。产生的记录如果具有相同的状态量数值则归属于同一个状态窗口,数值改变后该窗口关闭。如下图所示,根据状态量确定的状态窗口分别是[2019-04-28 14:22:072019-04-28 14:22:10]和[2019-04-28 14:22:112019-04-28 14:22:12]两个。(状态窗口暂不支持对超级表使用)
![时间窗口示意图](/img/sql/timewindow-3.png) ![时间窗口示意图](./timewindow-3.webp)
使用 STATE_WINDOW 来确定状态窗口划分的列。例如: 使用 STATE_WINDOW 来确定状态窗口划分的列。例如:
@ -45,7 +45,7 @@ SELECT COUNT(*), FIRST(ts), status FROM temp_tb_1 STATE_WINDOW(status);
会话窗口根据记录的时间戳主键的值来确定是否属于同一个会话。如下图所示,如果设置时间戳的连续的间隔小于等于 12 秒,则以下 6 条记录构成 2 个会话窗口,分别是:[2019-04-28 14:22:102019-04-28 14:22:30]和[2019-04-28 14:23:102019-04-28 14:23:30]。因为 2019-04-28 14:22:30 与 2019-04-28 14:23:10 之间的时间间隔是 40 秒超过了连续时间间隔12 秒)。 会话窗口根据记录的时间戳主键的值来确定是否属于同一个会话。如下图所示,如果设置时间戳的连续的间隔小于等于 12 秒,则以下 6 条记录构成 2 个会话窗口,分别是:[2019-04-28 14:22:102019-04-28 14:22:30]和[2019-04-28 14:23:102019-04-28 14:23:30]。因为 2019-04-28 14:22:30 与 2019-04-28 14:23:10 之间的时间间隔是 40 秒超过了连续时间间隔12 秒)。
![时间窗口示意图](/img/sql/timewindow-2.png) ![时间窗口示意图](./timewindow-2.webp)
在 tol_value 时间间隔范围内的结果都认为归属于同一个窗口,如果连续的两条记录的时间超过 tol_val则自动开启下一个窗口。会话窗口暂不支持对超级表使用 在 tol_value 时间间隔范围内的结果都认为归属于同一个窗口,如果连续的两条记录的时间超过 tol_val则自动开启下一个窗口。会话窗口暂不支持对超级表使用

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -4,7 +4,7 @@ title: 连接器
TDengine 提供了丰富的应用程序开发接口为了便于用户快速开发自己的应用TDengine 支持了多种编程语言的连接器,其中官方连接器包括支持 C/C++、Java、Python、Go、Node.js、C# 和 Rust 的连接器。这些连接器支持使用原生接口taosc和 REST 接口(部分语言暂不支持)连接 TDengine 集群。社区开发者也贡献了多个非官方连接器,例如 ADO.NET 连接器、Lua 连接器和 PHP 连接器。 TDengine 提供了丰富的应用程序开发接口为了便于用户快速开发自己的应用TDengine 支持了多种编程语言的连接器,其中官方连接器包括支持 C/C++、Java、Python、Go、Node.js、C# 和 Rust 的连接器。这些连接器支持使用原生接口taosc和 REST 接口(部分语言暂不支持)连接 TDengine 集群。社区开发者也贡献了多个非官方连接器,例如 ADO.NET 连接器、Lua 连接器和 PHP 连接器。
![image-connector](/img/connector.png) ![image-connector](./connector.webp)
## 支持的平台 ## 支持的平台

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem';
`taos-jdbcdriver` 是 TDengine 的官方 Java 语言连接器Java 开发人员可以通过它开发存取 TDengine 数据库的应用软件。`taos-jdbcdriver` 实现了 JDBC driver 标准的接口,并提供两种形式的连接器。一种是通过 TDengine 客户端驱动程序taosc原生连接 TDengine 实例支持数据写入、查询、订阅、schemaless 接口和参数绑定接口等功能,一种是通过 taosAdapter 提供的 REST 接口连接 TDengine 实例2.4.0.0 及更高版本。REST 连接实现的功能集合和原生连接有少量不同。 `taos-jdbcdriver` 是 TDengine 的官方 Java 语言连接器Java 开发人员可以通过它开发存取 TDengine 数据库的应用软件。`taos-jdbcdriver` 实现了 JDBC driver 标准的接口,并提供两种形式的连接器。一种是通过 TDengine 客户端驱动程序taosc原生连接 TDengine 实例支持数据写入、查询、订阅、schemaless 接口和参数绑定接口等功能,一种是通过 taosAdapter 提供的 REST 接口连接 TDengine 实例2.4.0.0 及更高版本。REST 连接实现的功能集合和原生连接有少量不同。
![tdengine-connector](tdengine-jdbc-connector.png) ![tdengine-connector](tdengine-jdbc-connector.webp)
上图显示了两种 Java 应用使用连接器访问 TDengine 的两种方式: 上图显示了两种 Java 应用使用连接器访问 TDengine 的两种方式:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -24,7 +24,7 @@ taosAdapter 提供以下功能:
## taosAdapter 架构图 ## taosAdapter 架构图
![taosAdapter Architecture](taosAdapter-architecture.png) ![taosAdapter Architecture](taosAdapter-architecture.webp)
## taosAdapter 部署方法 ## taosAdapter 部署方法

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -233,33 +233,33 @@ sudo systemctl enable grafana-server
指向 **Configurations** -> **Data Sources** 菜单,然后点击 **Add data source** 按钮。 指向 **Configurations** -> **Data Sources** 菜单,然后点击 **Add data source** 按钮。
![添加数据源按钮](./assets/howto-add-datasource-button.png) ![添加数据源按钮](./assets/howto-add-datasource-button.webp)
搜索并选择**TDengine**。 搜索并选择**TDengine**。
![添加数据源](./assets/howto-add-datasource-tdengine.png) ![添加数据源](./assets/howto-add-datasource-tdengine.webp)
配置 TDengine 数据源。 配置 TDengine 数据源。
![数据源配置](./assets/howto-add-datasource.png) ![数据源配置](./assets/howto-add-datasource.webp)
保存并测试,正常情况下会报告 'TDengine Data source is working'。 保存并测试,正常情况下会报告 'TDengine Data source is working'。
![数据源测试](./assets/howto-add-datasource-test.png) ![数据源测试](./assets/howto-add-datasource-test.webp)
### 导入仪表盘 ### 导入仪表盘
指向 **+** / **Create** - **import**(或 `/dashboard/import` url 指向 **+** / **Create** - **import**(或 `/dashboard/import` url
![导入仪表盘和配置](./assets/import_dashboard.png) ![导入仪表盘和配置](./assets/import_dashboard.webp)
**Import via grafana.com** 位置键入仪表盘 ID `15167`**Load** **Import via grafana.com** 位置键入仪表盘 ID `15167`**Load**
![通过 grafana.com 导入](./assets/import-dashboard-15167.png) ![通过 grafana.com 导入](./assets/import-dashboard-15167.webp)
导入完成后TDinsight 的完整页面视图如下所示。 导入完成后TDinsight 的完整页面视图如下所示。
![显示](./assets/TDinsight-full.png) ![显示](./assets/TDinsight-full.webp)
## TDinsight 仪表盘详细信息 ## TDinsight 仪表盘详细信息
@ -269,7 +269,7 @@ TDinsight 仪表盘旨在提供 TDengine 相关资源使用情况[dnodes, mnodes
### 集群状态 ### 集群状态
![tdinsight-mnodes-overview](./assets/TDinsight-1-cluster-status.png) ![tdinsight-mnodes-overview](./assets/TDinsight-1-cluster-status.webp)
这部分包括集群当前信息和状态,告警信息也在此处(从左到右,从上到下)。 这部分包括集群当前信息和状态,告警信息也在此处(从左到右,从上到下)。
@ -289,7 +289,7 @@ TDinsight 仪表盘旨在提供 TDengine 相关资源使用情况[dnodes, mnodes
### DNodes 状态 ### DNodes 状态
![tdinsight-mnodes-overview](./assets/TDinsight-2-dnodes.png) ![tdinsight-mnodes-overview](./assets/TDinsight-2-dnodes.webp)
- **DNodes Status**`show dnodes` 的简单表格视图。 - **DNodes Status**`show dnodes` 的简单表格视图。
- **DNodes Lifetime**:从创建 dnode 开始经过的时间。 - **DNodes Lifetime**:从创建 dnode 开始经过的时间。
@ -298,14 +298,14 @@ TDinsight 仪表盘旨在提供 TDengine 相关资源使用情况[dnodes, mnodes
### MNode 概述 ### MNode 概述
![tdinsight-mnodes-overview](./assets/TDinsight-3-mnodes.png) ![tdinsight-mnodes-overview](./assets/TDinsight-3-mnodes.webp)
1. **MNodes Status**`show mnodes` 的简单表格视图。 1. **MNodes Status**`show mnodes` 的简单表格视图。
2. **MNodes Number**:类似于`DNodes Number`MNodes 数量变化。 2. **MNodes Number**:类似于`DNodes Number`MNodes 数量变化。
### 请求 ### 请求
![tdinsight-requests](./assets/TDinsight-4-requests.png) ![tdinsight-requests](./assets/TDinsight-4-requests.webp)
1. **Requests Rate(Inserts per Second)**:平均每秒插入次数。 1. **Requests Rate(Inserts per Second)**:平均每秒插入次数。
2. **Requests (Selects)**查询请求数及变化率count of second 2. **Requests (Selects)**查询请求数及变化率count of second
@ -313,7 +313,7 @@ TDinsight 仪表盘旨在提供 TDengine 相关资源使用情况[dnodes, mnodes
### 数据库 ### 数据库
![tdinsight-database](./assets/TDinsight-5-database.png) ![tdinsight-database](./assets/TDinsight-5-database.webp)
数据库使用情况,对变量 `$database` 的每个值即每个数据库进行重复多行展示。 数据库使用情况,对变量 `$database` 的每个值即每个数据库进行重复多行展示。
@ -325,7 +325,7 @@ TDinsight 仪表盘旨在提供 TDengine 相关资源使用情况[dnodes, mnodes
### DNode 资源使用情况 ### DNode 资源使用情况
![dnode-usage](./assets/TDinsight-6-dnode-usage.png) ![dnode-usage](./assets/TDinsight-6-dnode-usage.webp)
数据节点资源使用情况展示,对变量 `$fqdn` 即每个数据节点进行重复多行展示。包括: 数据节点资源使用情况展示,对变量 `$fqdn` 即每个数据节点进行重复多行展示。包括:
@ -346,13 +346,13 @@ TDinsight 仪表盘旨在提供 TDengine 相关资源使用情况[dnodes, mnodes
### 登录历史 ### 登录历史
![登录历史](./assets/TDinsight-7-login-history.png) ![登录历史](./assets/TDinsight-7-login-history.webp)
目前只报告每分钟登录次数。 目前只报告每分钟登录次数。
### 监控 taosAdapter ### 监控 taosAdapter
![taosadapter](./assets/TDinsight-8-taosadapter.png) ![taosadapter](./assets/TDinsight-8-taosadapter.webp)
支持监控 taosAdapter 请求统计和状态详情。包括: 支持监控 taosAdapter 请求统计和状态详情。包括:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -64,15 +64,15 @@ GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=tdengine-datasource
用户可以直接通过 http://localhost:3000 的网址,登录 Grafana 服务器(用户名/密码admin/admin通过左侧 `Configuration -> Data Sources` 可以添加数据源,如下图所示: 用户可以直接通过 http://localhost:3000 的网址,登录 Grafana 服务器(用户名/密码admin/admin通过左侧 `Configuration -> Data Sources` 可以添加数据源,如下图所示:
![img](/img/connections/add_datasource1.jpg) ![img](./add_datasource1.webp)
点击 `Add data source` 可进入新增数据源页面,在查询框中输入 TDengine 可选择添加,如下图所示: 点击 `Add data source` 可进入新增数据源页面,在查询框中输入 TDengine 可选择添加,如下图所示:
![img](/img/connections/add_datasource2.jpg) ![img](./add_datasource2.webp)
进入数据源配置页面,按照默认提示修改相应配置即可: 进入数据源配置页面,按照默认提示修改相应配置即可:
![img](/img/connections/add_datasource3.jpg) ![img](./add_datasource3.webp)
- Host TDengine 集群中提供 REST 服务 (在 2.4 之前由 taosd 提供, 从 2.4 开始由 taosAdapter 提供)的组件所在服务器的 IP 地址与 TDengine REST 服务的端口号(6041),默认 http://localhost:6041。 - Host TDengine 集群中提供 REST 服务 (在 2.4 之前由 taosd 提供, 从 2.4 开始由 taosAdapter 提供)的组件所在服务器的 IP 地址与 TDengine REST 服务的端口号(6041),默认 http://localhost:6041。
- UserTDengine 用户名。 - UserTDengine 用户名。
@ -80,13 +80,13 @@ GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=tdengine-datasource
点击 `Save & Test` 进行测试,成功会有如下提示: 点击 `Save & Test` 进行测试,成功会有如下提示:
![img](/img/connections/add_datasource4.jpg) ![img](./add_datasource4.webp)
### 创建 Dashboard ### 创建 Dashboard
回到主界面创建 Dashboard点击 Add Query 进入面板查询页面: 回到主界面创建 Dashboard点击 Add Query 进入面板查询页面:
![img](/img/connections/create_dashboard1.jpg) ![img](./create_dashboard1.webp)
如上图所示,在 Query 中选中 `TDengine` 数据源,在下方查询框可输入相应 SQL 进行查询,具体说明如下: 如上图所示,在 Query 中选中 `TDengine` 数据源,在下方查询框可输入相应 SQL 进行查询,具体说明如下:
@ -96,7 +96,7 @@ GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=tdengine-datasource
按照默认提示查询当前 TDengine 部署所在服务器指定间隔系统内存平均使用量如下: 按照默认提示查询当前 TDengine 部署所在服务器指定间隔系统内存平均使用量如下:
![img](/img/connections/create_dashboard2.jpg) ![img](./create_dashboard2.webp)
> 关于如何使用 Grafana 创建相应的监测界面以及更多有关使用 Grafana 的信息,请参考 Grafana 官方的[文档](https://grafana.com/docs/)。 > 关于如何使用 Grafana 创建相应的监测界面以及更多有关使用 Grafana 的信息,请参考 Grafana 官方的[文档](https://grafana.com/docs/)。

View File

@ -45,25 +45,25 @@ MQTT 是流行的物联网数据传输协议,[EMQX](https://github.com/emqx/em
使用浏览器打开网址 http://IP:18083 并登录 EMQX Dashboard。初次安装用户名为 `admin` 密码为:`public` 使用浏览器打开网址 http://IP:18083 并登录 EMQX Dashboard。初次安装用户名为 `admin` 密码为:`public`
![img](./emqx/login-dashboard.png) ![img](./emqx/login-dashboard.webp)
### 创建规则Rule ### 创建规则Rule
选择左侧“规则引擎Rule Engine”中的“规则Rule”并点击“创建Create”按钮 选择左侧“规则引擎Rule Engine”中的“规则Rule”并点击“创建Create”按钮
![img](./emqx/rule-engine.png) ![img](./emqx/rule-engine.webp)
### 编辑 SQL 字段 ### 编辑 SQL 字段
![img](./emqx/create-rule.png) ![img](./emqx/create-rule.webp)
### 新增“动作action handler ### 新增“动作action handler
![img](./emqx/add-action-handler.png) ![img](./emqx/add-action-handler.webp)
### 新增“资源Resource ### 新增“资源Resource
![img](./emqx/create-resource.png) ![img](./emqx/create-resource.webp)
选择“发送数据到 Web 服务“并点击“新建资源”按钮: 选择“发送数据到 Web 服务“并点击“新建资源”按钮:
@ -71,13 +71,13 @@ MQTT 是流行的物联网数据传输协议,[EMQX](https://github.com/emqx/em
选择“发送数据到 Web 服务“并填写 请求 URL 为 运行 taosAdapter 的服务器地址和端口(默认为 6041。其他属性请保持默认值。 选择“发送数据到 Web 服务“并填写 请求 URL 为 运行 taosAdapter 的服务器地址和端口(默认为 6041。其他属性请保持默认值。
![img](./emqx/edit-resource.png) ![img](./emqx/edit-resource.webp)
### 编辑“动作action ### 编辑“动作action
编辑资源配置,增加 Authorization 认证的键/值配对项,相关文档请参考[ TDengine REST API 文档](https://docs.taosdata.com/reference/rest-api/)。在消息体中输入规则引擎替换模板。 编辑资源配置,增加 Authorization 认证的键/值配对项,相关文档请参考[ TDengine REST API 文档](https://docs.taosdata.com/reference/rest-api/)。在消息体中输入规则引擎替换模板。
![img](./emqx/edit-action.png) ![img](./emqx/edit-action.webp)
## 编写模拟测试程序 ## 编写模拟测试程序
@ -164,7 +164,7 @@ MQTT 是流行的物联网数据传输协议,[EMQX](https://github.com/emqx/em
注意:代码中 CLIENT_NUM 在开始测试中可以先设置一个较小的值,避免硬件性能不能完全处理较大并发客户端数量。 注意:代码中 CLIENT_NUM 在开始测试中可以先设置一个较小的值,避免硬件性能不能完全处理较大并发客户端数量。
![img](./emqx/client-num.png) ![img](./emqx/client-num.webp)
## 执行测试模拟发送 MQTT 数据 ## 执行测试模拟发送 MQTT 数据
@ -173,19 +173,19 @@ npm install mqtt mockjs --save --registry=https://registry.npm.taobao.org
node mock.js node mock.js
``` ```
![img](./emqx/run-mock.png) ![img](./emqx/run-mock.webp)
## 验证 EMQX 接收到数据 ## 验证 EMQX 接收到数据
在 EMQX Dashboard 规则引擎界面进行刷新,可以看到有多少条记录被正确接收到: 在 EMQX Dashboard 规则引擎界面进行刷新,可以看到有多少条记录被正确接收到:
![img](./emqx/check-rule-matched.png) ![img](./emqx/check-rule-matched.webp)
## 验证数据写入到 TDengine ## 验证数据写入到 TDengine
使用 TDengine CLI 程序登录并查询相应数据库和表,验证数据是否被正确写入到 TDengine 中: 使用 TDengine CLI 程序登录并查询相应数据库和表,验证数据是否被正确写入到 TDengine 中:
![img](./emqx/check-result-in-taos.png) ![img](./emqx/check-result-in-taos.webp)
TDengine 详细使用方法请参考 [TDengine 官方文档](https://docs.taosdata.com/)。 TDengine 详细使用方法请参考 [TDengine 官方文档](https://docs.taosdata.com/)。
EMQX 详细使用方法请参考 [EMQX 官方文档](https://www.emqx.io/docs/zh/v4.4/rule/rule-engine.html)。 EMQX 详细使用方法请参考 [EMQX 官方文档](https://www.emqx.io/docs/zh/v4.4/rule/rule-engine.html)。

View File

@ -9,11 +9,11 @@ TDengine Kafka Connector 包含两个插件: TDengine Source Connector 和 TDeng
Kafka Connect 是 Apache Kafka 的一个组件,用于使其它系统,比如数据库、云服务、文件系统等能方便地连接到 Kafka。数据既可以通过 Kafka Connect 从其它系统流向 Kafka, 也可以通过 Kafka Connect 从 Kafka 流向其它系统。从其它系统读数据的插件称为 Source Connector, 写数据到其它系统的插件称为 Sink Connector。Source Connector 和 Sink Connector 都不会直接连接 Kafka BrokerSource Connector 把数据转交给 Kafka Connect。Sink Connector 从 Kafka Connect 接收数据。 Kafka Connect 是 Apache Kafka 的一个组件,用于使其它系统,比如数据库、云服务、文件系统等能方便地连接到 Kafka。数据既可以通过 Kafka Connect 从其它系统流向 Kafka, 也可以通过 Kafka Connect 从 Kafka 流向其它系统。从其它系统读数据的插件称为 Source Connector, 写数据到其它系统的插件称为 Sink Connector。Source Connector 和 Sink Connector 都不会直接连接 Kafka BrokerSource Connector 把数据转交给 Kafka Connect。Sink Connector 从 Kafka Connect 接收数据。
![](kafka/Kafka_Connect.png) ![](kafka/Kafka_Connect.webp)
TDengine Source Connector 用于把数据实时地从 TDengine 读出来发送给 Kafka Connect。TDengine Sink Connector 用于 从 Kafka Connect 接收数据并写入 TDengine。 TDengine Source Connector 用于把数据实时地从 TDengine 读出来发送给 Kafka Connect。TDengine Sink Connector 用于 从 Kafka Connect 接收数据并写入 TDengine。
![](kafka/streaming-integration-with-kafka-connect.png) ![](kafka/streaming-integration-with-kafka-connect.webp)
## 什么是 Confluent ## 什么是 Confluent
@ -26,7 +26,7 @@ Confluent 在 Kafka 的基础上增加很多扩展功能。包括:
5. 管理和监控 Kafka 的 GUI —— Confluent 控制中心 5. 管理和监控 Kafka 的 GUI —— Confluent 控制中心
这些扩展功能有的包含在社区版本的 Confluent 中,有的只有企业版能用。 这些扩展功能有的包含在社区版本的 Confluent 中,有的只有企业版能用。
![](kafka/confluentPlatform.png) ![](kafka/confluentPlatform.webp)
Confluent 企业版提供了 `confluent` 命令行工具管理各个组件。 Confluent 企业版提供了 `confluent` 命令行工具管理各个组件。

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Some files were not shown because too many files have changed in this diff Show More