This is an automated email from the ASF dual-hosted git repository. zhuzh pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 5b61baadd02ccdfa702834e2e63aeb8d1d9e1250 Author: JunRuiLee <[email protected]> AuthorDate: Sun Feb 4 16:38:55 2024 +0800 [FLINK-34247][doc] Add documentation of new Flink configuration file config.yaml. --- docs/content.zh/docs/deployment/config.md | 88 ++++++++++++++++++- docs/content/docs/deployment/config.md | 88 ++++++++++++++++++- docs/layouts/shortcodes/config_file.html | 126 ++++++++++++++++++++++++++++ docs/layouts/shortcodes/config_file_zh.html | 126 ++++++++++++++++++++++++++++ 4 files changed, 424 insertions(+), 4 deletions(-) diff --git a/docs/content.zh/docs/deployment/config.md b/docs/content.zh/docs/deployment/config.md index 35b85240d03..d3119d4cf8f 100644 --- a/docs/content.zh/docs/deployment/config.md +++ b/docs/content.zh/docs/deployment/config.md @@ -27,16 +27,100 @@ under the License. # 配置参数 -All configuration is done in `conf/flink-conf.yaml`, which is expected to be a flat collection of [YAML key value pairs](http://www.yaml.org/spec/1.2/spec.html) with format `key: value`. +All configuration can be set in Flink configuration file in the `conf/` directory (see [Flink Configuration File section](#flink-configuration-file)). The configuration is parsed and evaluated when the Flink processes are started. Changes to the configuration file require restarting the relevant processes. -The out of the box configuration will use your default Java installation. You can manually set the environment variable `JAVA_HOME` or the configuration key `env.java.home` in `conf/flink-conf.yaml` if you want to manually override the Java runtime to use. +The out of the box configuration will use your default Java installation. You can manually set the environment variable `JAVA_HOME` or the configuration key `env.java.home` in Flink configuration file if you want to manually override the Java runtime to use. You can specify a different configuration directory location by defining the `FLINK_CONF_DIR` environment variable. For resource providers which provide non-session deployments, you can specify per-job configurations this way. Make a copy of the `conf` directory from the Flink distribution and modify the settings on a per-job basis. Note that this is not supported in Docker or standalone Kubernetes deployments. On Docker-based deployments, you can use the `FLINK_PROPERTIES` environment v [...] On session clusters, the provided configuration will only be used for configuring [execution](#execution) parameters, e.g. configuration parameters affecting the job, not the underlying cluster. +# Flink 配置文件 + +自 Flink-1.19 版本起,Flink 正式引入了对标准 YAML 1.2 语法的完整支持。与之前版本中仅支持简单键值对的配置方式相比,这一更新为用户提供了更加灵活和强大的配置能力。为了利用这一新特性,用户需使用新引入的配置文件 `config.yaml`。原有的 `flink-conf.yaml` 配置文件不再推荐使用,并在即将到来的 Flink-2.0 版本中不再支持。为了确保平滑迁移,建议用户尽早将现有作业配置迁移到新的配置方式。 + +本节将帮助用户理解如何通过 `config.yaml` 配置文件对 Flink 集群和作业进行配置,以及如何将老配置迁移至新的配置文件中。 + +### 用法 + +从 Flink-1.19 版本开始,默认的配置文件已更改为 `config.yaml`,并置于 `conf/` 目录下。用户在进行配置时应直接修改此文件。 + +如果用户希望继续使用 Flink-1.19 之前的配置文件 `flink-conf.yaml`,只需将该文件拷贝到 `conf/` 目录下。一旦检测到 `flink-conf.yaml` 文件,Flink 会优先使用其作为配置文件。 + +`config.yaml` 的配置方式如下: + +#### Config Key + +- 用户可以按照 Nested 的格式来组织 Config Key,如: + +```config.yaml +restart-strategy: + type: failure-rate + failure-rate: + delay: 1 s + failure-rate-interval: 1 min + max-failures-per-interval: 1 +``` + +- 此外,用户也可以按 Flatten 的格式组织 Config Key,如: + +```flink-conf.yaml +restart-strategy.type: failure-rate +restart-strategy.failure-rate.delay: 1 s +restart-strategy.failure-rate.failure-rate-interval: 1 min +restart-strategy.failure-rate.max-failures-per-interval: 1 +``` + +#### Config Value + +`config.yaml` 配置文件支持用户按 [YAML 1.2 core schema](https://yaml.org/spec/1.2.2/#103-core-schema) 进行 value 的配置。 + +用户可按如下格式配置 Value 对应的Config Type: + +{{< config_file_zh >}} + +此外,用户还可以按字符串格式配置所有 Config Type 的 Value,只需将原始值使用单引号或双引号括起来。 + +### 从 flink-conf.yaml 迁移至 config.yaml +#### 行为变更 +`config.yaml` 严格遵循 YAML1.2 语法,与 `flink-conf.yaml` 在大部分情况下都完全兼容,除了以下场景发生了行为变更: + +- Null value: + - `flink-conf.yaml`:仅支持留空。 + - `config.yaml`:支持留空, null, Null, NULL 和 `~` 。 + +- 注释: + - `flink-conf.yaml`:每一行中首次出现 `#` 以后的都认为是注释。 + - `config.yaml`:`#` 号和它前面的内容之间至少有一个空格或者 `#` 号位于一行的开头时,后续内容才认为是注释。 + +- 需要转义的特殊字符: + - `flink-conf.yaml`:仅需要对 List 和 Map的元素进行转义 + - List 中的元素如果含有分号 ";" ,则需要进行转义。 + - Map 中的元素如果含有逗号 "," 和冒号 ":" ,则需要进行转义。 + - `config.yaml`:需要对 YAML 1.2 规范中的特殊字符进行转义,特殊字符的定义见[链接](https://yaml.org/spec/1.2.2/#53-indicator-characters)。 + +- 重复Key: + - `flink-conf.yaml`:允许重复Key,取文件中最末端出现的对应Key的 key-value pair。 + - `config.yaml`:不允许重复Key,加载配置时将报错。 + +- 对非法配置的处理: + - `flink-conf.yaml`:非法的 key-value pair 将被忽略。 + - `config.yaml`:加载配置时将报错。 + +#### Migration Tool +为了方便用户迁移,Flink 提供了一个配置文件迁移脚本,使用这个脚本可以自动化地完成迁移过程。使用方法如下: + +- 将旧的配置文件 `flink-conf.yaml` 放置在 `conf/` 目录下 +- 在 `$FLINK_HOME/` 目录执行如下指令 +````migrate-tool.sh +bin/migrate-config-file.sh +```` +运行上述指令后,该迁移脚本会自动读取 `conf/` 目录下的旧配置文件 `flink-conf.yaml`,并将迁移后的结果输出到 `conf/` 目录下的新配置文件 `config.yaml` 中。需要注意的是,因为老配置项解析器的限制,`flink-conf.yaml` 中所有的 value 会被识别为 `String` 类型,所以生成的 `config.yaml` 文件中的 value 也都为 `String` 类型,即部分 value 会被引号引起来。不过 Flink 会在后续的配置解析时将其转换为使用 `ConfigOption` 定义的实际类型。 + +此外,用户需要在迁移完成后删除 `conf/` 目录下的 `flink-conf.yaml` 文件来使 `config.yaml` 文件生效。 + # Basic Setup The default configuration supports starting a single-node Flink session cluster without any changes. diff --git a/docs/content/docs/deployment/config.md b/docs/content/docs/deployment/config.md index c6546630888..126d8289019 100644 --- a/docs/content/docs/deployment/config.md +++ b/docs/content/docs/deployment/config.md @@ -27,16 +27,100 @@ under the License. # Configuration -All configuration is done in `conf/flink-conf.yaml`, which is expected to be a flat collection of [YAML key value pairs](http://www.yaml.org/spec/1.2/spec.html) with format `key: value`. +All configuration can be set in Flink configuration file in the `conf/` directory (see [Flink Configuration File](#flink-configuration-file)). The configuration is parsed and evaluated when the Flink processes are started. Changes to the configuration file require restarting the relevant processes. -The out of the box configuration will use your default Java installation. You can manually set the environment variable `JAVA_HOME` or the configuration key `env.java.home` in `conf/flink-conf.yaml` if you want to manually override the Java runtime to use. +The out of the box configuration will use your default Java installation. You can manually set the environment variable `JAVA_HOME` or the configuration key `env.java.home` in Flink configuration file if you want to manually override the Java runtime to use. You can specify a different configuration directory location by defining the `FLINK_CONF_DIR` environment variable. For resource providers which provide non-session deployments, you can specify per-job configurations this way. Make a copy of the `conf` directory from the Flink distribution and modify the settings on a per-job basis. Note that this is not supported in Docker or standalone Kubernetes deployments. On Docker-based deployments, you can use the `FLINK_PROPERTIES` environment v [...] On session clusters, the provided configuration will only be used for configuring [execution](#execution) parameters, e.g. configuration parameters affecting the job, not the underlying cluster. +# Flink Configuration File + +Starting with version 1.19, Flink has officially introduced full support for the standard YAML 1.2 syntax. Compared to the previous versions which only supported simple key-value pairs, this update provides users with more flexible and powerful configuration capabilities. To take advantage of this new feature, users need to use the newly introduced `config.yaml` configuration file. The existing `flink-conf.yaml` configuration file is deprecated and will no longer work in the upcoming ver [...] + +This section will help users understand how to configure the Flink cluster and jobs through the `config.yaml` configuration file, as well as how to migrate old configuration to the new configuration file. + +### Usage + +Starting from Flink-1.19, the default configuration file has been changed to `config.yaml` and placed in the `conf/` directory. Users should directly modify this file to configure Flink. + +To continue using the legacy configuration file `flink-conf.yaml`, users just need to copy this file into the `conf/` directory. Once the legacy configuration file `flink-conf.yaml` is detected, Flink will prioritize using it as the configuration file. + +The usage for `config.yaml` is as follows: + +#### Config Key + +- Users can organize Config Keys in a nested format, such as: + +```config.yaml +restart-strategy: + type: failure-rate + failure-rate: + delay: 1 s + failure-rate-interval: 1 min + max-failures-per-interval: 1 +``` + +- Users can also organize Config Keys in a flatten format, such as: + +```flink-conf.yaml +restart-strategy.type: failure-rate +restart-strategy.failure-rate.delay: 1 s +restart-strategy.failure-rate.failure-rate-interval: 1 min +restart-strategy.failure-rate.max-failures-per-interval: 1 +``` + +#### Config Value + +The `config.yaml` configuration file allows users to configure values following the [YAML 1.2 core schema](https://yaml.org/spec/1.2.2/#103-core-schema). +Users can configure the values corresponding to the Config Type in the following format: + +{{< config_file >}} + +Additionally, users can configure the value for all Config Types as strings by simply enclosing the original value in single quotes or double quotes. + + +### Migrate from flink-conf.yaml to config.yaml +#### Behavior Changes +`config.yaml` strictly follows the YAML 1.2 syntax and is compatible with `flink-conf.yaml` in most cases, except for the following behavior changes: + +- Null value: + - `flink-conf.yaml`: Only supports leaving the value blank. + - `config.yaml`: Supports leaving it blank, or explicitly set it to null, Null, NULL, or `~`. + +- Comment: + - `flink-conf.yaml`: Everything after the first occurrence of `#` in each line is considered a comment. + - `config.yaml`: When there is at least one space between the `#` and the preceding content, or when the `#` is at the beginning of a line, the subsequent content is considered a comment. + +- Special character escaping in strings: + - `flink-conf.yaml`: Only needs to escape elements in Lists and Maps. + - List elements containing a semicolon ";" require escaping. + - Map elements containing a comma "," or colon ":" require escaping. + - `config.yaml`: Requires escaping special characters as defined in the YAML 1.2 specification; see the definition of [special characters](https://yaml.org/spec/1.2.2/#53-indicator-characters). + +- Duplicated keys: + - `flink-conf.yaml`: Allows duplicated keys and takes the last key-value pair for the corresponding key that appears in the file. + - `config.yaml`: Does not allow duplicated keys, and an error will be reported when loading the configuration. + +- Handling of invalid configuration: + - `flink-conf.yaml`: Invalid key-value pairs will be ignored. + - `config.yaml`: An error will be reported when loading the configuration. + +#### Migration Tool +To facilitate user migration, Flink provides a configuration file migration script that can automate the migration process. The usage is as follows: + +- Place the old configuration file `flink-conf.yaml` in the `conf/` directory. +- Execute the following command in the `$FLINK_HOME/` directory: +````migrate-tool.sh +bin/migrate-config-file.sh +```` +After running the command above, the migration script will automatically read the old configuration file `flink-conf.yaml` from the `conf/` directory and output the migrated results to the new configuration file `config.yaml` in the `conf/` directory. Note that due to the limitation of the legacy configuration parser, all values in flink-conf.yaml will be recognized as String type, so the values in the generated config.yaml file will also be of String type, which means some values will b [...] + +Additionally, users need to delete the `flink-conf.yaml` file in the `conf/` directory after migration to make the `config.yaml` file take effect. + # Basic Setup The default configuration supports starting a single-node Flink session cluster without any changes. diff --git a/docs/layouts/shortcodes/config_file.html b/docs/layouts/shortcodes/config_file.html new file mode 100644 index 00000000000..aeaa4c12966 --- /dev/null +++ b/docs/layouts/shortcodes/config_file.html @@ -0,0 +1,126 @@ +{{/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/}} + +<table class="configuration file table table-bordered"> + <thead> + <tr> + <th class="text-left" style="width: 20%">Config Type</th> + <th class="text-left" style="width: 80%">Format Reference</th> + </tr> + </thead> + <tbody> + <tr> + <td><h5>Integer</h5></td> + <td>Regular expression: <code>[-+]? [0-9]+</code><br><br>Example: <code>100</code></td> + </tr> + <tr> + <td><h5>Long</h5></td> + <td>Regular expression: <code>[-+]? [0-9]+</code><br><br>Example: <code>100</code></td> + </tr> + <tr> + <td><h5>Float</h5></td> + <td>Regular expression: <code>[-+]? ( \. [0-9]+ | [0-9]+ ( \. [0-9]* )? ) ( [eE] [-+]? [0-9]+ )?</code><br><br>Example: <code>100.1</code></td> + </tr> + <tr> + <td><h5>Double</h5></td> + <td>Regular expression: <code>[-+]? ( \. [0-9]+ | [0-9]+ ( \. [0-9]* )? ) ( [eE] [-+]? [0-9]+ )?</code><br><br>Example: <code>100.1</code></td> + </tr> + <tr> + <td><h5>Boolean</h5></td> + <td>Regular expression: <code>true | True | TRUE | false | False | FALSE</code><br><br>Example: <code>true</code></td> + </tr> + <tr id="config-type-string"> + <td><h5>String</h5></td> + <td> + Any character<br><br> + <strong>Note</strong>: If the value contains special characters used in + <a href="https://yaml.org/spec/1.2.2/#53-indicator-characters" target="_blank">YAML</a>, + it is necessary to use single or double quotes to escape these characters. + </td> + </tr> + <tr> + <td><h5>Map<String, String></h5></td> + <td> + <ul> + <li style="line-height: 1.8; margin-bottom: 10px;">Flow Style: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">Description: Enclosed with curly braces "{}" and pairs are separated by a comma ",". Within the mapping, key and value are separated by a colon ":" followed by a space.</li> + <li style="line-height: 1.4; margin-bottom: 5px;">Example: <code>{k1: v1, k2: v2}</code></li> + </ul> + </li> + <li style="line-height: 1.8; margin-bottom: 10px;">Block Style: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">Description: Uses indentation to represent the hierarchical structure of the data, with keys and values separated by a colon ":" and a space.</li> + <li style="line-height: 1.4; margin-bottom: 5px;">Example: + <pre><code>k1: v1<br>k2: v2</code></pre> + </li> + </ul> + </li> + <li style="line-height: 1.8; margin-bottom: 10px;">Flink Legacy Map Pattern: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">Description: Pairs are separated by a comma ",". Within the mapping, keys and values are separated by a colon ":".</li> + <li style="line-height: 1.4; margin-bottom: 5px;">Example: <code>k1:v1,k2:v2</code></li> + </ul> + </li> + </ul> + Note: For values containing special characters, consider escaping them; details can be found in the description of <a href="#config-type-string">Config Type: String</a>. + </td> + </tr> + <tr> + <td><h5>List</h5></td> + <td> + <ul> + <li style="line-height: 1.8; margin-bottom: 10px;">Flow Style: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">Description: Enclosed within square brackets "[]" and list items are separated by a comma ",".</li> + <li style="line-height: 1.4; margin-bottom: 5px;">Example: <code>[a, b, c]</code></li> + </ul> + </li> + <li style="line-height: 1.8; margin-bottom: 10px;">Block Style: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">Description: Uses indentation and a dash "-" to denote list items.</li> + <li style="line-height: 1.4; margin-bottom: 5px;">Example: + <pre><code>- a<br>- b<br>- c</code></pre> + </li> + </ul> + </li> + <li style="line-height: 1.8; margin-bottom: 10px;">Flink Legacy Map Pattern: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">Description: List items are separated by a semicolon ";".</li> + <li style="line-height: 1.4; margin-bottom: 5px;">Example: <code>a;b;c</code></li> + </ul> + </li> + </ul> + Note: For values containing special characters, consider escaping them; details can be found in the description of <a href="#config-type-string">Config Type: String</a>. + </td> + </tr> + <tr> + <td><h5>MemorySize</h5></td> + <td>Regular expression: <code>[0-9]+ (b | kb | kibibytes | m | mb | mebibytes | g | gb | gibibytes | t | tb | tebibytes)?</code><br><br>Example: <code>100 mb</code></td> + </tr> + <tr> + <td><h5>Boolean</h5></td> + <td>Regular expression: <code>[0-9]+ (d | day | h | hour | m | min | minute | s | sec | second | ms | milli | millisecond | us | micro | microsecond | ns | nano | nanosecond)?</code><br><br>Example: <code>10 s</code></td> + </tr> + <tr> + <td><h5>Enum</h5></td> + <td>Enum Constants</td> + </tr> + </tbody> +</table> diff --git a/docs/layouts/shortcodes/config_file_zh.html b/docs/layouts/shortcodes/config_file_zh.html new file mode 100644 index 00000000000..a1942a8242b --- /dev/null +++ b/docs/layouts/shortcodes/config_file_zh.html @@ -0,0 +1,126 @@ +{{/* +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +*/}} + +<table class="configuration file table table-bordered"> + <thead> + <tr> + <th class="text-left" style="width: 20%">Config Type</th> + <th class="text-left" style="width: 80%">配置格式参考</th> + </tr> + </thead> + <tbody> + <tr> + <td><h5>Integer</h5></td> + <td>正则表达式:<code>[-+]? [0-9]+</code><br><br>示例:<code>100</code></td> + </tr> + <tr> + <td><h5>Long</h5></td> + <td>正则表达式:<code>[-+]? [0-9]+</code><br><br>示例:<code>100</code></td> + </tr> + <tr> + <td><h5>Float</h5></td> + <td>正则表达式:<code>[-+]? ( \. [0-9]+ | [0-9]+ ( \. [0-9]* )? ) ( [eE] [-+]? [0-9]+ )?</code><br><br>示例:<code>100.1</code></td> + </tr> + <tr> + <td><h5>Double</h5></td> + <td>正则表达式:<code>[-+]? ( \. [0-9]+ | [0-9]+ ( \. [0-9]* )? ) ( [eE] [-+]? [0-9]+ )?</code><br><br>示例:<code>100.1</code></td> + </tr> + <tr> + <td><h5>Boolean</h5></td> + <td>正则表达式:<code>true | True | TRUE | false | False | FALSE</code><br><br>示例:<code>true</code></td> + </tr> + <tr id="config-type-string"> + <td><h5>String</h5></td> + <td> + 任意字符<br><br> + <strong>Note</strong>:如果 value 按字符串处理,且字符串中包含YAML中的 + <a href="https://yaml.org/spec/1.2.2/#53-indicator-characters" target="_blank">特殊字符</a>, + 则必须使用单引号或者双引号对其进行转义. + </td> + </tr> + <tr> + <td><h5>Map<String, String></h5></td> + <td> + <ul> + <li style="line-height: 1.8; margin-bottom: 10px;">Flow Style: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">说明:使用花括号 "{}" 括起来,并且键值对之间由逗号 "," 分隔。在映射内部,键和值之间由冒号 ":" 分隔,并且在冒号后跟一个空格。</li> + <li style="line-height: 1.4; margin-bottom: 5px;">示例:<code>{k1: v1, k2: v2}</code></li> + </ul> + </li> + <li style="line-height: 1.8; margin-bottom: 10px;">Block Style: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">说明:使用缩进来表示数据结构的层次关系,键和值之间用冒号 ":" 和一个空格分隔。</li> + <li style="line-height: 1.4; margin-bottom: 5px;">示例: + <pre><code>k1: v1<br>k2: v2</code></pre> + </li> + </ul> + </li> + <li style="line-height: 1.8; margin-bottom: 10px;">Flink Legacy Map Pattern: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">说明:键值对之间由逗号 "," 分隔。在映射内部,键和值之间由冒号 ":" 分隔。</li> + <li style="line-height: 1.4; margin-bottom: 5px;">示例:<code>k1:v1,k2:v2</code></li> + </ul> + </li> + </ul> + 注意:对于value中带有特殊字符的情况,需要考虑转义,详情可见 <a href="#config-type-string">Config Type: String</a> 的描述。 + </td> + </tr> + <tr> + <td><h5>List</h5></td> + <td> + <ul> + <li style="line-height: 1.8; margin-bottom: 10px;">Flow Style: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">说明:使用方括号 "[]" 来表示,并且列表中的元素由逗号 "," 分隔。</li> + <li style="line-height: 1.4; margin-bottom: 5px;">示例:<code>[a, b, c]</code></li> + </ul> + </li> + <li style="line-height: 1.8; margin-bottom: 10px;">Block Style: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">说明:使用缩进和短横线 "-" 来表示列表的条目。</li> + <li style="line-height: 1.4; margin-bottom: 5px;">示例: + <pre><code>- a<br>- b<br>- c</code></pre> + </li> + </ul> + </li> + <li style="line-height: 1.8; margin-bottom: 10px;">Flink Legacy Map Pattern: + <ul> + <li style="line-height: 1.4; margin-bottom: 5px;">说明:列表中的元素由分号 ";" 分隔。</li> + <li style="line-height: 1.4; margin-bottom: 5px;">示例:<code>a;b;c</code></li> + </ul> + </li> + </ul> + 注意:对于value中带有特殊字符的情况,需要考虑转义,详情可见 <a href="#config-type-string">Config Type: String</a> 的描述。 + </td> + </tr> + <tr> + <td><h5>MemorySize</h5></td> + <td>正则表达式:<code>[0-9]+ (b | kb | kibibytes | m | mb | mebibytes | g | gb | gibibytes | t | tb | tebibytes)?</code><br><br>示例:<code>100 mb</code></td> + </tr> + <tr> + <td><h5>Boolean</h5></td> + <td>正则表达式:<code>[0-9]+ (d | day | h | hour | m | min | minute | s | sec | second | ms | milli | millisecond | us | micro | microsecond | ns | nano | nanosecond)?</code><br><br>示例:<code>10 s</code></td> + </tr> + <tr> + <td><h5>Enum</h5></td> + <td>枚举类常量</td> + </tr> + </tbody> +</table>
