Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add incremental doc #3462

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/en_US/guide/rules/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ See the table below for a detailed explanation of each rule behavior:
| cronDatetimeRange | lists of struct | Specify the effective time period of the Scheduled Rule, which is only valid when `cron` is specified. When this `cronDatetimeRange` is specified, the Scheduled Rule will only take effect within the time range specified. Please see [Scheduled Rule](#Scheduled Rule) for detailed configuration items |
| enableRuleTracer | bool: false | Specify whether the rule enables rule-level data tracing |

| planOptimizeStrategy | struct | Specify whether the rule turns on the corresponding optimization |

For detail about `qos` and `checkpointInterval`, please check [state and fault tolerance](./state_and_fault_tolerance.md).

The rule options can be defined globally in `etc/kuiper.yaml` under the `rules` section. The options defined in the rule json will override the global setting.
Expand Down Expand Up @@ -231,6 +233,16 @@ When a periodic rule is stopped by [stop rule](../../api/restapi/rules.md#stop-a

When `cronDatetimeRange` is configured but `cron` and `duration` are empty, the rule will run according to the time period specified by `cronDatetimeRange` until the time period is exceeded.

### Rule optimization switch

The rule optimization switch `planOptimizeStrategy` can control whether the rule enables specific rule optimization:

The configuration items of `planOptimizeStrategy` are as follows:

| option name | type and default value | description |
|-------|--------|-------------------------------- ----------|
| enableIncrementalWindow | bool: false | Enable incremental calculation when the rule contains both a time window and an aggregate function that supports incremental calculation |

## View Rule Status

When a rule is deployed to eKuiper, we can use the rule indicator to understand the current running status of the rule.
Expand Down
11 changes: 11 additions & 0 deletions docs/zh_CN/guide/rules/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ eKuiper 已经内置了丰富的 sink connector 类型,如 mqtt、rest 和 fil
| duration | string: "" | 指定规则的运行持续时间,只有当指定了 cron 后才有效。duration 不应该超过两次 cron 周期之间的时间间隔,否则会引起非预期的行为。 |
| cronDatetimeRange | 结构体数组 | 指定周期性规则的生效时间段。当指定了该参数后,周期性规则只有在这个参数所制定的时间范围内才生效。请查看 [周期性规则](#周期性规则) 了解详细的配置项目 |
| enableRuleTracer | bool: false | 指定规则是否开启规则级别的数据追踪 |
| planOptimizeStrategy | 结构体 | 指定规则是否打开对应优化 |

有关 `qos` 和 `checkpointInterval` 的详细信息,请查看[状态和容错](./state_and_fault_tolerance.md)。

Expand Down Expand Up @@ -207,6 +208,16 @@ cronDatetimeRange 支持结构体数组,你可以声明一组时间段来表
}
```

### 规则优化开关

在规则优化开关 `planOptimizeStrategy` 可以控制该规则是否启用特定的规则优化:

`planOptimizeStrategy` 的配置项如下:

| 选项名 | 类型和默认值 | 说明 |
|-------|--------|-------------------------------------------|
| enableIncrementalWindow | bool: false | 当规则同时包含时间窗口和支持增量计算的聚合函数时,启用增量计算 |

#### 阶段运行规则

当 `cronDatetimeRange` 配置了但是 `cron` 与 `duration` 为空时,则该规则会按照 `cronDatetimeRange` 所指定的时间阶段内一直运行,直到超出该时间阶段。
Expand Down
Loading