This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-0.15 in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit b913aa13e4f470b90eeaf0efa714651f4c43164c Author: zh0122 <[email protected]> AuthorDate: Wed Oct 20 15:32:35 2021 +0800 Replace replica_allocation to replication_allocation (#6870) Fix #6869 --- docs/en/administrator-guide/multi-tenant.md | 4 ++-- .../Data-Definition-Statements/Create/CREATE-TABLE.md | 12 ++++++------ .../sql-statements/Data Definition/CREATE TABLE.md | 10 +++++----- docs/zh-CN/administrator-guide/multi-tenant.md | 4 ++-- .../Data-Definition-Statements/Create/CREATE-TABLE.md | 12 ++++++------ .../sql-statements/Data Definition/CREATE TABLE.md | 10 +++++----- .../org/apache/doris/analysis/ModifyPartitionClause.java | 2 +- .../java/org/apache/doris/catalog/ModifyBackendTagTest.java | 2 +- 8 files changed, 28 insertions(+), 28 deletions(-) diff --git a/docs/en/administrator-guide/multi-tenant.md b/docs/en/administrator-guide/multi-tenant.md index ac0a808..a758ac8 100644 --- a/docs/en/administrator-guide/multi-tenant.md +++ b/docs/en/administrator-guide/multi-tenant.md @@ -72,7 +72,7 @@ Node resource division refers to setting tags for BE nodes in a Doris cluster, a (k1 int, k2 int) distributed by hash(k1) buckets 1 properties( - "replica_allocation" + "replication_allocation" = "tag.location.group_a:1, tag.location.group_b:1, tag.location.group_c:1" ) @@ -201,7 +201,7 @@ Here we give an example of the steps to start using the resource division functi ``` alter system modify backend "host1:9050, 1212:9050" set ("tag.location" = "group_a"); - alter table my_table modify partition p1 set ("replica_allocation" = "tag.location.group_a:2"); + alter table my_table modify partition p1 set ("replication_allocation" = "tag.location.group_a:2"); ``` 3. Turn on data repair and balance logic diff --git a/docs/en/sql-reference-v2/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE.md b/docs/en/sql-reference-v2/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE.md index fd44cf0..a2a706b 100644 --- a/docs/en/sql-reference-v2/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE.md +++ b/docs/en/sql-reference-v2/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE.md @@ -238,11 +238,11 @@ distribution_info Number of copies. The default number of copies is 3. If the number of BE nodes is less than 3, you need to specify that the number of copies is less than or equal to the number of BE nodes. - After version 0.15, this attribute will be automatically converted to the `replica_allocation` attribute, such as: + After version 0.15, this attribute will be automatically converted to the `replication_allocation` attribute, such as: - `"replication_num" = "3"` will be automatically converted to `"replica_allocation" = "tag.location.default:3"` + `"replication_num" = "3"` will be automatically converted to `"replication_allocation" = "tag.location.default:3"` - * `replica_allocation` + * `replication_allocation` Set the copy distribution according to Tag. This attribute can completely cover the function of the `replication_num` attribute. @@ -487,7 +487,7 @@ distribution_info PROPERTIES("replication_num" = "3"); ``` -10. Set the replica of the table through the `replica_allocation` property. +10. Set the replica of the table through the `replication_allocation` property. ```sql CREATE TABLE example_db.table_hash @@ -497,7 +497,7 @@ distribution_info ) DISTRIBUTED BY HASH(k1) BUCKETS 32 PROPERTIES ( - "replica_allocation"="tag.location.group_a:1, tag.location.group_b:2" + "replication_allocation"="tag.location.group_a:1, tag.location.group_b:2" ); CREATE TABLE example_db.dynamic_partition @@ -516,7 +516,7 @@ distribution_info "dynamic_partition.end" = "3", "dynamic_partition.prefix" = "p", "dynamic_partition.buckets" = "32", - "dynamic_partition."replica_allocation" = "tag.location.group_a:3" + "dynamic_partition."replication_allocation" = "tag.location.group_a:3" ); ``` ### Keywords diff --git a/docs/en/sql-reference/sql-statements/Data Definition/CREATE TABLE.md b/docs/en/sql-reference/sql-statements/Data Definition/CREATE TABLE.md index 707f19d..92e4829 100644 --- a/docs/en/sql-reference/sql-statements/Data Definition/CREATE TABLE.md +++ b/docs/en/sql-reference/sql-statements/Data Definition/CREATE TABLE.md @@ -264,7 +264,7 @@ Syntax: "storage_medium" = "[SSD|HDD]", ["storage_cooldown_time" = "yyyy-MM-dd HH:mm:ss"], ["replication_num" = "3"], - ["replica_allocation" = "xxx"] + ["replication_allocation" = "xxx"] ) ``` @@ -274,7 +274,7 @@ Syntax: Default is 30 days. Format: "yyyy-MM-dd HH:mm:ss" replication_num: Replication number of a partition. Default is 3. - replica_allocation: Specify the distribution of replicas according to the resource tag. + replication_allocation: Specify the distribution of replicas according to the resource tag. If table is not range partitions. This property takes on Table level. Or it will takes on Partition level. User can specify different properties for different partition by `ADD PARTITION` or `MODIFY PARTITION` statements. @@ -754,7 +754,7 @@ Syntax: ); ``` -16. Specify the replica distribution of the table through replica_allocation +16. Specify the replica distribution of the table through replication_allocation ``` CREATE TABLE example_db.table_hash @@ -764,7 +764,7 @@ Syntax: ) DISTRIBUTED BY HASH(k1) BUCKETS 32 PROPERTIES ( - "replica_allocation"="tag.location.group_a:1, tag.location.group_b:2" + "replication_allocation"="tag.location.group_a:1, tag.location.group_b:2" ); CREATE TABLE example_db.dynamic_partition @@ -783,7 +783,7 @@ Syntax: "dynamic_partition.end" = "3", "dynamic_partition.prefix" = "p", "dynamic_partition.buckets" = "32", - "dynamic_partition."replica_allocation" = "tag.location.group_a:3" + "dynamic_partition."replication_allocation" = "tag.location.group_a:3" ); ``` diff --git a/docs/zh-CN/administrator-guide/multi-tenant.md b/docs/zh-CN/administrator-guide/multi-tenant.md index 37b754b..18f5a29 100644 --- a/docs/zh-CN/administrator-guide/multi-tenant.md +++ b/docs/zh-CN/administrator-guide/multi-tenant.md @@ -72,7 +72,7 @@ FE 不参与用户数据的处理计算等工作,因此是一个资源消耗 (k1 int, k2 int) distributed by hash(k1) buckets 1 properties( - "replica_allocation" + "replication_allocation" = "tag.location.group_a:1, tag.location.group_b:1, tag.location.group_c:1" ) @@ -201,7 +201,7 @@ Tag 划分和 CPU 限制是 0.15 版本中的新功能。为了保证可以从 ``` alter system modify backend "host1:9050, 1212:9050" set ("tag.location" = "group_a"); - alter table my_table modify partition p1 set ("replica_allocation" = "tag.location.group_a:2"); + alter table my_table modify partition p1 set ("replication_allocation" = "tag.location.group_a:2"); ``` 3. 开启数据修复与均衡逻辑 diff --git a/docs/zh-CN/sql-reference-v2/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE.md b/docs/zh-CN/sql-reference-v2/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE.md index 7e393ed..7ef911b 100644 --- a/docs/zh-CN/sql-reference-v2/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE.md +++ b/docs/zh-CN/sql-reference-v2/sql-statements/Data-Definition-Statements/Create/CREATE-TABLE.md @@ -238,11 +238,11 @@ distribution_info 副本数。默认副本数为3。如果 BE 节点数量小于3,则需指定副本数小于等于 BE 节点数量。 - 在 0.15 版本后,该属性将自动转换成 `replica_allocation` 属性,如: + 在 0.15 版本后,该属性将自动转换成 `replication_allocation` 属性,如: - `"replication_num" = "3"` 会自动转换成 `"replica_allocation" = "tag.location.default:3"` + `"replication_num" = "3"` 会自动转换成 `"replication_allocation" = "tag.location.default:3"` - * `replica_allocation` + * `replication_allocation` 根据 Tag 设置副本分布情况。该属性可以完全覆盖 `replication_num` 属性的功能。 @@ -487,7 +487,7 @@ distribution_info PROPERTIES("replication_num" = "3"); ``` -10. 通过 `replica_allocation` 属性设置表的副本。 +10. 通过 `replication_allocation` 属性设置表的副本。 ```sql CREATE TABLE example_db.table_hash @@ -497,7 +497,7 @@ distribution_info ) DISTRIBUTED BY HASH(k1) BUCKETS 32 PROPERTIES ( - "replica_allocation"="tag.location.group_a:1, tag.location.group_b:2" + "replication_allocation"="tag.location.group_a:1, tag.location.group_b:2" ); @@ -517,7 +517,7 @@ distribution_info "dynamic_partition.end" = "3", "dynamic_partition.prefix" = "p", "dynamic_partition.buckets" = "32", - "dynamic_partition."replica_allocation" = "tag.location.group_a:3" + "dynamic_partition."replication_allocation" = "tag.location.group_a:3" ); ``` diff --git a/docs/zh-CN/sql-reference/sql-statements/Data Definition/CREATE TABLE.md b/docs/zh-CN/sql-reference/sql-statements/Data Definition/CREATE TABLE.md index a99fd99..9b0dcb1 100644 --- a/docs/zh-CN/sql-reference/sql-statements/Data Definition/CREATE TABLE.md +++ b/docs/zh-CN/sql-reference/sql-statements/Data Definition/CREATE TABLE.md @@ -284,7 +284,7 @@ under the License. "storage_medium" = "[SSD|HDD]", ["storage_cooldown_time" = "yyyy-MM-dd HH:mm:ss"], ["replication_num" = "3"] - ["replica_allocation" = "xxx"] + ["replication_allocation" = "xxx"] ) ``` @@ -294,7 +294,7 @@ under the License. 默认存放 30 天。 格式为:"yyyy-MM-dd HH:mm:ss" replication_num: 指定分区的副本数。默认为 3。 - replica_allocation: 按照资源标签来指定副本分布。 + replication_allocation: 按照资源标签来指定副本分布。 当表为单分区表时,这些属性为表的属性。 当表为两级分区时,这些属性为附属于每一个分区。 @@ -795,7 +795,7 @@ under the License. ); ``` -16. 通过 replica_allocation 指定表的副本分布 +16. 通过 replication_allocation 指定表的副本分布 ``` CREATE TABLE example_db.table_hash @@ -805,7 +805,7 @@ under the License. ) DISTRIBUTED BY HASH(k1) BUCKETS 32 PROPERTIES ( - "replica_allocation"="tag.location.group_a:1, tag.location.group_b:2" + "replication_allocation"="tag.location.group_a:1, tag.location.group_b:2" ); @@ -825,7 +825,7 @@ under the License. "dynamic_partition.end" = "3", "dynamic_partition.prefix" = "p", "dynamic_partition.buckets" = "32", - "dynamic_partition."replica_allocation" = "tag.location.group_a:3" + "dynamic_partition."replication_allocation" = "tag.location.group_a:3" ); ``` diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyPartitionClause.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyPartitionClause.java index 5dd3c31..504f197 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyPartitionClause.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyPartitionClause.java @@ -93,7 +93,7 @@ public class ModifyPartitionClause extends AlterTableClause { } // Check the following properties' legality before modifying partition. - // 1. replication_num or replica_allocation + // 1. replication_num or replication_allocation // 2. storage_medium && storage_cooldown_time // 3. in_memory // 4. tablet type diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/ModifyBackendTagTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/ModifyBackendTagTest.java index 4c6b63d..9db9b8e 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/catalog/ModifyBackendTagTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/ModifyBackendTagTest.java @@ -150,7 +150,7 @@ public class ModifyBackendTagTest { Assert.assertEquals(ReplicaAllocation.DEFAULT_ALLOCATION, defaultAlloc); TableProperty tableProperty = tbl.getTableProperty(); Map<String, String> tblProperties = tableProperty.getProperties(); - // if replication_num or replica_allocation is not set, it will be set to the default one + // if replication_num or replication_allocation is not set, it will be set to the default one Assert.assertTrue(tblProperties.containsKey("default.replication_allocation")); Assert.assertEquals("tag.location.default: 3", tblProperties.get("default.replication_allocation")); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
