|
@@ -1,8 +1,8 @@
|
|
|
-# Random Source
|
|
|
+# 随机源
|
|
|
|
|
|
-he source will generate random inputs with a specified pattern.
|
|
|
+随机源将生成具有指定样式的随机输入。
|
|
|
|
|
|
-## Compile & deploy plugin
|
|
|
+## 编译和部署插件
|
|
|
|
|
|
```shell
|
|
|
# cd $kuiper_src
|
|
@@ -10,11 +10,11 @@ he source will generate random inputs with a specified pattern.
|
|
|
# cp plugins/sources/Random.so $kuiper_install/plugins/sources
|
|
|
```
|
|
|
|
|
|
-Restart the Kuiper server to activate the plugin.
|
|
|
+重新启动 Kuiper 服务器以激活插件。
|
|
|
|
|
|
-## Configuration
|
|
|
+## 配置
|
|
|
|
|
|
-The configuration for this source is ``$kuiper/etc/sources/random.yaml``. The format is as below:
|
|
|
+该源的配置为 `$kuiper/etc/sources/random.yaml`。格式如下:
|
|
|
|
|
|
```yaml
|
|
|
default:
|
|
@@ -31,31 +31,31 @@ dedup:
|
|
|
interval: 100
|
|
|
deduplicate: 50
|
|
|
```
|
|
|
-### Global configurations
|
|
|
+### 全局配置
|
|
|
|
|
|
-Use can specify the global random source settings here. The configuration items specified in ``default`` section will be taken as default settings for the source when running this source.
|
|
|
+用户可以在此处指定全局随机源设置。 运行此源时,将在 `default` 部分中指定的配置项目作为源的默认设置。
|
|
|
|
|
|
### interval
|
|
|
|
|
|
-The interval (ms) to issue a message.
|
|
|
+发出消息的间隔(毫秒)。
|
|
|
|
|
|
### seed
|
|
|
|
|
|
-The maximum integer to be produced by the random function
|
|
|
+随机函数产生的最大整数。
|
|
|
|
|
|
### pattern
|
|
|
|
|
|
-The pattern to be generated by the source. In the above example, the pattern will be a json like {"count":50}
|
|
|
+源生成的样式。 在上面的示例中,样式将为 json,例如{"count":50}
|
|
|
|
|
|
### deduplicate
|
|
|
|
|
|
-An int value. If it is a positive number, the source will not issue the messages which are duplicates of any of the previous 'deduplicate' length of messages. If it is 0, the source won't check for duplications. If it is a negative number, the source will check for duplicates over any previous messages. Do not use negative length if you have very large input data sets as all the previous data will be kept.
|
|
|
+一个整数值。 如果它为正数,则源不会发出与以前任何“重复数据删除”长度的消息重复的消息。如果为0,则源不会检查是否存在重复。如果是负数,则源将检查以前任何消息的重复项。如果有非常大的输入数据集,请不要使用负长度,因为将保留所有以前的数据。
|
|
|
|
|
|
-## Override the default settings
|
|
|
+## 覆盖默认设置
|
|
|
|
|
|
-If you have a specific connection that need to overwrite the default settings, you can create a customized section. In the previous sample, we create a specific setting named with ``test``. Then you can specify the configuration with option ``CONF_KEY`` when creating the stream definition (see [stream specs](../../sqls/streams.md) for more info).
|
|
|
+如果您有特定的连接需要覆盖默认设置,则可以创建一个自定义部分。 在上一个示例中,我们创建一个名为 `test` 的特定设置。 然后,您可以在创建流定义时使用选项`CONF_KEY` 指定配置(有关更多信息,请参见 [stream specs](../../sqls/streams.md))。
|
|
|
|
|
|
-## Sample usage
|
|
|
+## 使用示例
|
|
|
|
|
|
```
|
|
|
demo (
|
|
@@ -63,5 +63,5 @@ demo (
|
|
|
) WITH (DATASOURCE="demo", FORMAT="JSON", CONF_KEY="ext", TYPE="random");
|
|
|
```
|
|
|
|
|
|
-The configuration keys "ext" will be used.
|
|
|
+配置键 "ext" 将被使用。
|
|
|
|