Skip to content

Commit a61c0e2

Browse files
authored
chore: add docs for v2.2.9 (#192)
1 parent 1baaebe commit a61c0e2

File tree

11 files changed

+407
-610
lines changed

11 files changed

+407
-610
lines changed

zh_CN/admin/configuration-fields/license.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
`license` 部分管理 Datalayers 系统的许可证密钥。
44

5-
- **`key`**:
6-
包含系统的试用许可证密钥。此密钥用于激活软件。
7-
- **示例**`key = "eyJ2IjoxLCJ0IjoxLCJjbiI6InRlc3QiLCJjZSI6bnVsbCwic2QiOiIyMDI0MDUxNyIsInZkIjozNjUsIm5sIjoxMDAsImNsIjoyNTYsImVsIjoxMDAwLCJmcyI6W119.dLBEUr9WDhuTBllPiZ3lNXOL2YtjuvFVUYQvmc85Ak0jgqHhtoCVz09GHAqdPs8yrzMxnQRiGeK49/Puzvqi6X5X0rYEOx5eiKuifWEkYnXDjtUfdvY79Z4p1SWi5h56hyyyvgrc6lPCWnccqM+JWNWA1a3QHo6V288KBQPFZvOcUY1Kl6F9lHHs5NVx/Wq+92cqg+VJ+ONivxwt3Y35VRelFczARLrpYdngpUQtvXud4nRGuDTj4YkhEZAgpjZXg7WMS8w54zboDOPKcLL5bhUTYa4WSinhSeWLEniISPu0/TihSlXsp/UqamUnb+NHa2sjMTKzAp0CeOZwZA++fQ=="`
5+
## 配置示例
86

7+
```toml
8+
# The configurations of license.
9+
[license]
10+
# A trial license key which may be deprecated.
11+
key = "eyJ2IjoxLCJ0IjoxLCJjbiI6InRlc3QiLCJjZSI6bnVsbCwic2QiOiIyMDI0MDUxNyIsInZkIjozNjUsIm5sIjoxMDAsImNsIjoyNTYsImVsIjoxMDAwLCJmcyI6W119.dLBEUr9WDhuTBllPiZ3lNXOL2YtjuvFVUYQvmc85Ak0jgqHhtoCVz09GHAqdPs8yrzMxnQRiGeK49/Puzvqi6X5X0rYEOx5eiKuifWEkYnXDjtUfdvY79Z4p1SWi5h56hyyyvgrc6lPCWnccqM+JWNWA1a3QHo6V288KBQPFZvOcUY1Kl6F9lHHs5NVx/Wq+92cqg+VJ+ONivxwt3Y35VRelFczARLrpYdngpUQtvXud4nRGuDTj4YkhEZAgpjZXg7WMS8w54zboDOPKcLL5bhUTYa4WSinhSeWLEniISPu0/TihSlXsp/UqamUnb+NHa2sjMTKzAp0CeOZwZA++fQ=="
12+
```

zh_CN/admin/configuration-fields/log.md

Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,31 @@
22

33
`log` 部分配置日志的生成、存储和管理方式。
44

5-
- **`path`**:
6-
指定日志文件存储的目录。确保该目录具有足够的权限,以便 Datalayers 系统可以写入日志。
7-
- **默认值**`"/var/log/datalayers/"`
8-
- **示例**`path = "/var/log/datalayers/"`
9-
10-
- **`level`**:
11-
设置日志输出的详细程度。可用的级别包括:
12-
- `"trace"`:详细的调试信息。
13-
- `"debug"`:调试信息。
14-
- `"info"`:一般操作信息。
15-
- `"warn"`:潜在问题的警告。
16-
- `"error"`:发生的错误。
17-
- **默认值**`"info"`
18-
- **示例**`level = "info"`
19-
20-
- **`rotation`**:
21-
确定新日志文件的创建频率。旋转选项包括:
22-
- `"MINUTELY"``"M"`:每分钟。
23-
- `"HOURLY"``"H"`:每小时。
24-
- `"DAILY"``"D"`:每天。
25-
- `"NEVER"``"N"`:不旋转。
26-
- **默认值**`"DAILY"`
27-
- **示例**`rotation = "DAILY"`
28-
29-
- **`enable_stdout`**:
30-
如果设置为 `true`,日志发送到标准输出(stdout)。这对于调试和实时监控非常有用。
31-
- **默认值**`true`
32-
- **示例**`enable_stdout = true`
33-
34-
- **`enable_file`**:
35-
如果设置为 `true`,日志将写入指定目录中的文件。通常启用此选项以实现持久的日志存储。
36-
- **默认值**`false`
37-
- **示例**`enable_file = true`
38-
39-
- **`enable_err_file`**:
40-
如果设置为 `true`,错误将记录到专用的错误文件中。这有助于将错误日志与普通日志分开,以便更容易进行故障排除。
41-
- **默认值**`false`
42-
- **示例**`enable_err_file = true`
43-
44-
- **`verbose`**:
45-
设置为 `true` 时,日志会包含额外的详细信息,如行号和文件名。这增强了日志的可读性,但可能会生成更大的日志文件。
46-
- **默认值**`true`
47-
- **示例**`verbose = true`
5+
## 配置示例
6+
7+
```toml
8+
# The fixed time period for switching to a new log file.
9+
# Supported rotation kinds:
10+
# - "MINUTELY" or "M".
11+
# - "HOURLY" or "H".
12+
# - "DAILY" or "D".
13+
# - "NEVER" or "N".
14+
# Default: "HOURLY".
15+
rotation = "DAILY"
16+
17+
# 日志是否输出到标准输出中,在容器中,将默认输出到标准输出
18+
# Default: true.
19+
enable_stdout = true
20+
21+
# Enables logging to files if set to true.
22+
# Default: false.
23+
enable_file = false
24+
25+
# 设置错误日志是否启用单独的文件文件存储.
26+
# Default: false.
27+
enable_err_file = false
28+
29+
# Makes the logging more verbose by inserting line number and file name.
30+
# Default: true.
31+
verbose = true
32+
```

zh_CN/admin/configuration-fields/node.md

Lines changed: 36 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,39 @@
22

33
`node` 部分配置 Datalayers 集群中节点的行为和属性。节点的配置确保正确的标识、角色分配、超时设置、连接管理和数据存储。以下是具体的配置项:
44

5-
## 节点名称
6-
7-
- **`name`**:
8-
定义集群中节点的唯一标识符。建议使用 `FQDN地址 + 端口号` 作为节点名称。
9-
- **默认值**`"localhost:8366"`
10-
- **示例**`name = "localhost:8366"`
11-
12-
## 角色
13-
14-
- **`role`**:
15-
指定节点在集群中的角色。通过对该角色的指定可实现读、写分离。
16-
- **默认值**`"stateless"`
17-
- **示例**`role = "stateless"`
18-
19-
## 连接超时
20-
21-
- **`connect_timeout`**:
22-
设置与集群间建立连接的超时持续时间。
23-
- **默认值**`"1s"`
24-
- **示例**`connect_timeout = "1s"`
25-
26-
## 请求超时
27-
28-
- **`timeout`**:
29-
设置集群间通信的超时时间,防止请求无限期挂起。
30-
- **默认值**`"120s"`
31-
- **示例**`timeout = "120s"`
32-
33-
## 重试次数
34-
35-
- **`retry_count`**:
36-
设置内部通信建立内部连接的最大重试次数。
37-
- **默认值**`1`
38-
- **示例**`retry_count = 1`
39-
40-
## 临时数据存储路径
41-
在集群模式下,会在当前节点下临时存储一些数据,该项配置用于设置数据的存储路径。
42-
43-
- **`data_path`**:
44-
指定节点存储数据的目录。
45-
- **默认值**`"/var/run/datalayers"`
46-
- **示例**`data_path = "/var/run/datalayers"`
47-
48-
## 集群间通信管理
49-
50-
- **`rpc_max_conn`**:
51-
设置每个 RPC 端点允许的最大活动连接数。限制连接数有助于管理资源使用。
52-
- **默认值**`20`
53-
- **示例**`rpc_max_conn = 20`
54-
55-
- **`rpc_min_conn`**:
56-
指定每个 RPC 端点的最小活动连接数。保持最低连接数可以确保节点能够高效处理请求。
57-
- **默认值**`3`
58-
- **示例**`rpc_min_conn = 3`
59-
60-
5+
## 配置示例
6+
7+
```toml
8+
[node]
9+
# The name of the node. It's the unique identifier of the node in the cluster and cannot be repeated.
10+
# Default: "localhost:8366".
11+
name = "localhost:8366"
12+
13+
# Role of the node.
14+
# Default: "stateless"
15+
role = "stateless"
16+
17+
# The timeout of connecting to the cluster.
18+
# Default: "1s".
19+
connect_timeout = "1s"
20+
21+
# The timeout applied each request sent to the cluster.
22+
# Default: "120s".
23+
timeout = "120s"
24+
25+
# The maximum number of retries for internal connection.
26+
# Default: 1.
27+
retry_count = 1
28+
29+
# The directory to store data of the node.
30+
# Default: "/var/run/datalayers".
31+
data_path = "/var/run/datalayers"
32+
33+
# The maximum number of active connections at a time between each RPC endpoints.
34+
# Default: 20.
35+
rpc_max_conn = 20
36+
37+
# The minimum number of active connections at a time between each RPC endpoints.
38+
# Default: 3.
39+
rpc_min_conn = 3
40+
```
Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,29 @@
11
# Runtime 配置
22

33
该配置项用于 `CPU Core``用户线程``后台线程`进行分离与绑定,以保障系统在高负载时前台线程与后台线程不会争抢 CPU 资源。在系统负载较高的场景建议配置该项。
4+
45
```tips
56
后台线程包括不限于:compact、flush、gc、compact_active、compact_inactive
67
78
前台线程:除后台线程之外的其他线程
89
```
910

10-
## 默认Runtime配置
11-
12-
`runtime.default` 配置控制系统主要操作的 CPU 使用情况。
13-
14-
- **`cpu_cores`**:
15-
定义分配给默认运行时的 CPU 核心数量。此设置允许灵活管理 CPU 资源。该值可以是绝对数量,或者为总 CPU 核心的百分比,或者为 `0` 表示不隔离该运行时的 CPU。
16-
- `>= 1`:指定分配的绝对 CPU 核心数量。
17-
- `0`:不为此运行时隔离 CPU,这意味着没有特定的核心专用于它。
18-
- `> 0 and < 1`:指定分配的总 CPU 核心百分比。例如,`0.2` 表示分配 20% 的所有 CPU 核心。
19-
- **默认值**: `0.0` (无 CPU 隔离)。
20-
21-
## 后台任务Runtime配置
11+
## 配置示例
2212

23-
`runtime.background` 配置管理与主要操作同时运行的后台任务的 CPU 资源分配。
24-
25-
- **`cpu_cores`**:
26-
控制分配给后台任务的 CPU 核心数量。该值与 `runtime.default` 设置遵循相同的规则:
27-
- `>= 1`:后台任务的绝对 CPU 核心数量。
28-
- `0`:后台任务不隔离 CPU。
29-
- `> 0 and < 1`:分配给后台任务的总 CPU 核心百分比。
30-
- **默认值**: `0.0` (无 CPU 隔离)。
31-
32-
```tips
33-
默认配置,前后台线程共享所有 CPU Core.
13+
```toml
14+
# The configurations of runtime.
15+
[runtime]
3416

35-
所有运行配置中的 `cpu_cores` 累加不能超过系统总的 CPU 核心数量。
17+
# The configurations of default runtime
18+
#[runtime.default]
19+
# Isolate number of CPU, float value
20+
# >=1 means absolute number of CPU
21+
# 0 means do not use isolate cpu for this runtime
22+
# >0 and <1 means percentage of all CPU cores, 0.2 means 20% e.g.
23+
# Default: 0.0
24+
#cpu_cores = 0.0
3625

37-
如果一项运行配置中设置 `cpu_cores` 不等于 0,表示该项运行配置要绑定部分 CPU,此时另外的运行配置 `cpu_cores` 等于 0 表示会绑定到剩余的 CPU 上。
26+
# The configurations of background runtime
27+
#[runtime.background]
28+
#cpu_cores = 0.0
3829
```

zh_CN/admin/configuration-fields/scheduler.md

Lines changed: 23 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -4,94 +4,26 @@
44

55
这些配置确保了系统作业如刷新、垃圾回收和压缩的良好管理,提供最佳性能,同时防止资源过载。
66

7-
## Flush Job 配置
8-
9-
`flush` Job 负责将数据从内存写入持久化存储。
10-
11-
- **`concurrence_limit`**:
12-
定义当前节点可以同时运行的最大`flush`作业数。限制这一数值可以确保系统不会因多个刷新操作同时进行而过载。
13-
- **默认值**`3`
14-
- **示例**`concurrence_limit = 3`
15-
16-
- **`queue_limit`**:
17-
指定当前节点等待执行的最大待处理刷新作业数。这可以防止系统排队过多作业,从而导致性能下降。
18-
- **默认值**`10000`
19-
- **示例**`queue_limit = 10000`
20-
21-
- **完整示例**:
22-
```
23-
[scheduler.flush]
24-
concurrence_limit = 1
25-
queue_limit = 10000
26-
```
27-
28-
## 垃圾回收(GC)作业配置
29-
30-
垃圾回收作业用于删除未使用或过时的数据,以确保资源的有效使用。
31-
32-
- **`concurrence_limit`**:
33-
定义当前节点可以同时运行的垃圾回收作业数。这通常保持较低,以避免在关键操作期间影响系统性能。
34-
- **默认值**`1`
35-
- **示例**`concurrence_limit = 1`
36-
37-
- **`queue_limit`**:
38-
确定当前节点可以排队的垃圾回收作业数。
39-
- **默认值**`10000`
40-
- **示例**`queue_limit = 10000`
41-
42-
- **完整示例**:
43-
```
44-
[scheduler.gc]
45-
concurrence_limit = 1
46-
queue_limit = 10000
47-
```
48-
49-
## Compact 作业配置
50-
51-
`compact` Job 负责对数据进行压缩、重组和优化,有助于提高存储和检索的效率。
52-
- **`concurrence_limit`**:
53-
定义当前节点可以同时运行的 Compact 作业数。这通常保持较低,以避免在关键操作期间影响系统性能。
54-
- **默认值**`1`
55-
- **示例**`concurrence_limit = 1`
56-
57-
- **`queue_limit`**:
58-
确定当前节点可以排队的 Compact 作业数。
59-
- **默认值**`10000`
60-
- **示例**`queue_limit = 10000`
61-
62-
- **完整示例**:
63-
```
64-
[scheduler.compact]
65-
concurrence_limit = 1
66-
queue_limit = 10000
67-
```
68-
69-
## 集群 Compact 活跃窗口作业配置
70-
71-
集群模式下,控制所有节点同时运行的针对活跃窗口数据的 Compact 作业数量。活跃窗口是指当前正在写入数据的时间窗口,和表引擎中定义的 `COMPACT_WINDOW` 有关。
72-
73-
数据压缩是资源密集型操作,全局控制总作业数量有助于防止集群资源使用过载,影响关键操作。
74-
75-
- **`concurrence_limit`**:
76-
指定所有节点可以同时运行的针对活跃窗口数据的 Compact 作业数。
77-
- **默认值**`4`
78-
- **示例**`concurrence_limit = 4`
79-
- **完整示例**:
80-
```
81-
[scheduler.cluster_compact_active]
82-
concurrence_limit = 2
83-
```
84-
85-
## 集群 Compact 非活跃窗口作业配置
86-
87-
集群模式下,控制所有节点同时运行的针对非活跃窗口数据的 Compact 作业数量。非活跃窗口是指活跃窗口之前的时间窗口,和表引擎中定义的 `COMPACT_WINDOW` 有关。
88-
89-
- **`concurrence_limit`**:
90-
指定所有节点可以同时运行的针对非活跃窗口数据的 Compact 作业数。
91-
- **默认值**`2`
92-
- **示例**`concurrence_limit = 2`
93-
- **完整示例**:
94-
```
95-
[scheduler.cluster_compact_inactive]
96-
concurrence_limit = 1
97-
```
7+
## 配置示例
8+
9+
```toml
10+
# The configurations of the scheduler.
11+
[scheduler]
12+
13+
# The configurations of the flush job.
14+
[scheduler.flush]
15+
# The maximum number of running flush jobs at the same time.
16+
concurrence_limit = 3
17+
# The maximum number of pending flush jobs at the same time
18+
queue_limit = 10000
19+
20+
[scheduler.gc]
21+
# The maximum number of running gc jobs at the same time.
22+
concurrence_limit = 1
23+
# The maximum number of pending gc jobs at the same time
24+
queue_limit = 10000
25+
26+
[scheduler.cluster_compact_inactive]
27+
# The maximum number of running `cluster compact inactive` jobs at the same time.
28+
concurrence_limit = 1
29+
```

0 commit comments

Comments
 (0)