Skip to content

Update be-config.md support #2413

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion docs/admin-manual/config/be-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ There are two ways to configure BE configuration items:

1. Static configuration

Add and set configuration items in the `conf/be.conf` file. The configuration items in `be.conf` will be read when BE starts. Configuration items not in `be.conf` will use default values.
Add and set configuration items in the `conf/be.conf` file. The configuration items in `be.conf` will be read when BE starts. Configuration items not in `be.conf` will use default values.

2. Dynamic configuration

Expand All @@ -85,6 +85,10 @@ There are two ways to configure BE configuration items:
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?{key}={value}\&persist=true
```

** ​Note:​​**

In the `be.conf` configuration file, the value of configuration items supports the use of the `$` symbol to dynamically retrieve values from system environment variables. For example, `storage_root_path` can be set to `${DORIS_HOME}/storage` or `$DORIS_HOME/storage`. Valid characters for variable names are uppercase/lowercase letters (`[a-zA-Z]`), underscores (`_`), and digits (`[0-9]`). The first character can be any of the above (no restrictions). ​To use a literal `$` (avoiding variable substitution), escape it with two consecutive dollar signs: `$$`.

## Examples

1. Modify `max_base_compaction_threads` statically
Expand Down
2 changes: 1 addition & 1 deletion docs/admin-manual/config/fe-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ There are two ways to configure FE configuration items:

1. Static configuration

Add and set configuration items in the `conf/fe.conf` file. The configuration items in `fe.conf` will be read when the FE process starts. Configuration items not in `fe.conf` will use default values.
Add and set configuration items in the `conf/fe.conf` file. The configuration items in `fe.conf` will be read when the FE process starts. Configuration items not in `fe.conf` will use default values. In the `fe.conf` configuration file, the values of configuration items support the use of the `$` symbol to dynamically retrieve values from system environment variables. For example, `meta_dir` can be set to `${DORIS_HOME}/doris-meta` or `$DORIS_HOME/doris-meta`. Note that the naming convention for system variables requires the use of uppercase/lowercase letters (`[a-zA-Z]`), underscores (`_`), or digits (`[0-9]`), with no restrictions on the first character. Additionally, to escape the `$` symbol (use it literally), two consecutive backslashes followed by `$` (`\\$`) are required.

2. Dynamic configuration via MySQL protocol

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ BE 启动后,可以通过以下命令动态设置配置项。
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?{key}={value}\&persist=true
```

**注意:**

在`be.conf`中配置项的值,支持使用`$`符号,动态从系统环境变量中获取。如`storage_root_path`可以设置为`${DORIS_HOME}/storage`或者`$DORIS_HOME/storage`。注意,系统变量的命名规范为:大小写字母`[a-zA-Z]`、下划线`_`和数字`[0-9]`,首字母无特殊要求。同时,支持`$`符号转义,使用两个`$$`符号即可完成转义。


## 应用举例

1. 静态方式修改 `max_base_compaction_threads`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ FE 的配置项有两种方式进行配置:

1. 静态配置

在 `conf/fe.conf` 文件中添加和设置配置项。`fe.conf` 中的配置项会在 FE 进程启动时被读取。没有在 `fe.conf` 中的配置项将使用默认值。
在 `conf/fe.conf` 文件中添加和设置配置项。`fe.conf` 中的配置项会在 FE 进程启动时被读取。没有在 `fe.conf` 中的配置项将使用默认值。在`fe.conf`中配置项的值,支持使用`$`符号,动态从系统环境变量中获取。如`meta_dir`可以设置为`${DORIS_HOME}/doris-meta`或者`$DORIS_HOME/doris-meta`。注意,系统变量的命名规范为:大小写字母`[a-zA-Z]`、下划线`_`和数字`[0-9]`,首字母无特殊要求。同时,支持`$`符号转义,使用两个`\\$`符号即可完成转义。

2. 通过 MySQL 协议动态配置

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ BE 启动后,可以通过以下命令动态设置配置项。
curl -X POST http://{be_ip}:{be_http_port}/api/update_config?{key}={value}\&persist=true
```

**注意:**

在`be.conf`中配置项的值,支持使用`$`符号,动态从系统环境变量中获取。如`storage_root_path`可以设置为`${DORIS_HOME}/storage`或者`$DORIS_HOME/storage`。注意,系统变量的命名规范为:大小写字母`[a-zA-Z]`、下划线`_`和数字`[0-9]`,首字母无特殊要求。同时,支持`$`符号转义,使用两个`$$`符号即可完成转义。

## 应用举例

1. 静态方式修改 `max_base_compaction_threads`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ FE 的配置项有两种方式进行配置:

1. 静态配置

在 `conf/fe.conf` 文件中添加和设置配置项。`fe.conf` 中的配置项会在 FE 进程启动时被读取。没有在 `fe.conf` 中的配置项将使用默认值。
在 `conf/fe.conf` 文件中添加和设置配置项。`fe.conf` 中的配置项会在 FE 进程启动时被读取。没有在 `fe.conf` 中的配置项将使用默认值。在`fe.conf`中配置项的值,支持使用`$`符号,动态从系统环境变量中获取。如`meta_dir`可以设置为`${DORIS_HOME}/doris-meta`或者`$DORIS_HOME/doris-meta`。注意,系统变量的命名规范为:大小写字母`[a-zA-Z]`、下划线`_`和数字`[0-9]`,首字母无特殊要求。同时,支持`$`符号转义,使用两个`\\$`符号即可完成转义。

2. 通过 MySQL 协议动态配置

Expand Down