This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new bd19491 [Doc] Modify the description of dynamic partition hot
partition (#6764)
bd19491 is described below
commit bd19491b5bd619a93060fcf9df8ec04c89267dcc
Author: jiafeng.zhang <[email protected]>
AuthorDate: Sun Oct 10 23:06:14 2021 +0800
[Doc] Modify the description of dynamic partition hot partition (#6764)
Modify the description of dynamic partition hot partition
---
docs/en/administrator-guide/dynamic-partition.md | 13 +++++++++----
docs/zh-CN/administrator-guide/dynamic-partition.md | 10 ++++++----
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/docs/en/administrator-guide/dynamic-partition.md
b/docs/en/administrator-guide/dynamic-partition.md
index 402e37d..04471b3 100644
--- a/docs/en/administrator-guide/dynamic-partition.md
+++ b/docs/en/administrator-guide/dynamic-partition.md
@@ -100,7 +100,7 @@ The rules of dynamic partition are prefixed with
`dynamic_partition.`:
* `dynamic_partition.start`
The starting offset of the dynamic partition, usually a negative number.
Depending on the `time_unit` attribute, based on the current day (week /
month), the partitions with a partition range before this offset will be
deleted. If not filled, the default is `-2147483648`, that is, the history
partition will not be deleted.
-
+
* `dynamic_partition.end`
The end offset of the dynamic partition, usually a positive number.
According to the difference of the `time_unit` attribute, the partition of the
corresponding range is created in advance based on the current day (week /
month).
@@ -139,8 +139,11 @@ The rules of dynamic partition are prefixed with
`dynamic_partition.`:
Specify how many of the latest partitions are hot partitions. For hot
partition, the system will automatically set its `storage_medium` parameter to
SSD, and set `storage_cooldown_time`.
- Let us give an example. Suppose today is 2021-05-20, partition by day, and
the properties of dynamic partition are set to: hot_partition_num=2, end=3,
start=-3. Then the system will automatically create the following partitions,
and set the `storage_medium` and `storage_cooldown_time` properties:
+ `hot_partition_num` is all partitions in the previous n days and in the
future.
+
+ Let us give an example. Suppose today is 2021-05-20, partition by day, and
the properties of dynamic partition are set to: hot_partition_num=2, end=3,
start=-3. Then the system will automatically create the following partitions,
and set the `storage_medium` and `storage_cooldown_time` properties:
+
```
p20210517: ["2021-05-17", "2021-05-18") storage_medium=HDD
storage_cooldown_time=9999-12-31 23:59:59
p20210518: ["2021-05-18", "2021-05-19") storage_medium=HDD
storage_cooldown_time=9999-12-31 23:59:59
@@ -151,6 +154,7 @@ The rules of dynamic partition are prefixed with
`dynamic_partition.`:
p20210523: ["2021-05-23", "2021-05-24") storage_medium=SSD
storage_cooldown_time=2021-05-25 00:00:00
```
+
* `dynamic_partition.reserved_history_periods`
The range of reserved history periods. It should be in the form of
`[yyyy-MM-dd,yyyy-MM-dd],[...,...]` while the `dynamic_partition.time_unit` is
"DAY, WEEK, and MONTH". And it should be in the form of `[yyyy-MM-dd
HH:mm:ss,yyyy-MM-dd HH:mm:ss],[...,...]` while the dynamic_partition.time_unit`
is "HOUR". And no more spaces expected. The default value is `"NULL"`, which
means it is not set.
@@ -177,6 +181,7 @@ The rules of dynamic partition are prefixed with
`dynamic_partition.`:
Otherwise, every `[...,...]` in `reserved_history_periods` is a couple of
properties, and they should be set at the same time. And the first date can't
be larger than the second one.
+
#### Create History Partition Rules
When `create_history_partition` is `true`, i.e. history partition creation is
enabled, Doris determines the number of history partitions to be created based
on `dynamic_partition.start` and `dynamic_partition.history_partition_num`.
@@ -395,7 +400,7 @@ mysql> SHOW DYNAMIC PARTITION TABLES;
+-----------+--------+----------+-------------+------+--------+---------+-----------+----------------+---------------------+--------+------------------------+----------------------+-------------------------+
7 rows in set (0.02 sec)
```
-
+
* LastUpdateTime: The last time of modifying dynamic partition properties
* LastSchedulerTime: The last time of performing dynamic partition scheduling
* State: The state of the last execution of dynamic partition scheduling
@@ -455,5 +460,5 @@ When dynamic partitioning feature is disabled, Doris will
no longer manage parti
1. After creating the dynamic partition table, it prompts ```Could not create
table with dynamic partition when fe config dynamic_partition_enable is false```
Because the main switch of dynamic partition, that is, the
configuration of FE ```dynamic_partition_enable``` is false, the dynamic
partition table cannot be created.
-
+
At this time, please modify the FE configuration file, add a line
```dynamic_partition_enable=true```, and restart FE. Or execute the command
ADMIN SET FRONTEND CONFIG ("dynamic_partition_enable" = "true") to turn on the
dynamic partition switch.
diff --git a/docs/zh-CN/administrator-guide/dynamic-partition.md
b/docs/zh-CN/administrator-guide/dynamic-partition.md
index 246559e..0249b37 100644
--- a/docs/zh-CN/administrator-guide/dynamic-partition.md
+++ b/docs/zh-CN/administrator-guide/dynamic-partition.md
@@ -130,15 +130,17 @@ under the License.
当不指定 `start` 属性时,该参数不生效。
* `dynamic_partition.history_partition_num`
-
+
当 `create_history_partition` 为 `true` 时,该参数用于指定创建历史分区数量。默认值为 -1, 即未设置。
* `dynamic_partition.hot_partition_num`
指定最新的多少个分区为热分区。对于热分区,系统会自动设置其 `storage_medium` 参数为SSD,并且设置
`storage_cooldown_time`。
- 我们举例说明。假设今天是 2021-05-20,按天分区,动态分区的属性设置为:hot_partition_num=2, end=3,
start=-3。则系统会自动创建以下分区,并且设置 `storage_medium` 和 `storage_cooldown_time` 参数:
+ `hot_partition_num` 是往前 n 天和未来所有分区
+ 我们举例说明。假设今天是 2021-05-20,按天分区,动态分区的属性设置为:hot_partition_num=2, end=3,
start=-3。则系统会自动创建以下分区,并且设置 `storage_medium` 和 `storage_cooldown_time` 参数:
+
```
p20210517:["2021-05-17", "2021-05-18") storage_medium=HDD
storage_cooldown_time=9999-12-31 23:59:59
p20210518:["2021-05-18", "2021-05-19") storage_medium=HDD
storage_cooldown_time=9999-12-31 23:59:59
@@ -231,7 +233,7 @@ under the License.
```
### 注意事项
-
+
动态分区使用过程中,如果因为一些意外情况导致 `dynamic_partition.start` 和 `dynamic_partition.end`
之间的某些分区丢失,那么当前时间与 `dynamic_partition.end`
之间的丢失分区会被重新创建,`dynamic_partition.start`与当前时间之间的丢失分区不会重新创建。
## 示例
@@ -394,7 +396,7 @@ mysql> SHOW DYNAMIC PARTITION TABLES;
+-----------+--------+----------+-------------+------+--------+---------+-----------+----------------+---------------------+--------+------------------------+----------------------+-------------------------+
7 rows in set (0.02 sec)
```
-
+
* LastUpdateTime: 最后一次修改动态分区属性的时间
* LastSchedulerTime: 最后一次执行动态分区调度的时间
* State: 最后一次执行动态分区调度的状态
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]