Explorar el Código

fix(docs): update docs

Signed-off-by: Jianxiang Ran <rxan_embedded@163.com>
Jianxiang Ran hace 3 años
padre
commit
858de4ce0f

+ 1 - 3
deploy/chart/kuiper/values.yaml

@@ -102,9 +102,7 @@ kuiperConfig:
       # Prometheus settings
       prometheus: false
       prometheusPort: 20499
-      # The URL where hosts all of pre-build plugins. By default it's at packages.emqx.io
-      # There could be several hosts (host can be separated with comma), if same package could be found in the several hosts,
-      # then the package in the 1st host will have the highest priority.
+      # The URL where hosts all of pre-build plugins. By default it's at packages.emqx.net
       pluginHosts: https://packages.emqx.net
       # Whether to ignore case in SQL processing. Note that, the name of customized function by plugins are case-sensitive.
       ignoreCase: true

+ 13 - 57
docs/en_US/operation/config/configuration_file.md

@@ -90,71 +90,27 @@ For such a default configuration, eKuiper will export metrics and serve promethe
 
 ## Pluginhosts Configuration
 
-The URL where hosts all of pre-build plugins. By default it's at `packages.emqx.io`. There could be several hosts (host can be separated with comma), if same package could be found in the several hosts, then the package in the 1st host will have the highest priority.
+The URL where hosts all of pre-build [native plugins](../../extension/native/overview.md). By default, it's at `packages.emqx.net`. 
 
-Please notice that only the plugins that can be installed to the current eKuiper instance will be listed through below Rest-APIs.  
+All plugins list as follows:
+
+|  plugin types  |        pre-build plugins                                        |
+|  -----------   |  ---------------------------------------------------------------|
+|  source        |    random zmq                                                   |
+|  sink          |  file image influx redis tdengine zmq                           |
+|  function      |  accumulateWordCount countPlusOne echo geohash image labelImage |
+
+User can get all pre-build plugins names and address by below Rest-APIs:
 
 ```
 GET http://localhost:9081/plugins/sources/prebuild
 GET http://localhost:9081/plugins/sinks/prebuild
 GET http://localhost:9081/plugins/functions/prebuild
-```
-It has following conditions to make the plugins listed through previous APIs,
-
-- eKuiper version: The plugins must be built for the eKuiper instance version. If the plugins cannot be found  for a specific version, no plugins will be returned.
-- Operating system: Now only Linux system is supported, so if eKuiper is running at other operating systems,  no plugins will be returned.
-- CPU architecture: Only with correct CPU architecture built plugins are found in the plugin repository can the plugins be returned.
-- EMQ official released Docker images: Only when the eKuiper is running at EMQ official released Docker images can the plugins be returned.
-
-
-```yaml
-pluginHosts: https://packages.emqx.io
-```
-
-It could be also as following, you can specify a local repository, and the plugin in that repository will have higher priorities.
-
-```yaml
-pluginHosts: https://local.repo.net, https://packages.emqx.io
-```
-
-The directory structure of the plugins should be similar as following.
-
-```
-http://host:port/kuiper-plugins/0.9.1/alpine/sinks
-http://host:port/kuiper-plugins/0.9.1/alpine/sources
-http://host:port/kuiper-plugins/0.9.1/alpine/functions
-```
-
-The content of the page should be similar as below.
-
-```html
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<title>Directory listing for enterprise: /4.1.1/</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="robots" content="noindex,nofollow">
-<body>
-	<h2>Directory listing for enterprise: /4.1.1/</h2>
-	<hr>
-	<ul>
-		<li><a href="file_386.zip">file_386.zip</a>
-		<li><a href="file_amd64.zip">file_amd64.zip</a>
-		<li><a href="file_arm.zip">file_arm.zip</a>
-		<li><a href="file_arm64.zip">file_arm64.zip</a>
-		<li><a href="file_ppc64le.zip">file_ppc64le.zip</a>
-
-		<li><a href="influx_386.zip">influx_386.zip</a>
-		<li><a href="influx_amd64.zip">influx_amd64.zip</a>
-		<li><a href="influx_arm.zip">influx_arm.zip</a>
-		<li><a href="influx_arm64.zip">influx_arm64.zip</a>
-		<li><a href="influx_ppc64le.zip">influx_ppc64le.zip</a>
-	</ul>
-	<hr>
-</body>
-</html>
-```
+``` 
 
+After get the plugin info, users can try these plugins, [more info](../restapi/plugins.md) 
 
+**Note: only the official released debian based docker images support these operations**
 
 ## Sink configurations
 

+ 1 - 1
docs/en_US/operation/restapi/plugins.md

@@ -184,7 +184,7 @@ POST http://{{host}}/plugins/functions/{plugin_name}/register
 
 ## Get the available plugins
 
-According to the configuration `pluginHosts` in file `etc/kuiper.yaml` ,  it returns the plugins list that can be installed at local run eKuiper instance. By default, it get the list from `https://packages.emqx.io` .
+According to the configuration `pluginHosts` in file `etc/kuiper.yaml` ,  it returns the plugins list that can be installed at local run eKuiper instance. By default, it get the list from `https://packages.emqx.net` .
 
 ```
 GET http://localhost:9081/plugins/sources/prebuild

+ 1 - 1
docs/en_US/sqls/tables.md

@@ -67,7 +67,7 @@ CREATE TABLE stateTable (
 		triggered bool
 	) WITH (DATASOURCE="myTopic", FORMAT="JSON", TYPE="mqtt");
 
-SELECT * FROM demo LEFT JOIN stateTable WHERE triggered=true
+SELECT * FROM demo LEFT JOIN stateTable on demo.id = stateTable.id  WHERE triggered=true
 ```
 
 In this example, a table `stateTable` is created to record the trigger state from mqtt topic *myTopic*. In the rule, the data of `demo` stream is filtered with the current trigger state.

+ 13 - 57
docs/zh_CN/operation/config/configuration_file.md

@@ -72,71 +72,27 @@ basic:
 
 ## Pluginhosts 配置
 
-该 URL 对所有预构建插件托管。 默认情况下,它位于 `packages.emqx.io` 中。 可能有多个主机(主机可以用逗号分隔),如果可以在多个主机中找到相同的程序包,则第一个主机中的程序包将具有最高优先级
+默认在 `packages.emqx.net` 托管所有预构建 [native 插件](../../extension/native/overview.md)
 
-请注意,只有可以安装到当前 eKuiper 实例的插件才会通过 Rest-API 下方列出。
+所有插件列表如下:
+
+|  插件类型        |        预构建插件列表                                             |
+|  -----------   |  ---------------------------------------------------------------|
+|  source        |    random zmq                                                   |
+|  sink          |  file image influx redis tdengine zmq                           |
+|  function      |  accumulateWordCount countPlusOne echo geohash image labelImage |
+
+用户可以通过以下 Rest-API 获取所有预构建插件的名称和地址:
 
 ```
 GET http://localhost:9081/plugins/sources/prebuild
 GET http://localhost:9081/plugins/sinks/prebuild
 GET http://localhost:9081/plugins/functions/prebuild
-```
-
-如果希望通过前述的API列出插件,则应具有以下条件:
-
-- eKuiper 版本:必须为 eKuiper 实例版本构建插件。 如果找不到特定版本的插件,则不会返回任何插件。
-- 操作系统:现在仅支持 Linux 系统,因此,如果 eKuiper 在其他操作系统上运行,则不会返回任何插件。
-- CPU 架构:只有在正确的 CPU 架构中构建的插件,才能在插件存储库中找到并返回。
-- EMQ 官方发布的 Docker 映像:仅当 eKuiper 在 EMQ 官方发布的 Docker 映像上运行时,才能返回插件。
-
-```yaml
-pluginHosts: https://packages.emqx.io
-```
-
-具体如下所示,您可以指定本地存储库,该存储库中的插件将具有更高的优先级。
-
-```yaml
-pluginHosts: https://local.repo.net, https://packages.emqx.io
-```
-
-插件的目录结构应如下所示。
-
-```
-http://host:port/kuiper-plugins/0.9.1/alpine/sinks
-http://host:port/kuiper-plugins/0.9.1/alpine/sources
-http://host:port/kuiper-plugins/0.9.1/alpine/functions
-```
-
-页面内容如下所示。
-
-```html
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
-<html>
-<title>Directory listing for enterprise: /4.1.1/</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<meta name="robots" content="noindex,nofollow">
-<body>
-	<h2>Directory listing for enterprise: /4.1.1/</h2>
-	<hr>
-	<ul>
-		<li><a href="file_386.zip">file_386.zip</a>
-		<li><a href="file_amd64.zip">file_amd64.zip</a>
-		<li><a href="file_arm.zip">file_arm.zip</a>
-		<li><a href="file_arm64.zip">file_arm64.zip</a>
-		<li><a href="file_ppc64le.zip">file_ppc64le.zip</a>
-
-		<li><a href="influx_386.zip">influx_386.zip</a>
-		<li><a href="influx_amd64.zip">influx_amd64.zip</a>
-		<li><a href="influx_arm.zip">influx_arm.zip</a>
-		<li><a href="influx_arm64.zip">influx_arm64.zip</a>
-		<li><a href="influx_ppc64le.zip">influx_ppc64le.zip</a>
-	</ul>
-	<hr>
-</body>
-</html>
-```
+``` 
 
+获取插件信息后,用户可以尝试这些插件,[更多信息](../restapi/plugins.md)
 
+**注意:只有官方发布的基于 debian 的 docker 镜像支持以上操作**
 
 ## Sink 配置
 

+ 1 - 1
docs/zh_CN/operation/restapi/plugins.md

@@ -186,7 +186,7 @@ POST http://{{host}}/plugins/functions/{plugin_name}/register
 
 ## 获取可安装的插件
 
-根据在 `etc/kuiper.yaml` 文件中 `pluginHosts` 的配置,获取适合本 eKuiper 实例运行的插件列表,缺省会从 `https://packages.emqx.io` 上去获取。
+根据在 `etc/kuiper.yaml` 文件中 `pluginHosts` 的配置,获取适合本 eKuiper 实例运行的插件列表,缺省会从 `https://packages.emqx.net` 上去获取。
 
 ```
 GET http://localhost:9081/plugins/sources/prebuild

+ 17 - 23
docs/zh_CN/sqls/tables.md

@@ -1,13 +1,12 @@
-# Table specs
+# 表规格
 
-eKuiper streams is unbounded and immutable, any new data are appended in the current stream for processing.  **Table** is provided to represent the current state of the stream. It can be considered as a snapshot of the stream. Users can use table to retain a batch of data for processing.
+eKuiper 流是无界且不可变的,任何新数据都会附加到当前流中进行处理。 **Table** 用于表示流的当前状态。它可以被认为是流的快照。用户可以使用 table 来保留一批数据进行处理。
 
-Table is not allowed to use alone in eKuiper. It is only recommended to join with streams. When joining with stream, table will be updated continuously when new event coming. However, only events arriving on the stream side trigger downstream updates and produce join output.
+在 eKuiper 中不允许单独使用表格。仅建议与流进行 join 操作。join 流时,表格将在新事件到来时不断更新。但是,只有到达流端的事件才会触发下游更新并产生连接输出。
 
-## Syntax
-
-Table supports almost the same syntax as streams. To create a table, run the below SQL:
+## 语法定义
 
+表支持与流几乎相同的语法。要创建表,请运行以下 SQL:
 ```sql
 CREATE TABLE   
     table_name   
@@ -15,18 +14,16 @@ CREATE TABLE
     WITH ( property_name = expression [, ...] );
 ```
 
-Table supports the same [data types](./streams.md#data-types) as stream. 
-
-Table also supports all [the properties of the stream](./streams.md#language-definitions). Thus, all the source type are also supported in table. Many sources are not batched which have one event at any given time point, which means the table will always have only one event. An additional property `RETAIN_SIZE` to specify the size of the table snapshot so that the table can hold an arbitrary amount of history data.
-
-## Usage scenarios
+表支持与流相同的 [数据类型](./streams.md#data-types)。
+表还支持所有[流的属性](./streams.md#language-definitions)。因此,表中也支持所有源类型。许多源不是批处理的,它们在任何给定时间点都有一个事件,这意味着表将始终只有一个事件。一个附加属性 `RETAIN_SIZE` 来指定表快照的大小,以便表可以保存任意数量的历史数据。
 
-Typically, table will be joined with stream with or without a window. When joining with stream, table data won't affect the downstream updata, it is treated like a static referenced data although it may be updated internally.
+## 使用场景
 
-### Lookup table
+通常,表格将与带有或不带有窗口的流连接。与流连接时,表数据不会影响下游更新数据,它被视为静态引用数据,尽管它可能会在内部更新。
 
-A typical usage for table is as a lookup table. Sample SQL will be like:
+### 查询表
 
+表的典型用法是作为查找表。示例 SQL 将类似于:
 ```sql
 CREATE TABLE table1 (
 		id BIGINT,
@@ -36,10 +33,9 @@ CREATE TABLE table1 (
 SELECT * FROM demo INNER JOIN table1 on demo.id = table1.id
 ```
 
-In this example, a table `table1` is created to read json data from file *lookup.json*. Then in the rule, `table1` is joined with the stream `demo` so that the stream can lookup the name from the id.
-
-The content of *lookup.json* file should be an array of objects. Below is an example:
+在这个例子中,创建了一个表 `table1` 来从文件 *lookup.json* 中读取 json 数据。然后在规则中,将 `table1` 与流 `demo` 连接起来,以便流可以从 id 中查找名称。
 
+*lookup.json* 文件的内容应该是一个对象数组。下面是一个例子:
 ```json
 [
   {
@@ -57,17 +53,15 @@ The content of *lookup.json* file should be an array of objects. Below is an exa
 ]
 ```
 
-### Filter by history state
-
-In some scenario, we may have an event stream for data and another event stream as the control information. 
+### 按历史状态过滤
 
+在某些情况下,我们可能有一个用于数据的事件流和另一个作为控制信息的事件流。
 ```sql
 CREATE TABLE stateTable (
 		id BIGINT,
 		triggered bool
 	) WITH (DATASOURCE="myTopic", FORMAT="JSON", TYPE="mqtt");
 
-SELECT * FROM demo LEFT JOIN stateTable WHERE triggered=true
+SELECT * FROM demo LEFT JOIN stateTable on demo.id = stateTable.id WHERE triggered=true
 ```
-
-In this example, a table `stateTable` is created to record the trigger state from mqtt topic *myTopic*. In the rule, the data of `demo` stream is filtered with the current trigger state.
+在此示例中,创建了一个表 `stateTable` 来记录来自 mqtt 主题 *myTopic* 的触发器状态。在规则中,会根据当前触发状态来过滤 `demo` 流的数据。

+ 1 - 3
etc/kuiper.yaml

@@ -25,9 +25,7 @@ basic:
   # Prometheus settings
   prometheus: false
   prometheusPort: 20499
-  # The URL where hosts all of pre-build plugins. By default it's at packages.emqx.io
-  # There could be several hosts (host can be separated with comma), if same package could be found in the several hosts,
-  # then the package in the 1st host will have the highest priority.
+  # The URL where hosts all of pre-build plugins. By default it's at packages.emqx.net
   pluginHosts: https://packages.emqx.net
   # Whether to ignore case in SQL processing. Note that, the name of customized function by plugins are case-sensitive.
   ignoreCase: true