From 2d9f1801acae9265ce762b5044229a438cbae734 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Tue, 21 Jan 2025 22:06:12 +0800 Subject: [PATCH 01/13] [doc](stmt) update `add backends`, `cancel decommission`, `decommission backends`, `drop backends`, `modify backend`, `show backends` and `show frontends` --- .../instance-management/ADD-BACKEND.md | 81 +++++++++-------- .../CANCEL-ALTER-SYSTEM.md | 52 ++++++----- .../DECOMMISSION-BACKEND.md | 62 +++++++------ .../instance-management/DROP-BACKEND.md | 60 ++++++++----- .../instance-management/MODIFY-BACKEND.md | 87 ++++++++----------- .../instance-management/SHOW-BACKENDS.md | 84 ++++++++++++------ .../instance-management/SHOW-FRONTENDS.md | 72 ++++++++++----- 7 files changed, 291 insertions(+), 207 deletions(-) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index 18f97acb989e9..c03431aa28692 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -26,59 +26,68 @@ under the License. ## 描述 -ADD BACKEND 命令用于向 Doris OLAP 数据库集群添加一个或多个后端节点。此命令允许管理员指定新后端节点的主机和端口,以及可选的属性来配置它们的行为。 +ADD BACKEND 命令用于向 Doris 集群中添加一个或多个 BE 节点。此命令允许管理员指定新 BE 节点的主机和端口,以及可选的属性来配置它们的行为。 ## 语法 ```sql - ALTER SYSTEM ADD BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] [PROPERTIES ("key"="value", ...)]; +ALTER SYSTEM ADD BACKEND ":"[,":"...] [PROPERTIES (""="", ...)]; ``` -## 参数 +## 必选参数 -* `host`:可以是后端节点的主机名或 IP 地址 -* `heartbeat_port`:节点的心跳端口 -* `PROPERTIES ("key"="value", ...)`:(可选)一组键值对,用于定义后端节点的附加属性。这些属性可用于自定义正在添加的后端的配置。可用属性包括: +**** - * tag.location:指定后端节点所属的资源组。例如,PROPERTIES ("tag.location" = "groupb")。 - * tag.compute_group_name:指定后端节点所属的计算组。例如,PROPERTIES ("tag.compute_group_name" = "groupb")。 +> 可以是 BE 节点的主机名或 IP 地址 -## 示例 - -1. 不带附加属性添加后端 - - ```sql - ALTER SYSTEM ADD BACKEND "host1:9050,host2:9050"; - ``` - - 此命令向集群添加两个后端节点: - * host1,端口 9050 - * host2,端口 9050 +**** - 未指定附加属性,因此将应用默认设置。 +> BE 节点的心跳端口,默认为 9050 -2. 添加带有资源组的后端 +## 可选参数 - ```sql - ALTER SYSTEM ADD BACKEND "host3:9050" PROPERTIES ("tag.location" = "groupb"); - ``` +**PROPERTIES ("key"="value", ...)** - 此命令将单个后端节点(host3,端口 9050)添加到集群中的资源组 `groupb`。 +> 一组键值对,用于定义 BE 节点的附加属性。这些属性可用于自定义正在添加的后端的配置。可用属性包括: +> - `tag.location`:存算一体模式下用于指定 BE 节点所属的资源组。 +> - `tag.compute_group_name`:存算分离模式下用于指定 BE 节点所属的计算组。 -## 关键词 +## 权限控制 - ALTER, SYSTEM, ADD, BACKEND, PROPERTIES +执行此 SQL 命令的用户必须至少具有以下权限: -## 最佳实践 +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | -1. 在添加新的后端节点之前,确保节点已正确配置并运行。 +## 注意事项 -2. 使用资源组可以帮助您更好地管理和组织集群中的后端节点。 +1. 在添加新的 BE 节点之前,确保节点已正确配置并运行。 +2. 使用[Resource Group](../../../../admin-manual/workload-management/resource-group.md)可以帮助您更好地管理和组织集群中的 BE 节点。 +3. 添加多个 BE 节点时,可以在一个命令中指定它们,以提高效率。 +4. 添加 BE 节点后,使用[`SHOW BACKENDS`](./SHOW-BACKENDS.md)命令验证它们是否已成功添加并处于正常状态。 +5. 考虑在不同的物理位置或机架上添加 BE 节点,以提高集群的可用性和容错能力。 +6. 定期检查和平衡集群中的负载,确保新添加的 BE 节点得到适当利用。 -3. 添加多个后端节点时,可以在一个命令中指定它们,以提高效率。 - -4. 添加后端节点后,使用 `SHOW BACKENDS` 命令验证它们是否已成功添加并处于正常状态。 - -5. 考虑在不同的物理位置或机架上添加后端节点,以提高集群的可用性和容错能力。 +## 示例 -6. 定期检查和平衡集群中的负载,确保新添加的后端节点得到适当利用。 \ No newline at end of file +1. 不带附加属性添加 BE + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.1:9050,192.168.0.2:9050"; + ``` + 此命令向集群添加两个 BE 节点: + * 192.168.0.1,端口 9050 + * 192.168.0.2,端口 9050 + 未指定附加属性,因此将应用默认设置。 + +2. 存算一体模式下,添加指定资源组的 BE + ```sql + ALTER SYSTEM ADD BACKEND "doris-be01:9050" PROPERTIES ("tag.location" = "groupb"); + ``` + 此命令将单个 BE 节点(主机名 doris-be01,端口 9050)添加到集群中的资源组`groupb`。 + +3. 存算分离模式下,添加指定计算组的 BE + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.3:9050" PROPERTIES ("tag.compute_group_name" = "cloud_groupc"); + ``` + 此命令将单个 BE 节点(IP 192.168.0.3,端口 9050)添加到集群中的计算组`cloud_groupc`。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md index e44fe06f58ff5..6fc65d217e925 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md @@ -24,45 +24,49 @@ specific language governing permissions and limitations under the License. --> - - - - ## 描述 -该语句用于撤销一个节点下线操作。(仅管理员使用!) - -语法: +该语句用于撤销一个节点下线操作。 -- 通过 host 和 port 查找 backend +## 语法 ```sql -CANCEL DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +CANCEL DECOMMISSION BACKEND "" [, "" ... ] ``` -- 通过 backend_id 查找 backend +其中: ```sql -CANCEL DECOMMISSION BACKEND "id1","id2","id3..."; +be_identifier + : ":" + | "" ``` -## 示例 +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: - 1. 取消两个节点的下线操作: - - ```sql - CANCEL DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` +## 权限控制 - 2. 取消 backend_id 为 1 的节点的下线操作: +执行此 SQL 命令的用户必须至少具有以下权限: - ```sql - CANCEL DECOMMISSION BACKEND "1","2"; - ``` +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | + +## 注意事项 -## 关键词 +1. 执行此命令后,可以通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查看下线状态(`SystemDecommissioned`列的值为`false`)和下线进度(`TabletNum`列的值不再缓慢下降) +2. 集群会重新慢慢的把其他节点的 tablet 迁移回当前 BE,使得最终每台 BE 的 tablet 数量趋于相近 - CANCEL, DECOMMISSION, CANCEL ALTER +## 示例 -### 最佳实践 +1. 根据 BE 的 Host 和 HeartbeatPort 从集群中安全下线两个节点 + ```sql + CANCEL DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` +2. 根据 BE 的 ID 从集群中安全下线一个节点 + ```sql + CANCEL DECOMMISSION BACKEND "10002"; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md index 6c7da97a2efd1..21d2cfec6348d 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md @@ -24,50 +24,56 @@ specific language governing permissions and limitations under the License. --> - - - - ## 描述 -节点下线操作用于安全下线节点。该操作为异步操作。如果成功,节点最终会从元数据中删除。如果失败,则不会完成下线(仅管理员使用!) - -语法: +该语句用于将 BE 节点安全地从集群中下线。该操作为异步操作。 -- 通过 host 和 port 查找 backend +## 语法 ```sql -ALTER SYSTEM DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +ALTER SYSTEM DECOMMISSION BACKEND "" [, "" ... ] ``` -- 通过 backend_id 查找 backend +其中: ```sql -ALTER SYSTEM DECOMMISSION BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` - 说明: +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 节点下线操作用于安全下线节点。该操作为异步操作。如果成功,节点最终会从元数据中删除。如果失败,则不会完成下线。 -4. 可以手动取消节点下线操作。详见 CANCEL DECOMMISSION +## 权限控制 -## 示例 +执行此 SQL 命令的用户必须至少具有以下权限: -1. 下线两个节点 +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` - - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "id1", "id2"; - ``` +## 注意事项 -## 关键词 +1. 执行此命令后,可以通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查看下线状态(`SystemDecommissioned`列的值为`true`)和下线进度(`TabletNum`列的值会缓慢降到 0) +2. 通常情况下,在`TabletNum`列的值会降到 0 后,此 BE 节点就会被删除,如果您不希望 Doris 自动删除 BE,可以更改 FE Master 的配置`drop_backend_after_decommission`为 false +3. 当前 BE 如果存储的数据量比较大,那么 DECOMMISSION 操作可能持续几个小时甚至是几天 +4. 如果 DECOMMISSION 操作的进度卡住不动,具体表现为[SHOW BACKENDS](./SHOW-BACKENDS.md)语句中的`TabletNum`列一直固定在某个值,那么可能是以下的一些情况: + - 当前 BE 上的 tablet 找不到合适的其他 BE 去迁移,比如在一个 3 节点的集群有一张 3 副本的表,要下线其中一个节点,那么该节点找不到其他 BE 可用来迁移数据(其他两个 BE 已经各有一个副本了) + - 当前 BE 上的 tablet 还在[回收站](../../recycle/SHOW-CATALOG-RECYCLE-BIN.md)中,可以[清空回收站](../../recycle/DROP-CATALOG-RECYCLE-BIN.md)后,再等待 + - 当前 BE 上的 tablet 太大,导致在迁移单个 tablet 时,一直因为超时而无法将这个 tablet 迁移走,可以调整 FE Master 的配置`max_clone_task_timeout_sec`为一个更大的值(默认为 7200 秒) + - 当前 BE 上的 tablet 存在未完成的事务,可以等事务完成或手动中止事务 + - 其他情况可以在 FE Master 的日志过滤`replicas to decommission`关键字,找出异常的 tablet,使用[SHOW TABLET](../../table-and-view/data-and-status-management/SHOW-TABLET.md)语句找到该 tablet 所属的表,然后重新建一张新的表,将数据从旧表迁移至新表,最后使用[DROP TABLE FORCE](../../table-and-view/table/DROP-TABLE.md)的方式将旧表删除掉 - ALTER, SYSTEM, DECOMMISSION, BACKEND, ALTER SYSTEM +## 示例 -### 最佳实践 +1. 根据 BE 的 Host 和 HeartbeatPort 从集群中安全下线两个节点 + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` +2. 根据 BE 的 ID 从集群中安全下线一个节点 + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "10002"; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md index 332deaa6817a1..8e058e39c4295 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md @@ -24,47 +24,59 @@ specific language governing permissions and limitations under the License. --> - - ## 描述 -该语句用于删除 BACKEND 节点(仅管理员使用!) +该语句用于将 BE 节点从 Doris 集群中删除。 -语法: - -- 通过 host 和 port 查找 backend +## 语法 ```sql -ALTER SYSTEM DROP BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] +ALTER SYSTEM DROP BACKEND "" [, "" ... ] ``` -- 通过 backend_id 查找 backend +其中: ```sql -ALTER SYSTEM DROP BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` -说明: +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 增加和删除节点为同步操作。这两种操作不考虑节点上已有的数据,节点直接从元数据中删除,请谨慎使用。 +## 权限控制 -## 示例 +执行此 SQL 命令的用户必须至少具有以下权限: -1. 删除两个节点 +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | +## 注意事项 + +1. 不推荐使用该命令下线 BE,该命令会直接将 BE 直接从集群中删去,当前节点的数据并不会负载均衡到其他 BE 节点,如果集群存在单副本的表,那么就有可能出现数据丢失的情况。更好的做法是使用[DECOMMISSION BACKEND](./DECOMMISSION-BACKEND.md)命令优雅下线 BE。 +2. 由于此操作是高危操作,因此当直接运行此命令时: ```sql - ALTER SYSTEM DROP BACKEND "host1:port", "host2:port"; + ALTER SYSTEM DROP BACKEND "127.0.0.1:9050"; + ``` + ```text + ERROR 1105 (HY000): errCode = 2, detailMessage = It is highly NOT RECOMMENDED to use DROP BACKEND stmt.It is not safe to directly drop a backend. All data on this backend will be discarded permanently. If you insist, use DROPP instead of DROP + ``` + 会出现以上提示信息,如果您明白您当前所做的事情,可将`DROP`关键字替换成`DROPP`,并继续下去: + ```sql + ALTER SYSTEM DROPP BACKEND "127.0.0.1:9050"; ``` - - ```sql - ALTER SYSTEM DROP BACKEND "id1", "id2"; - ``` - -## 关键词 - ALTER, SYSTEM, DROP, BACKEND, ALTER SYSTEM +## 示例 -### 最佳实践 +1. 根据 BE 的 Host 和 HeartbeatPort 从集群中删除两个节点 + ```sql + ALTER SYSTEM DROPP BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` +2. 根据 BE 的 ID 从集群中删除一个节点 + ```sql + ALTER SYSTEM DROPP BACKEND "10002"; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 3ad924121b640..16f77305cae3f 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -3,7 +3,6 @@ "title": "MODIFY BACKEND", "language": "zh-CN" } - --- - - - ## 描述 -修改 BE 节点属性(仅管理员使用!) +该语句用于修改 BE 节点属性,修改 BE 节点属性后,会影响到当前的节点的查询、写入和数据分布。以下是支持修改的属性: -语法: +| 属性 | 影响 | +|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| +| `tag.location` | BE 的标签名,默认值为`default`。修改后,会影响到同一标签组内的 BE 数据均衡,以及在建表时,数据分布的 BE 节点。更多信息可参考[Resource Group](../../../../admin-manual/workload-management/resource-group.md) | +| `disable_query` | 是否禁用查询,默认为`false`。设置为`true`后,将不会再有新的查询请求规划到这台 BE 节点上。 | +| `disable_load` | 是否禁用导入,默认为`false`。设置为`true`后,将不会再有新的导入请求规划到这台 BE 节点上。 | -- 通过 host 和 port 查找 backend +## 语法 ```sql -ALTER SYSTEM MODIFY BACKEND "host:heartbeat_port" SET ("key" = "value"[, ...]); +ALTER SYSTEM MODIFY BACKEND [, [...] ] +SET ( + "" = "" +) ``` -- 通过 backend_id 查找 backend +其中: ```sql -ALTER SYSTEM MODIFY BACKEND "id1" SET ("key" = "value"[, ...]); +be_identifier + : ":" + | "" ``` - 说明: +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: + +## 权限控制 -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 修改 BE 节点属性目前支持以下属性: +执行此 SQL 命令的用户必须至少具有以下权限: -- tag.xxx:资源标签 -- disable_query: 查询禁用属性 -- disable_load: 导入禁用属性 +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | -注: -1. 可以给一个 Backend 设置多种资源标签。但必须包含 "tag.location"。 +## 注意事项 + +由于此操作是针对整个 BE 级别的,影响面较广,如果操作不慎,可能会影响到整个集群的正常查询、导入甚至是建表操作。请谨慎操作。 + +存算分离模式暂不支持此命令。 ## 示例 1. 修改 BE 的资源标签 - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("tag.location" = "group_a"); +``` 2. 修改 BE 的查询禁用属性 - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_query" = "true"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_query" = "true"); - ``` +```sql +ALTER SYSTEM MODIFY BACKEND "10002" SET ("disable_query" = "true"); +``` 3. 修改 BE 的导入禁用属性 - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_load" = "true"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_load" = "true"); - ``` - -## 关键词 - - ALTER, SYSTEM, ADD, BACKEND, ALTER SYSTEM - -### 最佳实践 - +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("disable_load" = "true"); +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md index b07374d97933a..08cab2e686daa 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md @@ -24,40 +24,72 @@ specific language governing permissions and limitations under the License. --> - - - - ## 描述 -该语句用于查看 cluster 内的 BE 节点 +该语句用于查看 BE 节点的基本状态信息。 + +## 语法 ```sql SHOW BACKENDS; ``` -说明: - - 1. LastStartTime 表示最近一次 BE 启动时间。 - 2. LastHeartbeat 表示最近一次心跳。 - 3. Alive 表示节点是否存活。 - 4. SystemDecommissioned 为 true 表示节点正在安全下线中。 - 5. ClusterDecommissioned 为 true 表示节点正在冲当前 cluster 中下线。 - 6. TabletNum 表示该节点上分片数量。 - 7. DataUsedCapacity 表示实际用户数据所占用的空间。 - 8. AvailCapacity 表示磁盘的可使用空间。 - 9. TotalCapacity 表示总磁盘空间。TotalCapacity = AvailCapacity + DataUsedCapacity + 其他非用户数据文件占用空间。 - 10. UsedPct 表示磁盘已使用量百分比。 - 11. ErrMsg 用于显示心跳失败时的错误信息。 - 12. Status 用于以 JSON 格式显示 BE 的一些状态信息,目前包括最后一次 BE 汇报其 tablet 的时间信息。 - 13. HeartbeatFailureCounter:现在当前连续失败的心跳次数,如果次数超过 `max_backend_heartbeat_failure_tolerance_count` 配置,则 isAlive 字段会置为 false。 - 14. NodeRole 用于展示节点角色,现在有两种类型:Mix 代表原来的节点类型,computation 代表只做计算的节点类型。 - -## 示例 +## 返回值 + +| 列名 | 说明 | +|-------------------------|------------------------------------------------------------------------------------------------------------------| +| BackendId | 当前 BE 的 ID | +| Host | 当前 BE 的 IP 地址或域名 | +| HeartbeatPort | 当前 BE 的心跳服务通信端口 | +| BePort | 当前 BE 的 thrift RPC 通信端口 | +| HttpPort | 当前 BE 的 http 通信端口 | +| BrpcPort | 当前 BE 的 bRPC 通信端口 | +| ArrowFlightSqlPort | 当前 BE 的 ArrowFlight 协议通信端口 | +| LastStartTime | 当前 BE 启动的时间戳 | +| LastHeartbeat | 当前 BE 上一次成功发送心跳的时间戳 | +| Alive | 当前 BE 是否存活 | +| SystemDecommissioned | 该值为 true 时,表示当前 BE 节点正在安全下线中 | +| TabletNum | 当前 BE 上存储的数据分片数量 | +| DataUsedCapacity | 当前 BE 数据所占用的磁盘空间 | +| TrashUsedCapacity | 当前 BE 垃圾回收站中数据所占用的磁盘空间 | +| AvailCapacity | 当前 BE 可用的磁盘空间 | +| TotalCapacity | 当前 BE 总的磁盘空间,TotalCapacity = AvailCapacity + TrashUsedCapacity + DataUsedCapacity + 其他非用户数据文件占用空间 | +| UsedPct | 当前 BE 所有磁盘总的已使用量百分比 | +| MaxDiskUsedPct | 当前 BE 所有磁盘的已使用量百分比中最大的一个 | +| RemoteUsedCapacity | 当前 BE 在使用了冷热分层功能后,上传到远端存储的数据占用空间 | +| Tag | 当前 BE 的标签信息, | +| ErrMsg | 当前 BE 心跳失败时的错误信息 | +| Version | 当前 BE 的版本信息 | +| Status | 当前 BE 的一些状态信息,以 JSON 格式展示,包括:上一次成功上报 tablet 的时间、上一次 StreamLoad 的时间、是否允许查询、是否允许导入等,需要注意的是,不同版本保存的信息会有些许差异 | +| HeartbeatFailureCounter | 当前 BE 连续失败的心跳次数,如果次数超过 FE Master 配置`max_backend_heartbeat_failure_tolerance_count`(默认值为 1),则 isAlive 字段会置为 false | +| NodeRole | 当前 BE 的角色,有两种:`mix`是默认的角色,`computation`表示当前节点只用于联邦分析查询 | + +## 权限控制 + +执行此 SQL 命令的用户必须至少具有以下权限: + +| 权限 | 对象 | 说明 | +|------------|----|----| +| ADMIN_PRIV | | | + +## 注意事项 + +如果需要对查询结果进行进一步的过滤,可以使用表值函数[backends()](../../../sql-functions/table-valued-functions/backends.md)。`SHOW BACKENDS` 与下面语句等价: -## 关键词 +```sql +SELECT * FROM BACKENDS(); +``` - SHOW, BACKENDS +## 示例 -### 最佳实践 +```sql +SHOW BACKENDS; +``` +```text ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| 10002 | 127.0.0.1 | 9050 | 9060 | 8040 | 8060 | 10040 | 2025-01-20 02:11:39 | 2025-01-21 11:52:40 | true | false | 281 | 9.690 MB | 0.000 | 10.505 GB | 71.750 GB | 85.36 % | 85.36 % | 0.000 | {"location" : "default"} | | doris-2.1.7-rc03-443e87e203 | {"lastSuccessReportTabletsTime":"2025-01-21 11:51:59","lastStreamLoadTime":1737460114345,"isQueryDisabled":false,"isLoadDisabled":false} | 0 | mix | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md index 2d5b9c46ca593..b53ffd1b0456e 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md @@ -24,34 +24,66 @@ specific language governing permissions and limitations under the License. --> - - - ## 描述 - 该语句用于查看 FE 节点 +该语句用于查看 FE 节点的基本状态信息。 - 语法: +## 语法 ```sql -SHOW FRONTENDS; +SHOW FRONTENDS ``` -说明: -1. name 表示该 FE 节点在 bdbje 中的名称。 -2. Join 为 true 表示该节点曾经加入过集群。但不代表当前还在集群内(可能已失联) -3. Alive 表示节点是否存活。 -4. ReplayedJournalId 表示该节点当前已经回放的最大元数据日志 id。 -5. LastHeartbeat 是最近一次心跳。 -6. IsHelper 表示该节点是否是 bdbje 中的 helper 节点。 -7. ErrMsg 用于显示心跳失败时的错误信息。 -8. CurrentConnected 表示是否是当前连接的 FE 节点 +## 返回值 + +| 列名 | 说明 | +|--------------------|------------------------------------------| +| Name | 当前 FE 在此 Doris 中的名称,该名称通常是一个以`fe`为前缀的随机字符串 | +| Host | 当前 FE 的 IP 地址或域名 | +| EditLogPort | 当前 FE 的 bdbje 通信端口 | +| HttpPort | 当前 FE 的 http 通信端口 | +| QueryPort | 当前 FE 的 MySQL 协议通信端口 | +| RpcPort | 当前 FE 的 thrift RPC 通信端口 | +| ArrowFlightSqlPort | 当前 FE 的 ArrowFlight 协议通信端口 | +| Role | 当前 FE 的角色,可能的值有 FOLLOWER 和 OBSERVER | +| IsMaster | 当前 FE 是否被选举为 Master | +| ClusterId | 当前 Doris 集群的 ID,通常为一个随机生成的数字 | +| Join | 用于表示当前 FE 节点是否成功加入当前 Doris 集群 | +| Alive | 当前 FE 是否存活 | +| ReplayedJournalId | 当前 FE 已经回放的最大元数据日志 ID | +| LastStartTime | 当前 FE 启动的时间戳 | +| LastHeartbeat | 当前 FE 上一次成功发送心跳的时间戳 | +| IsHelper | 当前 FE 是否为 bdbje 中的 helper 节点 | +| ErrMsg | 当前 FE 心跳失败时的错误信息 | +| Version | 当前 FE 的版本信息 | +| CurrentConnected | 当前客户端链接是否连接了当前 FE 节点 | + +## 权限控制 + +执行此 SQL 命令的用户必须至少具有以下权限: + +| 权限 | 对象 | 说明 | +|------------|----|----| +| ADMIN_PRIV | | | + +## 注意事项 + +如果需要对查询结果进行进一步的过滤,可以使用表值函数[frontends()](../../../sql-functions/table-valued-functions/frontends.md)。`SHOW FRONTENDS` 与下面语句等价: -## 示例 - -## 关键词 +```sql +SELECT * FROM FRONTENDS(); +``` - SHOW, FRONTENDS +## 示例 -### 最佳实践 +```sql +SHOW FRONTENDS +``` +```text ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| Name | Host | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role | IsMaster | ClusterId | Join | Alive | ReplayedJournalId | LastStartTime | LastHeartbeat | IsHelper | ErrMsg | Version | CurrentConnected | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| fe_65a0c6f0_b31f_42ac_bd20_26d851299f1a | 127.0.0.1 | 9010 | 8030 | 9030 | 9020 | 10030 | FOLLOWER | true | 840241689 | true | true | 302891 | 2025-01-20 02:11:39 | 2025-01-21 09:48:36 | true | | doris-2.1.7-rc03-443e87e203 | Yes | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +``` From 052769b094209517e6287dc51f383d330680b216 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Tue, 21 Jan 2025 22:25:51 +0800 Subject: [PATCH 02/13] update --- .../instance-management/ADD-BACKEND.md | 2 +- .../instance-management/CANCEL-ALTER-SYSTEM.md | 14 ++++++++++++++ .../instance-management/DECOMMISSION-BACKEND.md | 14 ++++++++++++++ .../instance-management/DROP-BACKEND.md | 14 ++++++++++++++ .../instance-management/MODIFY-BACKEND.md | 14 ++++++++++++++ .../instance-management/SHOW-BACKENDS.md | 2 +- 6 files changed, 58 insertions(+), 2 deletions(-) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index c03431aa28692..d2e5076f6529e 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -31,7 +31,7 @@ ADD BACKEND 命令用于向 Doris 集群中添加一个或多个 BE 节点。此 ## 语法 ```sql -ALTER SYSTEM ADD BACKEND ":"[,":"...] [PROPERTIES (""="", ...)]; +ALTER SYSTEM ADD BACKEND ":"[,":"...] [PROPERTIES (""="", ...)] ``` ## 必选参数 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md index 6fc65d217e925..524f2b236eda8 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md @@ -42,6 +42,20 @@ be_identifier | "" ``` +## 必选参数 + +**** + +> 可以是 BE 节点的主机名或 IP 地址 + +**** + +> BE 节点的心跳端口,默认为 9050 + +**** + +> BE 节点的 ID + :::tip ``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 ::: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md index 21d2cfec6348d..b77d7d8dec2dd 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md @@ -42,6 +42,20 @@ be_identifier | "" ``` +## 必选参数 + +**** + +> 可以是 BE 节点的主机名或 IP 地址 + +**** + +> BE 节点的心跳端口,默认为 9050 + +**** + +> BE 节点的 ID + :::tip ``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 ::: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md index 8e058e39c4295..e527c6494a44f 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md @@ -42,6 +42,20 @@ be_identifier | "" ``` +## 必选参数 + +**** + +> 可以是 BE 节点的主机名或 IP 地址 + +**** + +> BE 节点的心跳端口,默认为 9050 + +**** + +> BE 节点的 ID + :::tip ``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 ::: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 16f77305cae3f..cec8ac9eed67f 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -51,6 +51,20 @@ be_identifier | "" ``` +## 必选参数 + +**** + +> 可以是 BE 节点的主机名或 IP 地址 + +**** + +> BE 节点的心跳端口,默认为 9050 + +**** + +> BE 节点的 ID + :::tip ``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 ::: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md index 08cab2e686daa..e934626986304 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md @@ -31,7 +31,7 @@ under the License. ## 语法 ```sql - SHOW BACKENDS; + SHOW BACKENDS ``` ## 返回值 From ecdf8007c6eea9b3c3a64d03b137645acdaffaf2 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Tue, 21 Jan 2025 23:25:49 +0800 Subject: [PATCH 03/13] update --- .../cluster-management/instance-management/SHOW-BACKENDS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md index e934626986304..eef481977c16b 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md @@ -57,7 +57,7 @@ under the License. | UsedPct | 当前 BE 所有磁盘总的已使用量百分比 | | MaxDiskUsedPct | 当前 BE 所有磁盘的已使用量百分比中最大的一个 | | RemoteUsedCapacity | 当前 BE 在使用了冷热分层功能后,上传到远端存储的数据占用空间 | -| Tag | 当前 BE 的标签信息, | +| Tag | 当前 BE 的标签信息,以 JSON 格式展示,不同部署模式下的保存的标签信息不同,存算一体模式下保存当前 BE 资源组名称,存算分离模式下保存一些额外的信息 | | ErrMsg | 当前 BE 心跳失败时的错误信息 | | Version | 当前 BE 的版本信息 | | Status | 当前 BE 的一些状态信息,以 JSON 格式展示,包括:上一次成功上报 tablet 的时间、上一次 StreamLoad 的时间、是否允许查询、是否允许导入等,需要注意的是,不同版本保存的信息会有些许差异 | From dbbeeeaa8224311201dbcfbaf60a0a0a51f9cccf Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 14:59:24 +0800 Subject: [PATCH 04/13] update --- .../instance-management/ADD-BACKEND.md | 2 +- ...STEM.md => CANCEL-DECOMMISSION-BACKEND.md} | 10 ++--- .../instance-management/SHOW-BACKENDS.md | 4 +- .../instance-management/SHOW-FRONTENDS.md | 40 +++++++++---------- 4 files changed, 28 insertions(+), 28 deletions(-) rename i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/{CANCEL-ALTER-SYSTEM.md => CANCEL-DECOMMISSION-BACKEND.md} (93%) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index d2e5076f6529e..04ec49ddd2ba6 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -48,7 +48,7 @@ ALTER SYSTEM ADD BACKEND ":"[,":"... **PROPERTIES ("key"="value", ...)** -> 一组键值对,用于定义 BE 节点的附加属性。这些属性可用于自定义正在添加的后端的配置。可用属性包括: +> 一组键值对,用于定义 BE 节点的附加属性。这些属性可用于自定义正在添加的 BE 的配置。可用属性包括: > - `tag.location`:存算一体模式下用于指定 BE 节点所属的资源组。 > - `tag.compute_group_name`:存算分离模式下用于指定 BE 节点所属的计算组。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md similarity index 93% rename from i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md rename to i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md index 524f2b236eda8..79a88041c034a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md @@ -1,6 +1,6 @@ --- { - "title": "CANCEL ALTER SYSTEM", + "title": "CANCEL DECOMMISSION BACKEND", "language": "zh-CN" } --- @@ -26,7 +26,7 @@ under the License. ## 描述 -该语句用于撤销一个节点下线操作。 +该语句用于撤销一个 BE 节点下线操作。 ## 语法 @@ -81,6 +81,6 @@ be_identifier ``` 2. 根据 BE 的 ID 从集群中安全下线一个节点 - ```sql - CANCEL DECOMMISSION BACKEND "10002"; - ``` + ```sql + CANCEL DECOMMISSION BACKEND "10002"; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md index eef481977c16b..7f98fd848f1e6 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md @@ -39,7 +39,7 @@ under the License. | 列名 | 说明 | |-------------------------|------------------------------------------------------------------------------------------------------------------| | BackendId | 当前 BE 的 ID | -| Host | 当前 BE 的 IP 地址或域名 | +| Host | 当前 BE 的 IP 地址或主机名 | | HeartbeatPort | 当前 BE 的心跳服务通信端口 | | BePort | 当前 BE 的 thrift RPC 通信端口 | | HttpPort | 当前 BE 的 http 通信端口 | @@ -61,7 +61,7 @@ under the License. | ErrMsg | 当前 BE 心跳失败时的错误信息 | | Version | 当前 BE 的版本信息 | | Status | 当前 BE 的一些状态信息,以 JSON 格式展示,包括:上一次成功上报 tablet 的时间、上一次 StreamLoad 的时间、是否允许查询、是否允许导入等,需要注意的是,不同版本保存的信息会有些许差异 | -| HeartbeatFailureCounter | 当前 BE 连续失败的心跳次数,如果次数超过 FE Master 配置`max_backend_heartbeat_failure_tolerance_count`(默认值为 1),则 isAlive 字段会置为 false | +| HeartbeatFailureCounter | 当前 BE 连续失败的心跳次数,如果次数超过 FE Master 配置`max_backend_heartbeat_failure_tolerance_count`(默认值为 1),则 `Alive` 字段会置为 false | | NodeRole | 当前 BE 的角色,有两种:`mix`是默认的角色,`computation`表示当前节点只用于联邦分析查询 | ## 权限控制 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md index b53ffd1b0456e..a6d70c788b11a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md @@ -36,27 +36,27 @@ SHOW FRONTENDS ## 返回值 -| 列名 | 说明 | -|--------------------|------------------------------------------| +| 列名 | 说明 | +|--------------------|--------------------------------------------| | Name | 当前 FE 在此 Doris 中的名称,该名称通常是一个以`fe`为前缀的随机字符串 | -| Host | 当前 FE 的 IP 地址或域名 | -| EditLogPort | 当前 FE 的 bdbje 通信端口 | -| HttpPort | 当前 FE 的 http 通信端口 | -| QueryPort | 当前 FE 的 MySQL 协议通信端口 | -| RpcPort | 当前 FE 的 thrift RPC 通信端口 | -| ArrowFlightSqlPort | 当前 FE 的 ArrowFlight 协议通信端口 | -| Role | 当前 FE 的角色,可能的值有 FOLLOWER 和 OBSERVER | -| IsMaster | 当前 FE 是否被选举为 Master | -| ClusterId | 当前 Doris 集群的 ID,通常为一个随机生成的数字 | -| Join | 用于表示当前 FE 节点是否成功加入当前 Doris 集群 | -| Alive | 当前 FE 是否存活 | -| ReplayedJournalId | 当前 FE 已经回放的最大元数据日志 ID | -| LastStartTime | 当前 FE 启动的时间戳 | -| LastHeartbeat | 当前 FE 上一次成功发送心跳的时间戳 | -| IsHelper | 当前 FE 是否为 bdbje 中的 helper 节点 | -| ErrMsg | 当前 FE 心跳失败时的错误信息 | -| Version | 当前 FE 的版本信息 | -| CurrentConnected | 当前客户端链接是否连接了当前 FE 节点 | +| Host | 当前 FE 的 IP 地址或主机名 | +| EditLogPort | 当前 FE 的 bdbje 通信端口 | +| HttpPort | 当前 FE 的 http 通信端口 | +| QueryPort | 当前 FE 的 MySQL 协议通信端口 | +| RpcPort | 当前 FE 的 thrift RPC 通信端口 | +| ArrowFlightSqlPort | 当前 FE 的 ArrowFlight 协议通信端口 | +| Role | 当前 FE 的角色,可能的值有 FOLLOWER 和 OBSERVER | +| IsMaster | 当前 FE 是否被选举为 Master | +| ClusterId | 当前 Doris 集群的 ID,通常为一个随机生成的数字 | +| Join | 用于表示当前 FE 节点是否成功加入当前 Doris 集群 | +| Alive | 当前 FE 是否存活 | +| ReplayedJournalId | 当前 FE 已经回放的最大元数据日志 ID | +| LastStartTime | 当前 FE 启动的时间戳 | +| LastHeartbeat | 当前 FE 上一次成功发送心跳的时间戳 | +| IsHelper | 当前 FE 是否为 bdbje 中的 helper 节点 | +| ErrMsg | 当前 FE 心跳失败时的错误信息 | +| Version | 当前 FE 的版本信息 | +| CurrentConnected | 当前客户端链接是否连接了当前 FE 节点 | ## 权限控制 From 4c69e700c6870e1284da2e0f0009d436c8cc47c1 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 14:59:46 +0800 Subject: [PATCH 05/13] dev english --- .../instance-management/ADD-BACKEND.md | 71 +++++++----- .../CANCEL-DECOMMISSION-BACKEND.md | 66 +++++++----- .../DECOMMISSION-BACKEND.md | 74 ++++++++----- .../instance-management/DROP-BACKEND.md | 76 ++++++++----- .../instance-management/MODIFY-BACKEND.md | 102 +++++++++--------- .../instance-management/SHOW-BACKENDS.md | 86 ++++++++++----- .../instance-management/SHOW-FRONTENDS.md | 74 +++++++++---- 7 files changed, 349 insertions(+), 200 deletions(-) diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index 2e1817099b790..02ce3feb16600 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -26,47 +26,68 @@ under the License. ## Description -The ADD BACKEND command is used to add one or more backend nodes to a Doris OLAP database cluster. This command allows administrators to specify the host and port of the new backend nodes, along with optional properties that configure their behavior. +The ADD BACKEND is used to add one or more BE nodes to the Doris cluster. This command allows administrators to specify the host and port of the new BE nodes, as well as optional properties to configure their behavior. -grammar: +## Syntax ```sql --- Add nodes (add this method if you do not use the multi-tenancy function) - ALTER SYSTEM ADD BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] [PROPERTIES ("key"="value", ...)]; +ALTER SYSTEM ADD BACKEND ":"[,":"...] [PROPERTIES (""="", ...)] ``` -### Parameters +## Required Parameters -* `host` can be a hostname or an ip address of the backend node while `heartbeat_port` is the heartbeat port of the node -* `PROPERTIES ("key"="value", ...)`: (Optional) A set of key-value pairs that define additional properties for the backend nodes. These properties can be used to customize the configuration of the backends being added. Available properties include: +**** - * tag.location: Specifies the resource group where the backend node belongs. For example, PROPERTIES ("tag.location" = "groupb"). +> It can be the hostname or IP address of the BE node. -## Example +**** - 1. Adding Backends Without Additional Properties +> The heartbeat port of the BE node, the default is 9050. - ```sql - ALTER SYSTEM ADD BACKEND "host1:9020,host2:9020"; - ```` +## Optional Parameters - This command adds two backend nodes to the cluster: +**PROPERTIES ("key"="value", ...)** - * host1 with port 9020 - * host2 with port 9020 +> A set of key-value pairs used to define additional properties of the BE node. These properties can be used to customize the configuration of the BE being added. Available properties include: +> - `tag.location`: Used to specify the Resource Group to which the BE node belongs in the integrated storage and computing mode. +> - `tag.compute_group_name`: Used to specify the compute group to which the BE node belongs in the decoupling storage and computing mode. - No additional properties are specified, so the default settings will apply to these backends. +## Access Control Requirements -2. Adding Backends With Resource Group +The user executing this SQL must have at least the following permissions: - ```sql - ALTER SYSTEM ADD BACKEND "host3:9020" PROPERTIES ("tag.location" = "groupb"); - ``` +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes - This command adds a single backend node (host3 with port 9020) to the cluster in resource group `groupb`: +1. Before adding a new BE node, make sure the node is correctly configured and running. +2. Using [Resource Group](../../../../admin-manual/workload-management/resource-group.md) can help you better manage and organize the BE nodes in the cluster. +3. When adding multiple BE nodes, you can specify them in one command to improve efficiency. +3. After adding the BE nodes, use the [`SHOW BACKENDS`](./SHOW-BACKENDS.md) to verify whether they have been successfully added and are in a normal state. +4. Consider adding BE nodes in different physical locations or racks to improve the availability and fault tolerance of the cluster. +5. Regularly check and balance the load in the cluster to ensure that the newly added BE nodes are properly utilized. -## Keywords +## Examples + +1. Add BE nodes without additional properties + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.1:9050,192.168.0.2:9050"; + ``` + This command adds two BE nodes to the cluster: + * 192.168.0.1,port 9050 + * 192.168.0.2,port 9050 + No additional properties are specified, so the default settings will be applied. -ALTER, SYSTEM, ADD, BACKEND, PROPERTIES +2. In the integrated storage and computing mode, add a BE node to a specified Resource Group + ```sql + ALTER SYSTEM ADD BACKEND "doris-be01:9050" PROPERTIES ("tag.location" = "groupb"); + ``` + This command adds a single BE node (hostname doris-be01, port 9050) to the Resource Group `groupb` in the cluster. -## Best Practice \ No newline at end of file +3. In the decoupling storage and computing mode, add a BE node to a specified compute group + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.3:9050" PROPERTIES ("tag.compute_group_name" = "cloud_groupc"); + ``` + This command adds a single BE node (IP 192.168.0.3, port 9050) to the compute group `cloud_groupc` in the cluster. diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md index 1119d733e69ce..7f61946aa88fe 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md @@ -24,45 +24,63 @@ specific language governing permissions and limitations under the License. --> - - - - ## Description -This statement is used to undo a node offline operation. (Administrator only!) +This statement is used to cancel the decommissioning operation of a BE node. -grammar: - -- Find backend through host and port +## Syntax ```sql -CANCEL DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +CANCEL DECOMMISSION BACKEND "" [, "" ... ] ``` -- Find backend through backend_id +Where: ```sql -CANCEL DECOMMISSION BACKEND "id1","id2","id3..."; +be_identifier + : ":" + | "" ``` -## Example +## Required Parameters + +**** + +> It can be the hostname or IP address of the BE node. + +**** + +> The heartbeat port of the BE node, the default is 9050. + +**** + +> The ID of the BE node. + +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: + +## Access Control Requirements - 1. Cancel the offline operation of both nodes: +The user who executes this SQL must have at least the following permissions: - ```sql - CANCEL DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | - 2. Cancel the offline operation of the node with backend_id 1: - - ```sql - CANCEL DECOMMISSION BACKEND "1","2"; - ``` +## Usage Notes -## Keywords +1. After executing this command, you can view the decommissioning status (the value of the `SystemDecommissioned` column is false) and the decommissioning progress (the value of the `TabletNum` column no longer decreases slowly) through the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +2. The cluster will slowly migrate the tablets from other nodes back to the current BE, so that the number of tablets on each BE will eventually tend to approach. - CANCEL, DECOMMISSION, CANCEL ALTER +## Examples -## Best Practice +1. Safely decommission two nodes from the cluster according to the Host and HeartbeatPort of the BE. + ```sql + CANCEL DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` +2. Safely decommission one node from the cluster according to the ID of the BE. + ```sql + CANCEL DECOMMISSION BACKEND "10002"; + ``` diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md index e10faca2552fb..a8e6dfd220fef 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md @@ -24,50 +24,70 @@ specific language governing permissions and limitations under the License. --> - - - - ## Description -The node offline operation is used to safely log off the node. The operation is asynchronous. If successful, the node is eventually removed from the metadata. If it fails, the logout will not be done (only for admins!) - -grammar: +This statement is used to safely decommission a BE node from the cluster. This operation is asynchronous. -- Find backend through host and port +## Syntax ```sql -ALTER SYSTEM DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +ALTER SYSTEM DECOMMISSION BACKEND "" [, "" ... ] ``` -- Find backend through backend_id +Where: ```sql -ALTER SYSTEM DECOMMISSION BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` - illustrate: +## Required Parameters -1. host can be a hostname or an ip address -2. heartbeat_port is the heartbeat port of the node -3. The node offline operation is used to safely log off the node. The operation is asynchronous. If successful, the node is eventually removed from the metadata. If it fails, the logout will not be completed. -4. You can manually cancel the node offline operation. See CANCEL DECOMMISSION +**** -## Example +> It can be the hostname or IP address of the BE node. -1. Offline two nodes +**** - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` +> The heartbeat port of the BE node, the default is 9050. - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "id1", "id2"; - ``` +**** -## Keywords +> The ID of the BE node. - ALTER, SYSTEM, DECOMMISSION, BACKEND, ALTER SYSTEM +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: -## Best Practice +## Access Control Requirements +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +1. After executing this command, you can use the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement to view the decommissioning status (the value of the `SystemDecommissioned` column is `true`) and the decommissioning progress (the value of the `TabletNum` column will slowly drop to 0). +2. Under normal circumstances, after the value of the `TabletNum` column drops to 0, this BE node will be deleted. If you do not want Doris to automatically delete the BE, you can change the configuration `drop_backend_after_decommission` of the FE Master to false. +3. If the current BE stores a relatively large amount of data, the DECOMMISSION operation may last for several hours or even days. +4. If the progress of the DECOMMISSION operation gets stuck, specifically, the `TabletNum` column in the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement remains fixed at a certain value, it may be due to the following situations: + - There is no suitable other BE to migrate the tablets on the current BE. For example, in a 3-node cluster with a table having 3 replicas, if one of the nodes is to be decommissioned, this node cannot find other BEs to migrate the data (the other two BEs already have one replica each). + - The tablets on the current BE are still in the [Recycle Bin](../../recycle/SHOW-CATALOG-RECYCLE-BIN.md). You can [empty the recycle bin](../../recycle/DROP-CATALOG-RECYCLE-BIN.md) and then wait for decommission. + - The tablet on the current BE is too large, causing the migration of a single tablet to always timeout and unable to migrate this tablet away. You can adjust the configuration `max_clone_task_timeout_sec` of the FE Master to a larger value (the default is 7200 seconds). + - There are unfinished transactions on the tablets of the current BE. You can wait for the transactions to complete or manually abort the transactions. + - In other cases, you can filter the keyword `replicas to decommission` in the logs of the FE Master to find the abnormal tablet, use the [SHOW TABLET](../../table-and-view/data-and-status-management/SHOW-TABLET.md) statement to find the table to which this tablet belongs, then create a new table, migrate the data from the old table to the new table, and finally use the [DROP TABLE FORCE](../../table-and-view/table/DROP-TABLE.md) to delete the old table. + +## Examples + +1. Safely decommission two nodes from the cluster according to the Host and HeartbeatPort of the BE. + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` + +2. Safely decommission a node from the cluster according to the ID of the BE. + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "10002"; + ``` diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md index f85add2c4b273..eb3429f175900 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md @@ -24,47 +24,73 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -This statement is used to delete the BACKEND node (administrator only!) +This statement is used to remove BE nodes from the Doris cluster. -grammar: - -- Find backend through host and port +## Syntax ```sql -ALTER SYSTEM DROP BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] +ALTER SYSTEM DROP BACKEND "" [, "" ... ] ``` -- Find backend through backend_id + +Where: ```sql -ALTER SYSTEM DROP BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` -illustrate: +## Required Parameters -1. host can be a hostname or an ip address -2. heartbeat_port is the heartbeat port of the node -3. Adding and deleting nodes is a synchronous operation. These two operations do not consider the existing data on the node, and the node is directly deleted from the metadata, please use it with caution. +**** -## Example +> It can be the hostname or IP address of the BE node. -1. Delete two nodes +**** - ```sql - ALTER SYSTEM DROP BACKEND "host1:port", "host2:port"; - ``` +> The heartbeat port of the BE node, the default is 9050. - ```sql - ALTER SYSTEM DROP BACKEND "ids1", "ids2"; - ``` +**** -## Keywords +> The ID of the BE node. - ALTER, SYSTEM, DROP, BACKEND, ALTER SYSTEM +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: -## Best Practice +## Access Control Requirements +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +1. It is not recommended to use this command to take a BE node offline. This command will directly remove the BE node from the cluster. The data on the current node will not be load-balanced to other BE nodes. Data loss may occur if there are single-replica tables in the cluster. A better approach is to use the [DECOMMISSION BACKEND](./DECOMMISSION-BACKEND.md) command to gracefully take the BE node offline. +2. Since this operation is a high-risk operation, when you directly run this command: + ```sql + ALTER SYSTEM DROP BACKEND "127.0.0.1:9050"; + ``` + ```text + ERROR 1105 (HY000): errCode = 2, detailMessage = It is highly NOT RECOMMENDED to use DROP BACKEND stmt.It is not safe to directly drop a backend. All data on this backend will be discarded permanently. If you insist, use DROPP instead of DROP + ``` + The above prompt message will appear. If you understand what you are doing, you can replace the `DROP` keyword with `DROPP` and continue: + ```sql + ALTER SYSTEM DROPP BACKEND "127.0.0.1:9050"; + ``` + +## Examples + +1. Remove two nodes from the cluster based on the Host and HeartbeatPort of the BE nodes: + ```sql + ALTER SYSTEM DROPP BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` + +2. Remove one node from the cluster based on the ID of the BE node: + ```sql + ALTER SYSTEM DROPP BACKEND "10002"; + ``` diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 5eefadabaaa97..86ae33cf17b70 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -3,7 +3,6 @@ "title": "MODIFY BACKEND", "language": "en" } - --- - - - - ## Description -Modify BE node properties (administrator only!) +This statement is used to modify the attributes of BE nodes. After modifying the attributes of BE nodes, it will affect the query, write, and data distribution of the current node. The following are the attributes that can be modified: -grammar: +| 属性 | 影响 | +|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `tag.location` | The resource tag of the BE, with the `default` value being default. After modification, it will affect the data balancing of BEs within the same tag group and the BE nodes for data distribution during table creation. For more information, please refer to[Resource Group](../../../../admin-manual/workload-management/resource-group.md) | +| `disable_query` | Whether to disable queries, with the default value being `false`. After setting it to `true`, no new query requests will be scheduled to this BE node. | +| `disable_load` | Whether to disable load, with the default value being `false`. After setting it to `true`, no new import requests will be scheduled to this BE node. | -- Find backend through host and port +## Syntax ```sql -ALTER SYSTEM MODIFY BACKEND "host:heartbeat_port" SET ("key" = "value"[, ...]); +ALTER SYSTEM MODIFY BACKEND [, [...] ] +SET ( + "" = "" +) ``` -- Find backend through backend_id +Where: ```sql -ALTER SYSTEM MODIFY BACKEND "id1" SET ("key" = "value"[, ...]); +be_identifier + : ":" + | "" ``` - illustrate: +## Required Parameters -1. host can be a hostname or an ip address -2. heartbeat_port is the heartbeat port of the node -3. Modify BE node properties The following properties are currently supported: +**** -- tag.xxxx: resource tag -- disable_query: query disable attribute -- disable_load: import disable attribute +> It can be the hostname or IP address of the BE node. -Note: -1. A backend can be set multi resource tags. But must contain "tag.location" type. +**** -## Example +> The heartbeat port of the BE node, the default is 9050. -1. Modify the resource tag of BE +**** - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` +> The ID of the BE node. -2. Modify the query disable property of BE +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_query" = "true"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_query" = "true"); - ``` +## Access Control Requirements -3. Modify the import disable property of BE +The user who executes this SQL must have at least the following permissions: - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_load" = "true"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_load" = "true"); - ``` +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +Since this operation is at the entire BE level and has a wide impact, it may affect the normal querying, loading, and even table creation operations of the entire cluster if not performed carefully. Please operate with caution. -## Keywords +This command is not supported in the decoupling storage and computing mode. - ALTER, SYSTEM, ADD, BACKEND, ALTER SYSTEM +## Examples -## Best Practice +1. Modify the resource tag of the BE +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("tag.location" = "group_a"); +``` + +2. Modify the `disable_query` attribute of the BE + +```sql +ALTER SYSTEM MODIFY BACKEND "10002" SET ("disable_query" = "true"); +``` + +3. Modify the `disable_load` attribute of the BE + +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("disable_load" = "true"); +``` diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md index 82c07c46008c1..77023ed0a6c1c 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md @@ -24,39 +24,71 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -This statement is used to view the BE nodes in the cluster +This statement is used to view the basic status information of BE nodes. + +## Syntax ```sql - SHOW BACKENDS; + SHOW BACKENDS ``` -illustrate: - -1. LastStartTime indicates the last BE start time. -2. LastHeartbeat indicates the last heartbeat. -3. Alive indicates whether the node is alive or not. -4. If SystemDecommissioned is true, it means that the node is being safely decommissioned. -5. If ClusterDecommissioned is true, it means that the node is going offline in the current cluster. -6. TabletNum represents the number of shards on the node. -7. DataUsedCapacity Indicates the space occupied by the actual user data. -8. AvailCapacity Indicates the available space on the disk. -9. TotalCapacity represents the total disk space. TotalCapacity = AvailCapacity + DataUsedCapacity + other non-user data files occupy space. -10. UsedPct Indicates the percentage of disk used. -11. ErrMsg is used to display the error message when the heartbeat fails. -12. Status is used to display some status information of BE in JSON format, including the time information of the last time BE reported its tablet. -13. HeartbeatFailureCounter: The current number of heartbeats that have failed consecutively. If the number exceeds the `max_backend_heartbeat_failure_tolerance_count` configuration, the isAlive will be set to false. -14. NodeRole is used to display the role of Backend node. Now there are two roles: mix and computation. Mix node represent the origin Backend node and computation Node represent the compute only node. - - - -## Keywords - -SHOW, BACKENDS +## Return Value + +| Column | Note | +|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| BackendId | The ID of the current BE. | +| Host | The IP address or host name of the current BE. | +| HeartbeatPort | The communication port of the heartbeat service of the current BE. | +| BePort | The thrift RPC communication port of the current BE. | +| HttpPort | The HTTP communication port of the current BE. | +| BrpcPort | The bRPC communication port of the current BE. | +| ArrowFlightSqlPort | The communication port of the ArrowFlight protocol of the current BE. | +| LastStartTime | The timestamp when the current BE started. | +| LastHeartbeat | The timestamp of the last successful heartbeat sent by the current BE. | +| Alive | Whether the current BE is alive. | +| SystemDecommissioned | When this value is true, it means that the current BE node is in the process of safe decommissioning. | +| TabletNum | The number of tablets stored on the current BE. | +| DataUsedCapacity | The disk space occupied by the data of the current BE. | +| TrashUsedCapacity | The disk space occupied by the data in the trash of the current BE. | +| AvailCapacity | The available disk space of the current BE. | +| TotalCapacity | The total disk space of the current BE. TotalCapacity = AvailCapacity + TrashUsedCapacity + DataUsedCapacity + Disk space occupied by other non-user data files. | +| UsedPct | The percentage of the total used disk space of the current BE. | +| MaxDiskUsedPct | The maximum percentage of the used disk space among all disks of the current BE. | +| RemoteUsedCapacity | The disk space occupied by the data uploaded to the remote storage after the hot and cold tiering function is used by the current BE. | +| Tag | The tag information of the current BE, displayed in JSON format. The saved tag information is different in different deployment modes. In the integrated storage and computing mode, the name of the current BE resource group is saved. In the decoupling storage and computing mode, some additional information is saved. | +| ErrMsg | The error message when the heartbeat of the current BE fails. | +| Version | The version information of the current BE. | +| Status | Some status information of the current BE, displayed in JSON format, including: lastSuccessReportTabletsTime, lastStreamLoadTime, isQueryDisabled, isLoadDisabled, etc. It should be noted that the information saved in different versions may vary slightly. | +| HeartbeatFailureCounter | The number of consecutive failed heartbeats of the current BE. If the number exceeds the `max_backend_heartbeat_failure_tolerance_count` configured by the FE Master (the default value is 1), the `Alive` field will be set to false. | +| NodeRole | The role of the current BE. There are two types: `mix` is the default role, and `computation` means that the current node is only used for federated analysis queries. | + +## Access Control Requirements + +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|------------|----|----| +| ADMIN_PRIV | | | + +## Usage Notes + +If further filtering of the query results is required, the table-valued function [backends()](../../../sql-functions/table-valued-functions/backends.md) can be used. SHOW BACKENDS is equivalent to the following statement: +```sql +SELECT * FROM BACKENDS(); +``` +## Examples +```sql +SHOW BACKENDS; +``` +```text ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| 10002 | 127.0.0.1 | 9050 | 9060 | 8040 | 8060 | 10040 | 2025-01-20 02:11:39 | 2025-01-21 11:52:40 | true | false | 281 | 9.690 MB | 0.000 | 10.505 GB | 71.750 GB | 85.36 % | 85.36 % | 0.000 | {"location" : "default"} | | doris-2.1.7-rc03-443e87e203 | {"lastSuccessReportTabletsTime":"2025-01-21 11:51:59","lastStreamLoadTime":1737460114345,"isQueryDisabled":false,"isLoadDisabled":false} | 0 | mix | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +``` diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md index ba4b3dafcdcd6..08b4ff0537f8a 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md @@ -24,36 +24,66 @@ specific language governing permissions and limitations under the License. --> - - - - ## Description -This statement is used to view FE nodes +This statement is used to view the basic status information of the FE nodes. -grammar: +## Syntax ```sql -SHOW FRONTENDS; +SHOW FRONTENDS ``` -illustrate: - -1. name indicates the name of the FE node in bdbje. -2. If Join is true, it means that the node has joined the cluster before. But it does not mean that it is still in the cluster (may have lost contact) -3. Alive indicates whether the node is alive or not. -4. ReplayedJournalId indicates the maximum metadata journal id that has been replayed by the node. -5. LastHeartbeat is the last heartbeat. -6. IsHelper indicates whether the node is a helper node in bdbje. -7. ErrMsg is used to display the error message when the heartbeat fails. -8. CurrentConnected indicates whether the FE node is currently connected - - +## Return Value + +| Column | Note | +|--------------------|-----------------------------------------------------------------------------------------------| +| Name | The name of the current FE in Doris. This name is usually a random string prefixed with `fe`. | +| Host | The IP address or host name of the current FE. | +| EditLogPort | The bdbje communication port of the current FE. | +| HttpPort | The http communication port of the current FE. | +| QueryPort | The MySQL protocol communication port of the current FE. | +| RpcPort | The thrift RPC communication port of the current FE. | +| ArrowFlightSqlPort | The ArrowFlight protocol communication port of the current FE. | +| Role | The role of the current FE. Possible values are FOLLOWER and OBSERVER. | +| IsMaster | Whether the current FE is elected as the Master. | +| ClusterId | The ID of the current Doris cluster, usually a randomly generated number. | +| Join | Used to indicate whether the current FE node has successfully joined the current Doris cluster. | +| Alive | Whether the current FE is alive. | +| ReplayedJournalId | The ID of the largest metadata log that the current FE has replayed. | +| LastStartTime | The timestamp when the current FE started. | +| LastHeartbeat | The timestamp of the last successful heartbeat sent by the current FE. | +| IsHelper | Whether the current FE is a helper node in bdbje. | +| ErrMsg | The error message when the heartbeat of the current FE fails. | +| Version | The version information of the current FE. | +| CurrentConnected | Whether the current client connection is connected to the current FE node. | + +## Access Control Requirements + +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|------------|----|----| +| ADMIN_PRIV | | | + +## Usage Notes + +If you need to further filter the query results, you can use the table-valued function [frontends()](../../../sql-functions/table-valued-functions/frontends.md). SHOW FRONTENDS is equivalent to the following statement: -## Keywords - -SHOW, FRONTENDS +```sql +SELECT * FROM FRONTENDS(); +``` +## Examples +```sql +SHOW FRONTENDS +``` +```text ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| Name | Host | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role | IsMaster | ClusterId | Join | Alive | ReplayedJournalId | LastStartTime | LastHeartbeat | IsHelper | ErrMsg | Version | CurrentConnected | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| fe_65a0c6f0_b31f_42ac_bd20_26d851299f1a | 127.0.0.1 | 9010 | 8030 | 9030 | 9020 | 10030 | FOLLOWER | true | 840241689 | true | true | 302891 | 2025-01-20 02:11:39 | 2025-01-21 09:48:36 | true | | doris-2.1.7-rc03-443e87e203 | Yes | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +``` From 3b0d88a07d4adf9a5aeb524dc56f24164af8fa57 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 15:10:22 +0800 Subject: [PATCH 06/13] update --- .../instance-management/CANCEL-DECOMMISSION-BACKEND.md | 2 ++ .../cluster-management/instance-management/MODIFY-BACKEND.md | 2 ++ .../instance-management/CANCEL-DECOMMISSION-BACKEND.md | 2 ++ .../cluster-management/instance-management/MODIFY-BACKEND.md | 2 ++ 4 files changed, 8 insertions(+) diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md index 7f61946aa88fe..7b3b1dcc490a1 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md @@ -28,6 +28,8 @@ under the License. This statement is used to cancel the decommissioning operation of a BE node. +> This statement is not supported in decoupling storage and computing mode. + ## Syntax ```sql diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 86ae33cf17b70..79f2ed3f08474 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -34,6 +34,8 @@ This statement is used to modify the attributes of BE nodes. After modifying the | `disable_query` | Whether to disable queries, with the default value being `false`. After setting it to `true`, no new query requests will be scheduled to this BE node. | | `disable_load` | Whether to disable load, with the default value being `false`. After setting it to `true`, no new import requests will be scheduled to this BE node. | +> + ## Syntax ```sql diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md index 79a88041c034a..5ecd9fc4b944b 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md @@ -28,6 +28,8 @@ under the License. 该语句用于撤销一个 BE 节点下线操作。 +> 存算分离模式下不支持此命令 + ## 语法 ```sql diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index cec8ac9eed67f..b8c3fece486a7 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -34,6 +34,8 @@ under the License. | `disable_query` | 是否禁用查询,默认为`false`。设置为`true`后,将不会再有新的查询请求规划到这台 BE 节点上。 | | `disable_load` | 是否禁用导入,默认为`false`。设置为`true`后,将不会再有新的导入请求规划到这台 BE 节点上。 | +> This statement is not supported in decoupling storage and computing mode. + ## 语法 ```sql From a0053880f18e8508e2930f2de7e6ae0e64e161e3 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 15:11:16 +0800 Subject: [PATCH 07/13] Update docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md Co-authored-by: morrySnow --- .../cluster-management/instance-management/ADD-BACKEND.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index 02ce3feb16600..009722420f098 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -46,7 +46,7 @@ ALTER SYSTEM ADD BACKEND ":"[,":"... ## Optional Parameters -**PROPERTIES ("key"="value", ...)** +**1. `PROPERTIES (""="" [, ... ] )`** > A set of key-value pairs used to define additional properties of the BE node. These properties can be used to customize the configuration of the BE being added. Available properties include: > - `tag.location`: Used to specify the Resource Group to which the BE node belongs in the integrated storage and computing mode. From b41352ffe507137a736d89b9bcfd10982e4b15f8 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 15:24:52 +0800 Subject: [PATCH 08/13] update --- .../instance-management/ADD-BACKEND.md | 6 +++--- .../instance-management/CANCEL-DECOMMISSION-BACKEND.md | 4 +++- .../instance-management/DECOMMISSION-BACKEND.md | 6 +++--- .../instance-management/DROP-BACKEND.md | 6 +++--- .../instance-management/MODIFY-BACKEND.md | 8 ++++---- .../instance-management/ADD-BACKEND.md | 8 ++++---- .../instance-management/CANCEL-DECOMMISSION-BACKEND.md | 10 ++++++---- .../instance-management/DECOMMISSION-BACKEND.md | 6 +++--- .../instance-management/DROP-BACKEND.md | 6 +++--- .../instance-management/MODIFY-BACKEND.md | 10 ++++++---- 10 files changed, 38 insertions(+), 32 deletions(-) diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index 009722420f098..27838dd6013f0 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -31,16 +31,16 @@ The ADD BACKEND is used to add one or more BE nodes to the Doris cluster. This c ## Syntax ```sql -ALTER SYSTEM ADD BACKEND ":"[,":"...] [PROPERTIES (""="", ...)] +ALTER SYSTEM ADD BACKEND ":"[,":" [, ...]] [PROPERTIES (""="" [, ...] )] ``` ## Required Parameters -**** +**1. ** > It can be the hostname or IP address of the BE node. -**** +**2. ** > The heartbeat port of the BE node, the default is 9050. diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md index 7b3b1dcc490a1..64177f0e4d3e5 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md @@ -28,7 +28,9 @@ under the License. This statement is used to cancel the decommissioning operation of a BE node. -> This statement is not supported in decoupling storage and computing mode. +:::tip +This statement is not supported in decoupling storage and computing mode. +::: ## Syntax diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md index a8e6dfd220fef..f33136e8da5da 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md @@ -44,15 +44,15 @@ be_identifier ## Required Parameters -**** +**1. ** > It can be the hostname or IP address of the BE node. -**** +**2. ** > The heartbeat port of the BE node, the default is 9050. -**** +**3. ** > The ID of the BE node. diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md index eb3429f175900..37af1df91d4e5 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md @@ -44,15 +44,15 @@ be_identifier ## Required Parameters -**** +**1. ** > It can be the hostname or IP address of the BE node. -**** +**2. ** > The heartbeat port of the BE node, the default is 9050. -**** +**3. ** > The ID of the BE node. diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 79f2ed3f08474..43828db6a21ec 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -39,7 +39,7 @@ This statement is used to modify the attributes of BE nodes. After modifying the ## Syntax ```sql -ALTER SYSTEM MODIFY BACKEND [, [...] ] +ALTER SYSTEM MODIFY BACKEND [, ... ] SET ( "" = "" ) @@ -55,15 +55,15 @@ be_identifier ## Required Parameters -**** +**1. ** > It can be the hostname or IP address of the BE node. -**** +**2. ** > The heartbeat port of the BE node, the default is 9050. -**** +**3. ** > The ID of the BE node. diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index 04ec49ddd2ba6..2aec1483f7eb2 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -31,22 +31,22 @@ ADD BACKEND 命令用于向 Doris 集群中添加一个或多个 BE 节点。此 ## 语法 ```sql -ALTER SYSTEM ADD BACKEND ":"[,":"...] [PROPERTIES (""="", ...)] +ALTER SYSTEM ADD BACKEND ":"[,":"...] [PROPERTIES (""="" [, ...] )] ``` ## 必选参数 -**** +**1. ``** > 可以是 BE 节点的主机名或 IP 地址 -**** +**2. ``** > BE 节点的心跳端口,默认为 9050 ## 可选参数 -**PROPERTIES ("key"="value", ...)** +**1. PROPERTIES ("key"="value", ...)** > 一组键值对,用于定义 BE 节点的附加属性。这些属性可用于自定义正在添加的 BE 的配置。可用属性包括: > - `tag.location`:存算一体模式下用于指定 BE 节点所属的资源组。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md index 5ecd9fc4b944b..36e15f6665dc8 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md @@ -28,7 +28,9 @@ under the License. 该语句用于撤销一个 BE 节点下线操作。 -> 存算分离模式下不支持此命令 +:::tip +存算分离模式下不支持此命令 +::: ## 语法 @@ -46,15 +48,15 @@ be_identifier ## 必选参数 -**** +**1. ** > 可以是 BE 节点的主机名或 IP 地址 -**** +**2. ** > BE 节点的心跳端口,默认为 9050 -**** +**3. ** > BE 节点的 ID diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md index b77d7d8dec2dd..dd2833fe01eff 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md @@ -44,15 +44,15 @@ be_identifier ## 必选参数 -**** +**1. ** > 可以是 BE 节点的主机名或 IP 地址 -**** +**2. ** > BE 节点的心跳端口,默认为 9050 -**** +**3. ** > BE 节点的 ID diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md index e527c6494a44f..62891d7a94453 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md @@ -44,15 +44,15 @@ be_identifier ## 必选参数 -**** +**1. ** > 可以是 BE 节点的主机名或 IP 地址 -**** +**2. ** > BE 节点的心跳端口,默认为 9050 -**** +**3. ** > BE 节点的 ID diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index b8c3fece486a7..416961da36c42 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -34,7 +34,9 @@ under the License. | `disable_query` | 是否禁用查询,默认为`false`。设置为`true`后,将不会再有新的查询请求规划到这台 BE 节点上。 | | `disable_load` | 是否禁用导入,默认为`false`。设置为`true`后,将不会再有新的导入请求规划到这台 BE 节点上。 | -> This statement is not supported in decoupling storage and computing mode. +:::tip +This statement is not supported in decoupling storage and computing mode. +::: ## 语法 @@ -55,15 +57,15 @@ be_identifier ## 必选参数 -**** +**1. ** > 可以是 BE 节点的主机名或 IP 地址 -**** +**2. ** > BE 节点的心跳端口,默认为 9050 -**** +**3. ** > BE 节点的 ID From c3d481a3d0a141de1908bc5b4dbfe9c02ad389a2 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 15:26:24 +0800 Subject: [PATCH 09/13] update --- .../cluster-management/instance-management/MODIFY-BACKEND.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 43828db6a21ec..a7e373fd4d2b6 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -34,8 +34,6 @@ This statement is used to modify the attributes of BE nodes. After modifying the | `disable_query` | Whether to disable queries, with the default value being `false`. After setting it to `true`, no new query requests will be scheduled to this BE node. | | `disable_load` | Whether to disable load, with the default value being `false`. After setting it to `true`, no new import requests will be scheduled to this BE node. | -> - ## Syntax ```sql From 0448f4d0198e8bf6ed21142f15fffe7746f51cdf Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 15:40:33 +0800 Subject: [PATCH 10/13] update 3.0 --- .../instance-management/ADD-BACKEND.md | 81 ++++++++------ .../CANCEL-ALTER-SYSTEM.md | 68 ------------ .../DECOMMISSION-BACKEND.md | 76 ++++++++----- .../instance-management/DROP-BACKEND.md | 74 +++++++++---- .../instance-management/MODIFY-BACKEND.md | 103 ++++++++++-------- .../instance-management/SHOW-BACKENDS.md | 84 +++++++++----- .../instance-management/SHOW-FRONTENDS.md | 72 ++++++++---- .../instance-management/ADD-BACKEND.md | 71 +++++++----- .../CANCEL-DECOMMISSION-BACKEND.md | 68 ++++++++---- .../DECOMMISSION-BACKEND.md | 74 ++++++++----- .../instance-management/DROP-BACKEND.md | 76 ++++++++----- .../instance-management/MODIFY-BACKEND.md | 102 ++++++++--------- .../instance-management/SHOW-BACKENDS.md | 86 ++++++++++----- .../instance-management/SHOW-FRONTENDS.md | 74 +++++++++---- 14 files changed, 660 insertions(+), 449 deletions(-) delete mode 100644 i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index 18f97acb989e9..2aec1483f7eb2 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -26,59 +26,68 @@ under the License. ## 描述 -ADD BACKEND 命令用于向 Doris OLAP 数据库集群添加一个或多个后端节点。此命令允许管理员指定新后端节点的主机和端口,以及可选的属性来配置它们的行为。 +ADD BACKEND 命令用于向 Doris 集群中添加一个或多个 BE 节点。此命令允许管理员指定新 BE 节点的主机和端口,以及可选的属性来配置它们的行为。 ## 语法 ```sql - ALTER SYSTEM ADD BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] [PROPERTIES ("key"="value", ...)]; +ALTER SYSTEM ADD BACKEND ":"[,":"...] [PROPERTIES (""="" [, ...] )] ``` -## 参数 +## 必选参数 -* `host`:可以是后端节点的主机名或 IP 地址 -* `heartbeat_port`:节点的心跳端口 -* `PROPERTIES ("key"="value", ...)`:(可选)一组键值对,用于定义后端节点的附加属性。这些属性可用于自定义正在添加的后端的配置。可用属性包括: +**1. ``** - * tag.location:指定后端节点所属的资源组。例如,PROPERTIES ("tag.location" = "groupb")。 - * tag.compute_group_name:指定后端节点所属的计算组。例如,PROPERTIES ("tag.compute_group_name" = "groupb")。 +> 可以是 BE 节点的主机名或 IP 地址 -## 示例 - -1. 不带附加属性添加后端 - - ```sql - ALTER SYSTEM ADD BACKEND "host1:9050,host2:9050"; - ``` - - 此命令向集群添加两个后端节点: - * host1,端口 9050 - * host2,端口 9050 +**2. ``** - 未指定附加属性,因此将应用默认设置。 +> BE 节点的心跳端口,默认为 9050 -2. 添加带有资源组的后端 +## 可选参数 - ```sql - ALTER SYSTEM ADD BACKEND "host3:9050" PROPERTIES ("tag.location" = "groupb"); - ``` +**1. PROPERTIES ("key"="value", ...)** - 此命令将单个后端节点(host3,端口 9050)添加到集群中的资源组 `groupb`。 +> 一组键值对,用于定义 BE 节点的附加属性。这些属性可用于自定义正在添加的 BE 的配置。可用属性包括: +> - `tag.location`:存算一体模式下用于指定 BE 节点所属的资源组。 +> - `tag.compute_group_name`:存算分离模式下用于指定 BE 节点所属的计算组。 -## 关键词 +## 权限控制 - ALTER, SYSTEM, ADD, BACKEND, PROPERTIES +执行此 SQL 命令的用户必须至少具有以下权限: -## 最佳实践 +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | -1. 在添加新的后端节点之前,确保节点已正确配置并运行。 +## 注意事项 -2. 使用资源组可以帮助您更好地管理和组织集群中的后端节点。 +1. 在添加新的 BE 节点之前,确保节点已正确配置并运行。 +2. 使用[Resource Group](../../../../admin-manual/workload-management/resource-group.md)可以帮助您更好地管理和组织集群中的 BE 节点。 +3. 添加多个 BE 节点时,可以在一个命令中指定它们,以提高效率。 +4. 添加 BE 节点后,使用[`SHOW BACKENDS`](./SHOW-BACKENDS.md)命令验证它们是否已成功添加并处于正常状态。 +5. 考虑在不同的物理位置或机架上添加 BE 节点,以提高集群的可用性和容错能力。 +6. 定期检查和平衡集群中的负载,确保新添加的 BE 节点得到适当利用。 -3. 添加多个后端节点时,可以在一个命令中指定它们,以提高效率。 - -4. 添加后端节点后,使用 `SHOW BACKENDS` 命令验证它们是否已成功添加并处于正常状态。 - -5. 考虑在不同的物理位置或机架上添加后端节点,以提高集群的可用性和容错能力。 +## 示例 -6. 定期检查和平衡集群中的负载,确保新添加的后端节点得到适当利用。 \ No newline at end of file +1. 不带附加属性添加 BE + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.1:9050,192.168.0.2:9050"; + ``` + 此命令向集群添加两个 BE 节点: + * 192.168.0.1,端口 9050 + * 192.168.0.2,端口 9050 + 未指定附加属性,因此将应用默认设置。 + +2. 存算一体模式下,添加指定资源组的 BE + ```sql + ALTER SYSTEM ADD BACKEND "doris-be01:9050" PROPERTIES ("tag.location" = "groupb"); + ``` + 此命令将单个 BE 节点(主机名 doris-be01,端口 9050)添加到集群中的资源组`groupb`。 + +3. 存算分离模式下,添加指定计算组的 BE + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.3:9050" PROPERTIES ("tag.compute_group_name" = "cloud_groupc"); + ``` + 此命令将单个 BE 节点(IP 192.168.0.3,端口 9050)添加到集群中的计算组`cloud_groupc`。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md deleted file mode 100644 index e44fe06f58ff5..0000000000000 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-ALTER-SYSTEM.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -{ - "title": "CANCEL ALTER SYSTEM", - "language": "zh-CN" -} ---- - - - - - - - -## 描述 - -该语句用于撤销一个节点下线操作。(仅管理员使用!) - -语法: - -- 通过 host 和 port 查找 backend - -```sql -CANCEL DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; -``` - -- 通过 backend_id 查找 backend - -```sql -CANCEL DECOMMISSION BACKEND "id1","id2","id3..."; -``` - -## 示例 - - 1. 取消两个节点的下线操作: - - ```sql - CANCEL DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` - - 2. 取消 backend_id 为 1 的节点的下线操作: - - ```sql - CANCEL DECOMMISSION BACKEND "1","2"; - ``` - -## 关键词 - - CANCEL, DECOMMISSION, CANCEL ALTER - -### 最佳实践 - diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md index 6c7da97a2efd1..dd2833fe01eff 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md @@ -24,50 +24,70 @@ specific language governing permissions and limitations under the License. --> - - - - ## 描述 -节点下线操作用于安全下线节点。该操作为异步操作。如果成功,节点最终会从元数据中删除。如果失败,则不会完成下线(仅管理员使用!) - -语法: +该语句用于将 BE 节点安全地从集群中下线。该操作为异步操作。 -- 通过 host 和 port 查找 backend +## 语法 ```sql -ALTER SYSTEM DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +ALTER SYSTEM DECOMMISSION BACKEND "" [, "" ... ] ``` -- 通过 backend_id 查找 backend +其中: ```sql -ALTER SYSTEM DECOMMISSION BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` - 说明: +## 必选参数 -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 节点下线操作用于安全下线节点。该操作为异步操作。如果成功,节点最终会从元数据中删除。如果失败,则不会完成下线。 -4. 可以手动取消节点下线操作。详见 CANCEL DECOMMISSION +**1. ** -## 示例 +> 可以是 BE 节点的主机名或 IP 地址 -1. 下线两个节点 +**2. ** - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` - - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "id1", "id2"; - ``` +> BE 节点的心跳端口,默认为 9050 + +**3. ** -## 关键词 +> BE 节点的 ID - ALTER, SYSTEM, DECOMMISSION, BACKEND, ALTER SYSTEM +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: -### 最佳实践 +## 权限控制 +执行此 SQL 命令的用户必须至少具有以下权限: + +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | + +## 注意事项 + +1. 执行此命令后,可以通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查看下线状态(`SystemDecommissioned`列的值为`true`)和下线进度(`TabletNum`列的值会缓慢降到 0) +2. 通常情况下,在`TabletNum`列的值会降到 0 后,此 BE 节点就会被删除,如果您不希望 Doris 自动删除 BE,可以更改 FE Master 的配置`drop_backend_after_decommission`为 false +3. 当前 BE 如果存储的数据量比较大,那么 DECOMMISSION 操作可能持续几个小时甚至是几天 +4. 如果 DECOMMISSION 操作的进度卡住不动,具体表现为[SHOW BACKENDS](./SHOW-BACKENDS.md)语句中的`TabletNum`列一直固定在某个值,那么可能是以下的一些情况: + - 当前 BE 上的 tablet 找不到合适的其他 BE 去迁移,比如在一个 3 节点的集群有一张 3 副本的表,要下线其中一个节点,那么该节点找不到其他 BE 可用来迁移数据(其他两个 BE 已经各有一个副本了) + - 当前 BE 上的 tablet 还在[回收站](../../recycle/SHOW-CATALOG-RECYCLE-BIN.md)中,可以[清空回收站](../../recycle/DROP-CATALOG-RECYCLE-BIN.md)后,再等待 + - 当前 BE 上的 tablet 太大,导致在迁移单个 tablet 时,一直因为超时而无法将这个 tablet 迁移走,可以调整 FE Master 的配置`max_clone_task_timeout_sec`为一个更大的值(默认为 7200 秒) + - 当前 BE 上的 tablet 存在未完成的事务,可以等事务完成或手动中止事务 + - 其他情况可以在 FE Master 的日志过滤`replicas to decommission`关键字,找出异常的 tablet,使用[SHOW TABLET](../../table-and-view/data-and-status-management/SHOW-TABLET.md)语句找到该 tablet 所属的表,然后重新建一张新的表,将数据从旧表迁移至新表,最后使用[DROP TABLE FORCE](../../table-and-view/table/DROP-TABLE.md)的方式将旧表删除掉 + +## 示例 + +1. 根据 BE 的 Host 和 HeartbeatPort 从集群中安全下线两个节点 + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` + +2. 根据 BE 的 ID 从集群中安全下线一个节点 + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "10002"; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md index 332deaa6817a1..62891d7a94453 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md @@ -24,47 +24,73 @@ specific language governing permissions and limitations under the License. --> - - ## 描述 -该语句用于删除 BACKEND 节点(仅管理员使用!) - -语法: +该语句用于将 BE 节点从 Doris 集群中删除。 -- 通过 host 和 port 查找 backend +## 语法 ```sql -ALTER SYSTEM DROP BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] +ALTER SYSTEM DROP BACKEND "" [, "" ... ] ``` -- 通过 backend_id 查找 backend +其中: ```sql -ALTER SYSTEM DROP BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` -说明: +## 必选参数 -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 增加和删除节点为同步操作。这两种操作不考虑节点上已有的数据,节点直接从元数据中删除,请谨慎使用。 +**1. ** -## 示例 +> 可以是 BE 节点的主机名或 IP 地址 + +**2. ** + +> BE 节点的心跳端口,默认为 9050 + +**3. ** + +> BE 节点的 ID + +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: + +## 权限控制 + +执行此 SQL 命令的用户必须至少具有以下权限: + +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | -1. 删除两个节点 +## 注意事项 +1. 不推荐使用该命令下线 BE,该命令会直接将 BE 直接从集群中删去,当前节点的数据并不会负载均衡到其他 BE 节点,如果集群存在单副本的表,那么就有可能出现数据丢失的情况。更好的做法是使用[DECOMMISSION BACKEND](./DECOMMISSION-BACKEND.md)命令优雅下线 BE。 +2. 由于此操作是高危操作,因此当直接运行此命令时: ```sql - ALTER SYSTEM DROP BACKEND "host1:port", "host2:port"; + ALTER SYSTEM DROP BACKEND "127.0.0.1:9050"; + ``` + ```text + ERROR 1105 (HY000): errCode = 2, detailMessage = It is highly NOT RECOMMENDED to use DROP BACKEND stmt.It is not safe to directly drop a backend. All data on this backend will be discarded permanently. If you insist, use DROPP instead of DROP + ``` + 会出现以上提示信息,如果您明白您当前所做的事情,可将`DROP`关键字替换成`DROPP`,并继续下去: + ```sql + ALTER SYSTEM DROPP BACKEND "127.0.0.1:9050"; ``` - - ```sql - ALTER SYSTEM DROP BACKEND "id1", "id2"; - ``` - -## 关键词 - ALTER, SYSTEM, DROP, BACKEND, ALTER SYSTEM +## 示例 -### 最佳实践 +1. 根据 BE 的 Host 和 HeartbeatPort 从集群中删除两个节点 + ```sql + ALTER SYSTEM DROPP BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` +2. 根据 BE 的 ID 从集群中删除一个节点 + ```sql + ALTER SYSTEM DROPP BACKEND "10002"; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 3ad924121b640..416961da36c42 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -3,7 +3,6 @@ "title": "MODIFY BACKEND", "language": "zh-CN" } - --- - - - ## 描述 -修改 BE 节点属性(仅管理员使用!) +该语句用于修改 BE 节点属性,修改 BE 节点属性后,会影响到当前的节点的查询、写入和数据分布。以下是支持修改的属性: -语法: +| 属性 | 影响 | +|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| +| `tag.location` | BE 的标签名,默认值为`default`。修改后,会影响到同一标签组内的 BE 数据均衡,以及在建表时,数据分布的 BE 节点。更多信息可参考[Resource Group](../../../../admin-manual/workload-management/resource-group.md) | +| `disable_query` | 是否禁用查询,默认为`false`。设置为`true`后,将不会再有新的查询请求规划到这台 BE 节点上。 | +| `disable_load` | 是否禁用导入,默认为`false`。设置为`true`后,将不会再有新的导入请求规划到这台 BE 节点上。 | -- 通过 host 和 port 查找 backend +:::tip +This statement is not supported in decoupling storage and computing mode. +::: + +## 语法 ```sql -ALTER SYSTEM MODIFY BACKEND "host:heartbeat_port" SET ("key" = "value"[, ...]); +ALTER SYSTEM MODIFY BACKEND [, [...] ] +SET ( + "" = "" +) ``` -- 通过 backend_id 查找 backend +其中: ```sql -ALTER SYSTEM MODIFY BACKEND "id1" SET ("key" = "value"[, ...]); +be_identifier + : ":" + | "" ``` - 说明: +## 必选参数 -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 修改 BE 节点属性目前支持以下属性: +**1. ** -- tag.xxx:资源标签 -- disable_query: 查询禁用属性 -- disable_load: 导入禁用属性 +> 可以是 BE 节点的主机名或 IP 地址 -注: -1. 可以给一个 Backend 设置多种资源标签。但必须包含 "tag.location"。 +**2. ** -## 示例 +> BE 节点的心跳端口,默认为 9050 -1. 修改 BE 的资源标签 +**3. ** - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` +> BE 节点的 ID - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: -2. 修改 BE 的查询禁用属性 - - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_query" = "true"); - ``` +## 权限控制 - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_query" = "true"); - ``` +执行此 SQL 命令的用户必须至少具有以下权限: -3. 修改 BE 的导入禁用属性 - - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_load" = "true"); - ``` +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | + +## 注意事项 + +由于此操作是针对整个 BE 级别的,影响面较广,如果操作不慎,可能会影响到整个集群的正常查询、导入甚至是建表操作。请谨慎操作。 - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_load" = "true"); - ``` +存算分离模式暂不支持此命令。 -## 关键词 +## 示例 - ALTER, SYSTEM, ADD, BACKEND, ALTER SYSTEM +1. 修改 BE 的资源标签 -### 最佳实践 +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("tag.location" = "group_a"); +``` +2. 修改 BE 的查询禁用属性 + +```sql +ALTER SYSTEM MODIFY BACKEND "10002" SET ("disable_query" = "true"); +``` + +3. 修改 BE 的导入禁用属性 + +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("disable_load" = "true"); +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md index b07374d97933a..7f98fd848f1e6 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md @@ -24,40 +24,72 @@ specific language governing permissions and limitations under the License. --> +## 描述 +该语句用于查看 BE 节点的基本状态信息。 +## 语法 +```sql + SHOW BACKENDS +``` -## 描述 - -该语句用于查看 cluster 内的 BE 节点 +## 返回值 + +| 列名 | 说明 | +|-------------------------|------------------------------------------------------------------------------------------------------------------| +| BackendId | 当前 BE 的 ID | +| Host | 当前 BE 的 IP 地址或主机名 | +| HeartbeatPort | 当前 BE 的心跳服务通信端口 | +| BePort | 当前 BE 的 thrift RPC 通信端口 | +| HttpPort | 当前 BE 的 http 通信端口 | +| BrpcPort | 当前 BE 的 bRPC 通信端口 | +| ArrowFlightSqlPort | 当前 BE 的 ArrowFlight 协议通信端口 | +| LastStartTime | 当前 BE 启动的时间戳 | +| LastHeartbeat | 当前 BE 上一次成功发送心跳的时间戳 | +| Alive | 当前 BE 是否存活 | +| SystemDecommissioned | 该值为 true 时,表示当前 BE 节点正在安全下线中 | +| TabletNum | 当前 BE 上存储的数据分片数量 | +| DataUsedCapacity | 当前 BE 数据所占用的磁盘空间 | +| TrashUsedCapacity | 当前 BE 垃圾回收站中数据所占用的磁盘空间 | +| AvailCapacity | 当前 BE 可用的磁盘空间 | +| TotalCapacity | 当前 BE 总的磁盘空间,TotalCapacity = AvailCapacity + TrashUsedCapacity + DataUsedCapacity + 其他非用户数据文件占用空间 | +| UsedPct | 当前 BE 所有磁盘总的已使用量百分比 | +| MaxDiskUsedPct | 当前 BE 所有磁盘的已使用量百分比中最大的一个 | +| RemoteUsedCapacity | 当前 BE 在使用了冷热分层功能后,上传到远端存储的数据占用空间 | +| Tag | 当前 BE 的标签信息,以 JSON 格式展示,不同部署模式下的保存的标签信息不同,存算一体模式下保存当前 BE 资源组名称,存算分离模式下保存一些额外的信息 | +| ErrMsg | 当前 BE 心跳失败时的错误信息 | +| Version | 当前 BE 的版本信息 | +| Status | 当前 BE 的一些状态信息,以 JSON 格式展示,包括:上一次成功上报 tablet 的时间、上一次 StreamLoad 的时间、是否允许查询、是否允许导入等,需要注意的是,不同版本保存的信息会有些许差异 | +| HeartbeatFailureCounter | 当前 BE 连续失败的心跳次数,如果次数超过 FE Master 配置`max_backend_heartbeat_failure_tolerance_count`(默认值为 1),则 `Alive` 字段会置为 false | +| NodeRole | 当前 BE 的角色,有两种:`mix`是默认的角色,`computation`表示当前节点只用于联邦分析查询 | + +## 权限控制 + +执行此 SQL 命令的用户必须至少具有以下权限: + +| 权限 | 对象 | 说明 | +|------------|----|----| +| ADMIN_PRIV | | | + +## 注意事项 + +如果需要对查询结果进行进一步的过滤,可以使用表值函数[backends()](../../../sql-functions/table-valued-functions/backends.md)。`SHOW BACKENDS` 与下面语句等价: ```sql - SHOW BACKENDS; +SELECT * FROM BACKENDS(); ``` -说明: - - 1. LastStartTime 表示最近一次 BE 启动时间。 - 2. LastHeartbeat 表示最近一次心跳。 - 3. Alive 表示节点是否存活。 - 4. SystemDecommissioned 为 true 表示节点正在安全下线中。 - 5. ClusterDecommissioned 为 true 表示节点正在冲当前 cluster 中下线。 - 6. TabletNum 表示该节点上分片数量。 - 7. DataUsedCapacity 表示实际用户数据所占用的空间。 - 8. AvailCapacity 表示磁盘的可使用空间。 - 9. TotalCapacity 表示总磁盘空间。TotalCapacity = AvailCapacity + DataUsedCapacity + 其他非用户数据文件占用空间。 - 10. UsedPct 表示磁盘已使用量百分比。 - 11. ErrMsg 用于显示心跳失败时的错误信息。 - 12. Status 用于以 JSON 格式显示 BE 的一些状态信息,目前包括最后一次 BE 汇报其 tablet 的时间信息。 - 13. HeartbeatFailureCounter:现在当前连续失败的心跳次数,如果次数超过 `max_backend_heartbeat_failure_tolerance_count` 配置,则 isAlive 字段会置为 false。 - 14. NodeRole 用于展示节点角色,现在有两种类型:Mix 代表原来的节点类型,computation 代表只做计算的节点类型。 - ## 示例 -## 关键词 - - SHOW, BACKENDS - -### 最佳实践 +```sql +SHOW BACKENDS; +``` +```text ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| 10002 | 127.0.0.1 | 9050 | 9060 | 8040 | 8060 | 10040 | 2025-01-20 02:11:39 | 2025-01-21 11:52:40 | true | false | 281 | 9.690 MB | 0.000 | 10.505 GB | 71.750 GB | 85.36 % | 85.36 % | 0.000 | {"location" : "default"} | | doris-2.1.7-rc03-443e87e203 | {"lastSuccessReportTabletsTime":"2025-01-21 11:51:59","lastStreamLoadTime":1737460114345,"isQueryDisabled":false,"isLoadDisabled":false} | 0 | mix | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md index 2d5b9c46ca593..a6d70c788b11a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md @@ -24,34 +24,66 @@ specific language governing permissions and limitations under the License. --> - - - ## 描述 - 该语句用于查看 FE 节点 +该语句用于查看 FE 节点的基本状态信息。 - 语法: +## 语法 ```sql -SHOW FRONTENDS; +SHOW FRONTENDS ``` -说明: -1. name 表示该 FE 节点在 bdbje 中的名称。 -2. Join 为 true 表示该节点曾经加入过集群。但不代表当前还在集群内(可能已失联) -3. Alive 表示节点是否存活。 -4. ReplayedJournalId 表示该节点当前已经回放的最大元数据日志 id。 -5. LastHeartbeat 是最近一次心跳。 -6. IsHelper 表示该节点是否是 bdbje 中的 helper 节点。 -7. ErrMsg 用于显示心跳失败时的错误信息。 -8. CurrentConnected 表示是否是当前连接的 FE 节点 +## 返回值 + +| 列名 | 说明 | +|--------------------|--------------------------------------------| +| Name | 当前 FE 在此 Doris 中的名称,该名称通常是一个以`fe`为前缀的随机字符串 | +| Host | 当前 FE 的 IP 地址或主机名 | +| EditLogPort | 当前 FE 的 bdbje 通信端口 | +| HttpPort | 当前 FE 的 http 通信端口 | +| QueryPort | 当前 FE 的 MySQL 协议通信端口 | +| RpcPort | 当前 FE 的 thrift RPC 通信端口 | +| ArrowFlightSqlPort | 当前 FE 的 ArrowFlight 协议通信端口 | +| Role | 当前 FE 的角色,可能的值有 FOLLOWER 和 OBSERVER | +| IsMaster | 当前 FE 是否被选举为 Master | +| ClusterId | 当前 Doris 集群的 ID,通常为一个随机生成的数字 | +| Join | 用于表示当前 FE 节点是否成功加入当前 Doris 集群 | +| Alive | 当前 FE 是否存活 | +| ReplayedJournalId | 当前 FE 已经回放的最大元数据日志 ID | +| LastStartTime | 当前 FE 启动的时间戳 | +| LastHeartbeat | 当前 FE 上一次成功发送心跳的时间戳 | +| IsHelper | 当前 FE 是否为 bdbje 中的 helper 节点 | +| ErrMsg | 当前 FE 心跳失败时的错误信息 | +| Version | 当前 FE 的版本信息 | +| CurrentConnected | 当前客户端链接是否连接了当前 FE 节点 | + +## 权限控制 + +执行此 SQL 命令的用户必须至少具有以下权限: + +| 权限 | 对象 | 说明 | +|------------|----|----| +| ADMIN_PRIV | | | + +## 注意事项 + +如果需要对查询结果进行进一步的过滤,可以使用表值函数[frontends()](../../../sql-functions/table-valued-functions/frontends.md)。`SHOW FRONTENDS` 与下面语句等价: -## 示例 - -## 关键词 +```sql +SELECT * FROM FRONTENDS(); +``` - SHOW, FRONTENDS +## 示例 -### 最佳实践 +```sql +SHOW FRONTENDS +``` +```text ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| Name | Host | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role | IsMaster | ClusterId | Join | Alive | ReplayedJournalId | LastStartTime | LastHeartbeat | IsHelper | ErrMsg | Version | CurrentConnected | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| fe_65a0c6f0_b31f_42ac_bd20_26d851299f1a | 127.0.0.1 | 9010 | 8030 | 9030 | 9020 | 10030 | FOLLOWER | true | 840241689 | true | true | 302891 | 2025-01-20 02:11:39 | 2025-01-21 09:48:36 | true | | doris-2.1.7-rc03-443e87e203 | Yes | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index 2e1817099b790..27838dd6013f0 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -26,47 +26,68 @@ under the License. ## Description -The ADD BACKEND command is used to add one or more backend nodes to a Doris OLAP database cluster. This command allows administrators to specify the host and port of the new backend nodes, along with optional properties that configure their behavior. +The ADD BACKEND is used to add one or more BE nodes to the Doris cluster. This command allows administrators to specify the host and port of the new BE nodes, as well as optional properties to configure their behavior. -grammar: +## Syntax ```sql --- Add nodes (add this method if you do not use the multi-tenancy function) - ALTER SYSTEM ADD BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] [PROPERTIES ("key"="value", ...)]; +ALTER SYSTEM ADD BACKEND ":"[,":" [, ...]] [PROPERTIES (""="" [, ...] )] ``` -### Parameters +## Required Parameters -* `host` can be a hostname or an ip address of the backend node while `heartbeat_port` is the heartbeat port of the node -* `PROPERTIES ("key"="value", ...)`: (Optional) A set of key-value pairs that define additional properties for the backend nodes. These properties can be used to customize the configuration of the backends being added. Available properties include: +**1. ** - * tag.location: Specifies the resource group where the backend node belongs. For example, PROPERTIES ("tag.location" = "groupb"). +> It can be the hostname or IP address of the BE node. -## Example +**2. ** - 1. Adding Backends Without Additional Properties +> The heartbeat port of the BE node, the default is 9050. - ```sql - ALTER SYSTEM ADD BACKEND "host1:9020,host2:9020"; - ```` +## Optional Parameters - This command adds two backend nodes to the cluster: +**1. `PROPERTIES (""="" [, ... ] )`** - * host1 with port 9020 - * host2 with port 9020 +> A set of key-value pairs used to define additional properties of the BE node. These properties can be used to customize the configuration of the BE being added. Available properties include: +> - `tag.location`: Used to specify the Resource Group to which the BE node belongs in the integrated storage and computing mode. +> - `tag.compute_group_name`: Used to specify the compute group to which the BE node belongs in the decoupling storage and computing mode. - No additional properties are specified, so the default settings will apply to these backends. +## Access Control Requirements -2. Adding Backends With Resource Group +The user executing this SQL must have at least the following permissions: - ```sql - ALTER SYSTEM ADD BACKEND "host3:9020" PROPERTIES ("tag.location" = "groupb"); - ``` +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes - This command adds a single backend node (host3 with port 9020) to the cluster in resource group `groupb`: +1. Before adding a new BE node, make sure the node is correctly configured and running. +2. Using [Resource Group](../../../../admin-manual/workload-management/resource-group.md) can help you better manage and organize the BE nodes in the cluster. +3. When adding multiple BE nodes, you can specify them in one command to improve efficiency. +3. After adding the BE nodes, use the [`SHOW BACKENDS`](./SHOW-BACKENDS.md) to verify whether they have been successfully added and are in a normal state. +4. Consider adding BE nodes in different physical locations or racks to improve the availability and fault tolerance of the cluster. +5. Regularly check and balance the load in the cluster to ensure that the newly added BE nodes are properly utilized. -## Keywords +## Examples + +1. Add BE nodes without additional properties + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.1:9050,192.168.0.2:9050"; + ``` + This command adds two BE nodes to the cluster: + * 192.168.0.1,port 9050 + * 192.168.0.2,port 9050 + No additional properties are specified, so the default settings will be applied. -ALTER, SYSTEM, ADD, BACKEND, PROPERTIES +2. In the integrated storage and computing mode, add a BE node to a specified Resource Group + ```sql + ALTER SYSTEM ADD BACKEND "doris-be01:9050" PROPERTIES ("tag.location" = "groupb"); + ``` + This command adds a single BE node (hostname doris-be01, port 9050) to the Resource Group `groupb` in the cluster. -## Best Practice \ No newline at end of file +3. In the decoupling storage and computing mode, add a BE node to a specified compute group + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.3:9050" PROPERTIES ("tag.compute_group_name" = "cloud_groupc"); + ``` + This command adds a single BE node (IP 192.168.0.3, port 9050) to the compute group `cloud_groupc` in the cluster. diff --git a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md index 1119d733e69ce..64177f0e4d3e5 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md +++ b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md @@ -24,45 +24,67 @@ specific language governing permissions and limitations under the License. --> - - - - ## Description -This statement is used to undo a node offline operation. (Administrator only!) +This statement is used to cancel the decommissioning operation of a BE node. -grammar: +:::tip +This statement is not supported in decoupling storage and computing mode. +::: -- Find backend through host and port +## Syntax ```sql -CANCEL DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +CANCEL DECOMMISSION BACKEND "" [, "" ... ] ``` -- Find backend through backend_id +Where: ```sql -CANCEL DECOMMISSION BACKEND "id1","id2","id3..."; +be_identifier + : ":" + | "" ``` -## Example +## Required Parameters + +**** + +> It can be the hostname or IP address of the BE node. + +**** + +> The heartbeat port of the BE node, the default is 9050. + +**** + +> The ID of the BE node. + +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: + +## Access Control Requirements - 1. Cancel the offline operation of both nodes: +The user who executes this SQL must have at least the following permissions: - ```sql - CANCEL DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | - 2. Cancel the offline operation of the node with backend_id 1: - - ```sql - CANCEL DECOMMISSION BACKEND "1","2"; - ``` +## Usage Notes -## Keywords +1. After executing this command, you can view the decommissioning status (the value of the `SystemDecommissioned` column is false) and the decommissioning progress (the value of the `TabletNum` column no longer decreases slowly) through the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +2. The cluster will slowly migrate the tablets from other nodes back to the current BE, so that the number of tablets on each BE will eventually tend to approach. - CANCEL, DECOMMISSION, CANCEL ALTER +## Examples -## Best Practice +1. Safely decommission two nodes from the cluster according to the Host and HeartbeatPort of the BE. + ```sql + CANCEL DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` +2. Safely decommission one node from the cluster according to the ID of the BE. + ```sql + CANCEL DECOMMISSION BACKEND "10002"; + ``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md index e10faca2552fb..f33136e8da5da 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md +++ b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md @@ -24,50 +24,70 @@ specific language governing permissions and limitations under the License. --> - - - - ## Description -The node offline operation is used to safely log off the node. The operation is asynchronous. If successful, the node is eventually removed from the metadata. If it fails, the logout will not be done (only for admins!) - -grammar: +This statement is used to safely decommission a BE node from the cluster. This operation is asynchronous. -- Find backend through host and port +## Syntax ```sql -ALTER SYSTEM DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +ALTER SYSTEM DECOMMISSION BACKEND "" [, "" ... ] ``` -- Find backend through backend_id +Where: ```sql -ALTER SYSTEM DECOMMISSION BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` - illustrate: +## Required Parameters -1. host can be a hostname or an ip address -2. heartbeat_port is the heartbeat port of the node -3. The node offline operation is used to safely log off the node. The operation is asynchronous. If successful, the node is eventually removed from the metadata. If it fails, the logout will not be completed. -4. You can manually cancel the node offline operation. See CANCEL DECOMMISSION +**1. ** -## Example +> It can be the hostname or IP address of the BE node. -1. Offline two nodes +**2. ** - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` +> The heartbeat port of the BE node, the default is 9050. - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "id1", "id2"; - ``` +**3. ** -## Keywords +> The ID of the BE node. - ALTER, SYSTEM, DECOMMISSION, BACKEND, ALTER SYSTEM +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: -## Best Practice +## Access Control Requirements +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +1. After executing this command, you can use the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement to view the decommissioning status (the value of the `SystemDecommissioned` column is `true`) and the decommissioning progress (the value of the `TabletNum` column will slowly drop to 0). +2. Under normal circumstances, after the value of the `TabletNum` column drops to 0, this BE node will be deleted. If you do not want Doris to automatically delete the BE, you can change the configuration `drop_backend_after_decommission` of the FE Master to false. +3. If the current BE stores a relatively large amount of data, the DECOMMISSION operation may last for several hours or even days. +4. If the progress of the DECOMMISSION operation gets stuck, specifically, the `TabletNum` column in the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement remains fixed at a certain value, it may be due to the following situations: + - There is no suitable other BE to migrate the tablets on the current BE. For example, in a 3-node cluster with a table having 3 replicas, if one of the nodes is to be decommissioned, this node cannot find other BEs to migrate the data (the other two BEs already have one replica each). + - The tablets on the current BE are still in the [Recycle Bin](../../recycle/SHOW-CATALOG-RECYCLE-BIN.md). You can [empty the recycle bin](../../recycle/DROP-CATALOG-RECYCLE-BIN.md) and then wait for decommission. + - The tablet on the current BE is too large, causing the migration of a single tablet to always timeout and unable to migrate this tablet away. You can adjust the configuration `max_clone_task_timeout_sec` of the FE Master to a larger value (the default is 7200 seconds). + - There are unfinished transactions on the tablets of the current BE. You can wait for the transactions to complete or manually abort the transactions. + - In other cases, you can filter the keyword `replicas to decommission` in the logs of the FE Master to find the abnormal tablet, use the [SHOW TABLET](../../table-and-view/data-and-status-management/SHOW-TABLET.md) statement to find the table to which this tablet belongs, then create a new table, migrate the data from the old table to the new table, and finally use the [DROP TABLE FORCE](../../table-and-view/table/DROP-TABLE.md) to delete the old table. + +## Examples + +1. Safely decommission two nodes from the cluster according to the Host and HeartbeatPort of the BE. + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` + +2. Safely decommission a node from the cluster according to the ID of the BE. + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "10002"; + ``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md index f85add2c4b273..37af1df91d4e5 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md +++ b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md @@ -24,47 +24,73 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -This statement is used to delete the BACKEND node (administrator only!) +This statement is used to remove BE nodes from the Doris cluster. -grammar: - -- Find backend through host and port +## Syntax ```sql -ALTER SYSTEM DROP BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] +ALTER SYSTEM DROP BACKEND "" [, "" ... ] ``` -- Find backend through backend_id + +Where: ```sql -ALTER SYSTEM DROP BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` -illustrate: +## Required Parameters -1. host can be a hostname or an ip address -2. heartbeat_port is the heartbeat port of the node -3. Adding and deleting nodes is a synchronous operation. These two operations do not consider the existing data on the node, and the node is directly deleted from the metadata, please use it with caution. +**1. ** -## Example +> It can be the hostname or IP address of the BE node. -1. Delete two nodes +**2. ** - ```sql - ALTER SYSTEM DROP BACKEND "host1:port", "host2:port"; - ``` +> The heartbeat port of the BE node, the default is 9050. - ```sql - ALTER SYSTEM DROP BACKEND "ids1", "ids2"; - ``` +**3. ** -## Keywords +> The ID of the BE node. - ALTER, SYSTEM, DROP, BACKEND, ALTER SYSTEM +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: -## Best Practice +## Access Control Requirements +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +1. It is not recommended to use this command to take a BE node offline. This command will directly remove the BE node from the cluster. The data on the current node will not be load-balanced to other BE nodes. Data loss may occur if there are single-replica tables in the cluster. A better approach is to use the [DECOMMISSION BACKEND](./DECOMMISSION-BACKEND.md) command to gracefully take the BE node offline. +2. Since this operation is a high-risk operation, when you directly run this command: + ```sql + ALTER SYSTEM DROP BACKEND "127.0.0.1:9050"; + ``` + ```text + ERROR 1105 (HY000): errCode = 2, detailMessage = It is highly NOT RECOMMENDED to use DROP BACKEND stmt.It is not safe to directly drop a backend. All data on this backend will be discarded permanently. If you insist, use DROPP instead of DROP + ``` + The above prompt message will appear. If you understand what you are doing, you can replace the `DROP` keyword with `DROPP` and continue: + ```sql + ALTER SYSTEM DROPP BACKEND "127.0.0.1:9050"; + ``` + +## Examples + +1. Remove two nodes from the cluster based on the Host and HeartbeatPort of the BE nodes: + ```sql + ALTER SYSTEM DROPP BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` + +2. Remove one node from the cluster based on the ID of the BE node: + ```sql + ALTER SYSTEM DROPP BACKEND "10002"; + ``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 5eefadabaaa97..a7e373fd4d2b6 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -3,7 +3,6 @@ "title": "MODIFY BACKEND", "language": "en" } - --- - - - - ## Description -Modify BE node properties (administrator only!) +This statement is used to modify the attributes of BE nodes. After modifying the attributes of BE nodes, it will affect the query, write, and data distribution of the current node. The following are the attributes that can be modified: -grammar: +| 属性 | 影响 | +|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `tag.location` | The resource tag of the BE, with the `default` value being default. After modification, it will affect the data balancing of BEs within the same tag group and the BE nodes for data distribution during table creation. For more information, please refer to[Resource Group](../../../../admin-manual/workload-management/resource-group.md) | +| `disable_query` | Whether to disable queries, with the default value being `false`. After setting it to `true`, no new query requests will be scheduled to this BE node. | +| `disable_load` | Whether to disable load, with the default value being `false`. After setting it to `true`, no new import requests will be scheduled to this BE node. | -- Find backend through host and port +## Syntax ```sql -ALTER SYSTEM MODIFY BACKEND "host:heartbeat_port" SET ("key" = "value"[, ...]); +ALTER SYSTEM MODIFY BACKEND [, ... ] +SET ( + "" = "" +) ``` -- Find backend through backend_id +Where: ```sql -ALTER SYSTEM MODIFY BACKEND "id1" SET ("key" = "value"[, ...]); +be_identifier + : ":" + | "" ``` - illustrate: +## Required Parameters -1. host can be a hostname or an ip address -2. heartbeat_port is the heartbeat port of the node -3. Modify BE node properties The following properties are currently supported: +**1. ** -- tag.xxxx: resource tag -- disable_query: query disable attribute -- disable_load: import disable attribute +> It can be the hostname or IP address of the BE node. -Note: -1. A backend can be set multi resource tags. But must contain "tag.location" type. +**2. ** -## Example +> The heartbeat port of the BE node, the default is 9050. -1. Modify the resource tag of BE +**3. ** - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` +> The ID of the BE node. -2. Modify the query disable property of BE +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_query" = "true"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_query" = "true"); - ``` +## Access Control Requirements -3. Modify the import disable property of BE +The user who executes this SQL must have at least the following permissions: - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_load" = "true"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_load" = "true"); - ``` +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +Since this operation is at the entire BE level and has a wide impact, it may affect the normal querying, loading, and even table creation operations of the entire cluster if not performed carefully. Please operate with caution. -## Keywords +This command is not supported in the decoupling storage and computing mode. - ALTER, SYSTEM, ADD, BACKEND, ALTER SYSTEM +## Examples -## Best Practice +1. Modify the resource tag of the BE +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("tag.location" = "group_a"); +``` + +2. Modify the `disable_query` attribute of the BE + +```sql +ALTER SYSTEM MODIFY BACKEND "10002" SET ("disable_query" = "true"); +``` + +3. Modify the `disable_load` attribute of the BE + +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("disable_load" = "true"); +``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md index 82c07c46008c1..77023ed0a6c1c 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md +++ b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md @@ -24,39 +24,71 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -This statement is used to view the BE nodes in the cluster +This statement is used to view the basic status information of BE nodes. + +## Syntax ```sql - SHOW BACKENDS; + SHOW BACKENDS ``` -illustrate: - -1. LastStartTime indicates the last BE start time. -2. LastHeartbeat indicates the last heartbeat. -3. Alive indicates whether the node is alive or not. -4. If SystemDecommissioned is true, it means that the node is being safely decommissioned. -5. If ClusterDecommissioned is true, it means that the node is going offline in the current cluster. -6. TabletNum represents the number of shards on the node. -7. DataUsedCapacity Indicates the space occupied by the actual user data. -8. AvailCapacity Indicates the available space on the disk. -9. TotalCapacity represents the total disk space. TotalCapacity = AvailCapacity + DataUsedCapacity + other non-user data files occupy space. -10. UsedPct Indicates the percentage of disk used. -11. ErrMsg is used to display the error message when the heartbeat fails. -12. Status is used to display some status information of BE in JSON format, including the time information of the last time BE reported its tablet. -13. HeartbeatFailureCounter: The current number of heartbeats that have failed consecutively. If the number exceeds the `max_backend_heartbeat_failure_tolerance_count` configuration, the isAlive will be set to false. -14. NodeRole is used to display the role of Backend node. Now there are two roles: mix and computation. Mix node represent the origin Backend node and computation Node represent the compute only node. - - - -## Keywords - -SHOW, BACKENDS +## Return Value + +| Column | Note | +|-------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| BackendId | The ID of the current BE. | +| Host | The IP address or host name of the current BE. | +| HeartbeatPort | The communication port of the heartbeat service of the current BE. | +| BePort | The thrift RPC communication port of the current BE. | +| HttpPort | The HTTP communication port of the current BE. | +| BrpcPort | The bRPC communication port of the current BE. | +| ArrowFlightSqlPort | The communication port of the ArrowFlight protocol of the current BE. | +| LastStartTime | The timestamp when the current BE started. | +| LastHeartbeat | The timestamp of the last successful heartbeat sent by the current BE. | +| Alive | Whether the current BE is alive. | +| SystemDecommissioned | When this value is true, it means that the current BE node is in the process of safe decommissioning. | +| TabletNum | The number of tablets stored on the current BE. | +| DataUsedCapacity | The disk space occupied by the data of the current BE. | +| TrashUsedCapacity | The disk space occupied by the data in the trash of the current BE. | +| AvailCapacity | The available disk space of the current BE. | +| TotalCapacity | The total disk space of the current BE. TotalCapacity = AvailCapacity + TrashUsedCapacity + DataUsedCapacity + Disk space occupied by other non-user data files. | +| UsedPct | The percentage of the total used disk space of the current BE. | +| MaxDiskUsedPct | The maximum percentage of the used disk space among all disks of the current BE. | +| RemoteUsedCapacity | The disk space occupied by the data uploaded to the remote storage after the hot and cold tiering function is used by the current BE. | +| Tag | The tag information of the current BE, displayed in JSON format. The saved tag information is different in different deployment modes. In the integrated storage and computing mode, the name of the current BE resource group is saved. In the decoupling storage and computing mode, some additional information is saved. | +| ErrMsg | The error message when the heartbeat of the current BE fails. | +| Version | The version information of the current BE. | +| Status | Some status information of the current BE, displayed in JSON format, including: lastSuccessReportTabletsTime, lastStreamLoadTime, isQueryDisabled, isLoadDisabled, etc. It should be noted that the information saved in different versions may vary slightly. | +| HeartbeatFailureCounter | The number of consecutive failed heartbeats of the current BE. If the number exceeds the `max_backend_heartbeat_failure_tolerance_count` configured by the FE Master (the default value is 1), the `Alive` field will be set to false. | +| NodeRole | The role of the current BE. There are two types: `mix` is the default role, and `computation` means that the current node is only used for federated analysis queries. | + +## Access Control Requirements + +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|------------|----|----| +| ADMIN_PRIV | | | + +## Usage Notes + +If further filtering of the query results is required, the table-valued function [backends()](../../../sql-functions/table-valued-functions/backends.md) can be used. SHOW BACKENDS is equivalent to the following statement: +```sql +SELECT * FROM BACKENDS(); +``` +## Examples +```sql +SHOW BACKENDS; +``` +```text ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| 10002 | 127.0.0.1 | 9050 | 9060 | 8040 | 8060 | 10040 | 2025-01-20 02:11:39 | 2025-01-21 11:52:40 | true | false | 281 | 9.690 MB | 0.000 | 10.505 GB | 71.750 GB | 85.36 % | 85.36 % | 0.000 | {"location" : "default"} | | doris-2.1.7-rc03-443e87e203 | {"lastSuccessReportTabletsTime":"2025-01-21 11:51:59","lastStreamLoadTime":1737460114345,"isQueryDisabled":false,"isLoadDisabled":false} | 0 | mix | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +``` diff --git a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md index ba4b3dafcdcd6..08b4ff0537f8a 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md +++ b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md @@ -24,36 +24,66 @@ specific language governing permissions and limitations under the License. --> - - - - ## Description -This statement is used to view FE nodes +This statement is used to view the basic status information of the FE nodes. -grammar: +## Syntax ```sql -SHOW FRONTENDS; +SHOW FRONTENDS ``` -illustrate: - -1. name indicates the name of the FE node in bdbje. -2. If Join is true, it means that the node has joined the cluster before. But it does not mean that it is still in the cluster (may have lost contact) -3. Alive indicates whether the node is alive or not. -4. ReplayedJournalId indicates the maximum metadata journal id that has been replayed by the node. -5. LastHeartbeat is the last heartbeat. -6. IsHelper indicates whether the node is a helper node in bdbje. -7. ErrMsg is used to display the error message when the heartbeat fails. -8. CurrentConnected indicates whether the FE node is currently connected - - +## Return Value + +| Column | Note | +|--------------------|-----------------------------------------------------------------------------------------------| +| Name | The name of the current FE in Doris. This name is usually a random string prefixed with `fe`. | +| Host | The IP address or host name of the current FE. | +| EditLogPort | The bdbje communication port of the current FE. | +| HttpPort | The http communication port of the current FE. | +| QueryPort | The MySQL protocol communication port of the current FE. | +| RpcPort | The thrift RPC communication port of the current FE. | +| ArrowFlightSqlPort | The ArrowFlight protocol communication port of the current FE. | +| Role | The role of the current FE. Possible values are FOLLOWER and OBSERVER. | +| IsMaster | Whether the current FE is elected as the Master. | +| ClusterId | The ID of the current Doris cluster, usually a randomly generated number. | +| Join | Used to indicate whether the current FE node has successfully joined the current Doris cluster. | +| Alive | Whether the current FE is alive. | +| ReplayedJournalId | The ID of the largest metadata log that the current FE has replayed. | +| LastStartTime | The timestamp when the current FE started. | +| LastHeartbeat | The timestamp of the last successful heartbeat sent by the current FE. | +| IsHelper | Whether the current FE is a helper node in bdbje. | +| ErrMsg | The error message when the heartbeat of the current FE fails. | +| Version | The version information of the current FE. | +| CurrentConnected | Whether the current client connection is connected to the current FE node. | + +## Access Control Requirements + +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|------------|----|----| +| ADMIN_PRIV | | | + +## Usage Notes + +If you need to further filter the query results, you can use the table-valued function [frontends()](../../../sql-functions/table-valued-functions/frontends.md). SHOW FRONTENDS is equivalent to the following statement: -## Keywords - -SHOW, FRONTENDS +```sql +SELECT * FROM FRONTENDS(); +``` +## Examples +```sql +SHOW FRONTENDS +``` +```text ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| Name | Host | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role | IsMaster | ClusterId | Join | Alive | ReplayedJournalId | LastStartTime | LastHeartbeat | IsHelper | ErrMsg | Version | CurrentConnected | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| fe_65a0c6f0_b31f_42ac_bd20_26d851299f1a | 127.0.0.1 | 9010 | 8030 | 9030 | 9020 | 10030 | FOLLOWER | true | 840241689 | true | true | 302891 | 2025-01-20 02:11:39 | 2025-01-21 09:48:36 | true | | doris-2.1.7-rc03-443e87e203 | Yes | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +``` From e94174ba462017367ab76e94a0d4d9e2a1d55f6b Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 15:48:04 +0800 Subject: [PATCH 11/13] update 2.1 --- .../instance-management/ADD-BACKEND.md | 65 +++++++---- .../CANCEL-DECOMMISSION-BACKEND.md | 64 +++++++---- .../DECOMMISSION-BACKEND.md | 75 ++++++++----- .../instance-management/DROP-BACKEND.md | 73 +++++++++---- .../instance-management/MODIFY-BACKEND.md | 102 +++++++++--------- .../instance-management/SHOW-BACKENDS.md | 84 ++++++++++----- .../instance-management/SHOW-FRONTENDS.md | 68 +++++++++--- .../instance-management/ADD-BACKEND.md | 68 +++++++----- .../CANCEL-DECOMMISSION-BACKEND.md | 64 +++++++---- .../DECOMMISSION-BACKEND.md | 74 ++++++++----- .../instance-management/DROP-BACKEND.md | 76 ++++++++----- .../instance-management/MODIFY-BACKEND.md | 99 ++++++++--------- .../instance-management/SHOW-BACKENDS.md | 81 +++++++++----- .../instance-management/SHOW-FRONTENDS.md | 70 ++++++++---- 14 files changed, 686 insertions(+), 377 deletions(-) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index ada58a4105efd..a0f8161133f99 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -24,38 +24,63 @@ specific language governing permissions and limitations under the License. --> +## 描述 +ADD BACKEND 命令用于向 Doris 集群中添加一个或多个 BE 节点。此命令允许管理员指定新 BE 节点的主机和端口,以及可选的属性来配置它们的行为。 +## 语法 +```sql +ALTER SYSTEM ADD BACKEND ":"[,":"...] [PROPERTIES (""="" [, ...] )] +``` -## 描述 +## 必选参数 -该语句用于操作一个系统内的节点。(仅管理员使用!) +**1. ``** -语法: +> 可以是 BE 节点的主机名或 IP 地址 -```sql -1) 增加节点 - ALTER SYSTEM ADD BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; -``` +**2. ``** - 说明: +> BE 节点的心跳端口,默认为 9050 -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 增加和删除节点为同步操作。这两种操作不考虑节点上已有的数据,节点直接从元数据中删除,请谨慎使用。 +## 可选参数 -## 示例 +**1. PROPERTIES ("key"="value", ...)** + +> 一组键值对,用于定义 BE 节点的附加属性。这些属性可用于自定义正在添加的 BE 的配置。可用属性包括: +> - `tag.location`:指定 BE 节点所属的资源组。 + +## 权限控制 - 1. 增加一个节点 - - ```sql - ALTER SYSTEM ADD BACKEND "host:port"; - ``` +执行此 SQL 命令的用户必须至少具有以下权限: -## 关键词 +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | - ALTER, SYSTEM, ADD, BACKEND, ALTER SYSTEM +## 注意事项 -## 最佳实践 +1. 在添加新的 BE 节点之前,确保节点已正确配置并运行。 +2. 使用[Resource Group](../../../../admin-manual/workload-management/resource-group.md)可以帮助您更好地管理和组织集群中的 BE 节点。 +3. 添加多个 BE 节点时,可以在一个命令中指定它们,以提高效率。 +4. 添加 BE 节点后,使用[`SHOW BACKENDS`](./SHOW-BACKENDS.md)命令验证它们是否已成功添加并处于正常状态。 +5. 考虑在不同的物理位置或机架上添加 BE 节点,以提高集群的可用性和容错能力。 +6. 定期检查和平衡集群中的负载,确保新添加的 BE 节点得到适当利用。 + +## 示例 +1. 不带附加属性添加 BE + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.1:9050,192.168.0.2:9050"; + ``` + 此命令向集群添加两个 BE 节点: + * 192.168.0.1,端口 9050 + * 192.168.0.2,端口 9050 + 未指定附加属性,因此将应用默认设置。 + +2. 添加指定资源组的 BE + ```sql + ALTER SYSTEM ADD BACKEND "doris-be01:9050" PROPERTIES ("tag.location" = "groupb"); + ``` + 此命令将单个 BE 节点(主机名 doris-be01,端口 9050)添加到集群中的资源组`groupb`。 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md index 3812e5079db69..ee5c5d69faa6a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md @@ -24,43 +24,63 @@ specific language governing permissions and limitations under the License. --> - - ## 描述 -该语句用于撤销一个节点下线操作。(仅管理员使用!) +该语句用于撤销一个 BE 节点下线操作。 -语法: - -- 通过 host 和 port 查找 backend +## 语法 ```sql -CANCEL DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +CANCEL DECOMMISSION BACKEND "" [, "" ... ] ``` -- 通过 backend_id 查找 backend +其中: ```sql -CANCEL DECOMMISSION BACKEND "id1","id2","id3..."; +be_identifier + : ":" + | "" ``` -## 示例 +## 必选参数 + +**1. ** + +> 可以是 BE 节点的主机名或 IP 地址 + +**2. ** - 1. 取消两个节点的下线操作: - - ```sql - CANCEL DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` +> BE 节点的心跳端口,默认为 9050 - 2. 取消 backend_id 为 1 的节点的下线操作: +**3. ** - ```sql - CANCEL DECOMMISSION BACKEND "1","2"; - ``` +> BE 节点的 ID -## 关键词 +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: - CANCEL, DECOMMISSION, CANCEL ALTER +## 权限控制 + +执行此 SQL 命令的用户必须至少具有以下权限: + +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | + +## 注意事项 + +1. 执行此命令后,可以通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查看下线状态(`SystemDecommissioned`列的值为`false`)和下线进度(`TabletNum`列的值不再缓慢下降) +2. 集群会重新慢慢的把其他节点的 tablet 迁移回当前 BE,使得最终每台 BE 的 tablet 数量趋于相近 + +## 示例 -## 最佳实践 +1. 根据 BE 的 Host 和 HeartbeatPort 从集群中安全下线两个节点 + ```sql + CANCEL DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` +2. 根据 BE 的 ID 从集群中安全下线一个节点 + ```sql + CANCEL DECOMMISSION BACKEND "10002"; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md index cc5b92dbd8dcd..dd2833fe01eff 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md @@ -24,47 +24,70 @@ specific language governing permissions and limitations under the License. --> - - ## 描述 -节点下线操作用于安全下线节点。该操作为异步操作。如果成功,节点最终会从元数据中删除。如果失败,则不会完成下线(仅管理员使用!) - -语法: +该语句用于将 BE 节点安全地从集群中下线。该操作为异步操作。 -- 通过 host 和 port 查找 backend +## 语法 ```sql -ALTER SYSTEM DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +ALTER SYSTEM DECOMMISSION BACKEND "" [, "" ... ] ``` -- 通过 backend_id 查找 backend +其中: ```sql -ALTER SYSTEM DECOMMISSION BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` - 说明: -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 节点下线操作用于安全下线节点。该操作为异步操作。如果成功,节点最终会从元数据中删除。如果失败,则不会完成下线。 -4. 可以手动取消节点下线操作。详见 CANCEL DECOMMISSION +## 必选参数 -## 示例 +**1. ** -1. 下线两个节点 +> 可以是 BE 节点的主机名或 IP 地址 - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` - - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "id1", "id2"; - ``` +**2. ** + +> BE 节点的心跳端口,默认为 9050 + +**3. ** + +> BE 节点的 ID -## 关键词 +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: - ALTER, SYSTEM, DECOMMISSION, BACKEND, ALTER SYSTEM +## 权限控制 -## 最佳实践 +执行此 SQL 命令的用户必须至少具有以下权限: +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | + +## 注意事项 + +1. 执行此命令后,可以通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查看下线状态(`SystemDecommissioned`列的值为`true`)和下线进度(`TabletNum`列的值会缓慢降到 0) +2. 通常情况下,在`TabletNum`列的值会降到 0 后,此 BE 节点就会被删除,如果您不希望 Doris 自动删除 BE,可以更改 FE Master 的配置`drop_backend_after_decommission`为 false +3. 当前 BE 如果存储的数据量比较大,那么 DECOMMISSION 操作可能持续几个小时甚至是几天 +4. 如果 DECOMMISSION 操作的进度卡住不动,具体表现为[SHOW BACKENDS](./SHOW-BACKENDS.md)语句中的`TabletNum`列一直固定在某个值,那么可能是以下的一些情况: + - 当前 BE 上的 tablet 找不到合适的其他 BE 去迁移,比如在一个 3 节点的集群有一张 3 副本的表,要下线其中一个节点,那么该节点找不到其他 BE 可用来迁移数据(其他两个 BE 已经各有一个副本了) + - 当前 BE 上的 tablet 还在[回收站](../../recycle/SHOW-CATALOG-RECYCLE-BIN.md)中,可以[清空回收站](../../recycle/DROP-CATALOG-RECYCLE-BIN.md)后,再等待 + - 当前 BE 上的 tablet 太大,导致在迁移单个 tablet 时,一直因为超时而无法将这个 tablet 迁移走,可以调整 FE Master 的配置`max_clone_task_timeout_sec`为一个更大的值(默认为 7200 秒) + - 当前 BE 上的 tablet 存在未完成的事务,可以等事务完成或手动中止事务 + - 其他情况可以在 FE Master 的日志过滤`replicas to decommission`关键字,找出异常的 tablet,使用[SHOW TABLET](../../table-and-view/data-and-status-management/SHOW-TABLET.md)语句找到该 tablet 所属的表,然后重新建一张新的表,将数据从旧表迁移至新表,最后使用[DROP TABLE FORCE](../../table-and-view/table/DROP-TABLE.md)的方式将旧表删除掉 + +## 示例 + +1. 根据 BE 的 Host 和 HeartbeatPort 从集群中安全下线两个节点 + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` + +2. 根据 BE 的 ID 从集群中安全下线一个节点 + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "10002"; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md index ec04fca8f9abf..62891d7a94453 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md @@ -24,46 +24,73 @@ specific language governing permissions and limitations under the License. --> - ## 描述 -该语句用于删除 BACKEND 节点(仅管理员使用!) - -语法: +该语句用于将 BE 节点从 Doris 集群中删除。 -- 通过 host 和 port 查找 backend +## 语法 ```sql -ALTER SYSTEM DROP BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] +ALTER SYSTEM DROP BACKEND "" [, "" ... ] ``` -- 通过 backend_id 查找 backend +其中: ```sql -ALTER SYSTEM DROP BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` -说明: +## 必选参数 -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 增加和删除节点为同步操作。这两种操作不考虑节点上已有的数据,节点直接从元数据中删除,请谨慎使用。 +**1. ** -## 示例 +> 可以是 BE 节点的主机名或 IP 地址 + +**2. ** + +> BE 节点的心跳端口,默认为 9050 + +**3. ** + +> BE 节点的 ID + +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: + +## 权限控制 + +执行此 SQL 命令的用户必须至少具有以下权限: + +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | -1. 删除两个节点 +## 注意事项 +1. 不推荐使用该命令下线 BE,该命令会直接将 BE 直接从集群中删去,当前节点的数据并不会负载均衡到其他 BE 节点,如果集群存在单副本的表,那么就有可能出现数据丢失的情况。更好的做法是使用[DECOMMISSION BACKEND](./DECOMMISSION-BACKEND.md)命令优雅下线 BE。 +2. 由于此操作是高危操作,因此当直接运行此命令时: ```sql - ALTER SYSTEM DROP BACKEND "host1:port", "host2:port"; + ALTER SYSTEM DROP BACKEND "127.0.0.1:9050"; + ``` + ```text + ERROR 1105 (HY000): errCode = 2, detailMessage = It is highly NOT RECOMMENDED to use DROP BACKEND stmt.It is not safe to directly drop a backend. All data on this backend will be discarded permanently. If you insist, use DROPP instead of DROP + ``` + 会出现以上提示信息,如果您明白您当前所做的事情,可将`DROP`关键字替换成`DROPP`,并继续下去: + ```sql + ALTER SYSTEM DROPP BACKEND "127.0.0.1:9050"; ``` - - ```sql - ALTER SYSTEM DROP BACKEND "id1", "id2"; - ``` - -## 关键词 - ALTER, SYSTEM, DROP, BACKEND, ALTER SYSTEM +## 示例 -## 最佳实践 +1. 根据 BE 的 Host 和 HeartbeatPort 从集群中删除两个节点 + ```sql + ALTER SYSTEM DROPP BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` +2. 根据 BE 的 ID 从集群中删除一个节点 + ```sql + ALTER SYSTEM DROPP BACKEND "10002"; + ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 23bbc22fcd1e6..c41035329572b 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -3,7 +3,6 @@ "title": "MODIFY BACKEND", "language": "zh-CN" } - --- +## 描述 +该语句用于修改 BE 节点属性,修改 BE 节点属性后,会影响到当前的节点的查询、写入和数据分布。以下是支持修改的属性: -## 描述 +| 属性 | 影响 | +|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------| +| `tag.location` | BE 的标签名,默认值为`default`。修改后,会影响到同一标签组内的 BE 数据均衡,以及在建表时,数据分布的 BE 节点。更多信息可参考[Resource Group](../../../../admin-manual/workload-management/resource-group.md) | +| `disable_query` | 是否禁用查询,默认为`false`。设置为`true`后,将不会再有新的查询请求规划到这台 BE 节点上。 | +| `disable_load` | 是否禁用导入,默认为`false`。设置为`true`后,将不会再有新的导入请求规划到这台 BE 节点上。 | -修改 BE 节点属性(仅管理员使用!) +## 语法 -语法: +```sql +ALTER SYSTEM MODIFY BACKEND [, [...] ] +SET ( + "" = "" +) +``` -- 通过 host 和 port 查找 backend +其中: - ```sql - ALTER SYSTEM MODIFY BACKEND "host:heartbeat_port" SET ("key" = "value"[, ...]); - ``` +```sql +be_identifier + : ":" + | "" +``` -- 通过 backend_id 查找 backend +## 必选参数 - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("key" = "value"[, ...]); - ``` +**1. ** -说明: +> 可以是 BE 节点的主机名或 IP 地址 -1. host 可以是主机名或者 ip 地址 -2. heartbeat_port 为该节点的心跳端口 -3. 修改 BE 节点属性目前支持以下属性: +**2. ** -- tag.xxx:资源标签 -- disable_query: 查询禁用属性 -- disable_load: 导入禁用属性 +> BE 节点的心跳端口,默认为 9050 -注: -1. 可以给一个 Backend 设置多种资源标签。但必须包含 "tag.location"。 +**3. ** -## 示例 +> BE 节点的 ID -1. 修改 BE 的资源标签 +:::tip +``、``及``均可通过[SHOW BACKENDS](./SHOW-BACKENDS.md)语句查询获得。 +::: - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` +## 权限控制 - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` +执行此 SQL 命令的用户必须至少具有以下权限: -2. 修改 BE 的查询禁用属性 - - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_query" = "true"); - ``` +| 权限 | 对象 | 说明 | +|-----------|----|----| +| NODE_PRIV | | | - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_query" = "true"); - ``` +## 注意事项 -3. 修改 BE 的导入禁用属性 - - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_load" = "true"); - ``` +由于此操作是针对整个 BE 级别的,影响面较广,如果操作不慎,可能会影响到整个集群的正常查询、导入甚至是建表操作。请谨慎操作。 - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_load" = "true"); - ``` +## 示例 -## 关键词 +1. 修改 BE 的资源标签 - ALTER, SYSTEM, ADD, BACKEND, ALTER SYSTEM +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("tag.location" = "group_a"); +``` -## 最佳实践 +2. 修改 BE 的查询禁用属性 + +```sql +ALTER SYSTEM MODIFY BACKEND "10002" SET ("disable_query" = "true"); +``` +3. 修改 BE 的导入禁用属性 + +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("disable_load" = "true"); +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md index 063106833e23c..b6964e9af3501 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md @@ -24,38 +24,72 @@ specific language governing permissions and limitations under the License. --> - - - ## 描述 -该语句用于查看 cluster 内的 BE 节点 +该语句用于查看 BE 节点的基本状态信息。 + +## 语法 ```sql - SHOW BACKENDS; + SHOW BACKENDS ``` -说明: - -1. LastStartTime 表示最近一次 BE 启动时间。 -2. LastHeartbeat 表示最近一次心跳。 -3. Alive 表示节点是否存活。 -4. SystemDecommissioned 为 true 表示节点正在安全下线中。 -5. ClusterDecommissioned 为 true 表示节点正在冲当前 cluster 中下线。 -6. TabletNum 表示该节点上分片数量。 -7. DataUsedCapacity 表示实际用户数据所占用的空间。 -8. AvailCapacity 表示磁盘的可使用空间。 -9. TotalCapacity 表示总磁盘空间。TotalCapacity = AvailCapacity + DataUsedCapacity + 其他非用户数据文件占用空间。 -10. UsedPct 表示磁盘已使用量百分比。 -11. ErrMsg 用于显示心跳失败时的错误信息。 -12. Status 用于以 JSON 格式显示 BE 的一些状态信息,目前包括最后一次 BE 汇报其 tablet 的时间信息。 -13. HeartbeatFailureCounter:现在当前连续失败的心跳次数,如果次数超过 `max_backend_heartbeat_failure_tolerance_count` 配置,则 isAlive 字段会置为 false。 -14. NodeRole 用于展示节点角色,现在有两种类型:Mix 代表原来的节点类型,computation 代表只做计算的节点类型。 - +## 返回值 + +| 列名 | 说明 | +|-------------------------|------------------------------------------------------------------------------------------------------------------| +| BackendId | 当前 BE 的 ID | +| Host | 当前 BE 的 IP 地址或主机名 | +| HeartbeatPort | 当前 BE 的心跳服务通信端口 | +| BePort | 当前 BE 的 thrift RPC 通信端口 | +| HttpPort | 当前 BE 的 http 通信端口 | +| BrpcPort | 当前 BE 的 bRPC 通信端口 | +| ArrowFlightSqlPort | 当前 BE 的 ArrowFlight 协议通信端口 | +| LastStartTime | 当前 BE 启动的时间戳 | +| LastHeartbeat | 当前 BE 上一次成功发送心跳的时间戳 | +| Alive | 当前 BE 是否存活 | +| SystemDecommissioned | 该值为 true 时,表示当前 BE 节点正在安全下线中 | +| TabletNum | 当前 BE 上存储的数据分片数量 | +| DataUsedCapacity | 当前 BE 数据所占用的磁盘空间 | +| TrashUsedCapacity | 当前 BE 垃圾回收站中数据所占用的磁盘空间 | +| AvailCapacity | 当前 BE 可用的磁盘空间 | +| TotalCapacity | 当前 BE 总的磁盘空间,TotalCapacity = AvailCapacity + TrashUsedCapacity + DataUsedCapacity + 其他非用户数据文件占用空间 | +| UsedPct | 当前 BE 所有磁盘总的已使用量百分比 | +| MaxDiskUsedPct | 当前 BE 所有磁盘的已使用量百分比中最大的一个 | +| RemoteUsedCapacity | 当前 BE 在使用了冷热分层功能后,上传到远端存储的数据占用空间 | +| Tag | 当前 BE 的标签信息,以 JSON 格式展示,保存当前 BE 资源组名称 | +| ErrMsg | 当前 BE 心跳失败时的错误信息 | +| Version | 当前 BE 的版本信息 | +| Status | 当前 BE 的一些状态信息,以 JSON 格式展示,包括:上一次成功上报 tablet 的时间、上一次 StreamLoad 的时间、是否允许查询、是否允许导入等,需要注意的是,不同版本保存的信息会有些许差异 | +| HeartbeatFailureCounter | 当前 BE 连续失败的心跳次数,如果次数超过 FE Master 配置`max_backend_heartbeat_failure_tolerance_count`(默认值为 1),则 `Alive` 字段会置为 false | +| NodeRole | 当前 BE 的角色,有两种:`mix`是默认的角色,`computation`表示当前节点只用于联邦分析查询 | + +## 权限控制 + +执行此 SQL 命令的用户必须至少具有以下权限: + +| 权限 | 对象 | 说明 | +|------------|----|----| +| ADMIN_PRIV | | | + +## 注意事项 + +如果需要对查询结果进行进一步的过滤,可以使用表值函数[backends()](../../../sql-functions/table-valued-functions/backends.md)。`SHOW BACKENDS` 与下面语句等价: -## 关键词 +```sql +SELECT * FROM BACKENDS(); +``` - SHOW, BACKENDS +## 示例 -## 最佳实践 +```sql +SHOW BACKENDS; +``` +```text ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| 10002 | 127.0.0.1 | 9050 | 9060 | 8040 | 8060 | 10040 | 2025-01-20 02:11:39 | 2025-01-21 11:52:40 | true | false | 281 | 9.690 MB | 0.000 | 10.505 GB | 71.750 GB | 85.36 % | 85.36 % | 0.000 | {"location" : "default"} | | doris-2.1.7-rc03-443e87e203 | {"lastSuccessReportTabletsTime":"2025-01-21 11:51:59","lastStreamLoadTime":1737460114345,"isQueryDisabled":false,"isLoadDisabled":false} | 0 | mix | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md index 83a58ae587832..a6d70c788b11a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md @@ -24,32 +24,66 @@ specific language governing permissions and limitations under the License. --> - ## 描述 - 该语句用于查看 FE 节点 +该语句用于查看 FE 节点的基本状态信息。 - 语法: +## 语法 ```sql -SHOW FRONTENDS; +SHOW FRONTENDS ``` -说明: -1. name 表示该 FE 节点在 bdbje 中的名称。 -2. Join 为 true 表示该节点曾经加入过集群。但不代表当前还在集群内(可能已失联) -3. Alive 表示节点是否存活。 -4. ReplayedJournalId 表示该节点当前已经回放的最大元数据日志 id。 -5. LastHeartbeat 是最近一次心跳。 -6. IsHelper 表示该节点是否是 bdbje 中的 helper 节点。 -7. ErrMsg 用于显示心跳失败时的错误信息。 -8. CurrentConnected 表示是否是当前连接的 FE 节点 +## 返回值 -## 示例 +| 列名 | 说明 | +|--------------------|--------------------------------------------| +| Name | 当前 FE 在此 Doris 中的名称,该名称通常是一个以`fe`为前缀的随机字符串 | +| Host | 当前 FE 的 IP 地址或主机名 | +| EditLogPort | 当前 FE 的 bdbje 通信端口 | +| HttpPort | 当前 FE 的 http 通信端口 | +| QueryPort | 当前 FE 的 MySQL 协议通信端口 | +| RpcPort | 当前 FE 的 thrift RPC 通信端口 | +| ArrowFlightSqlPort | 当前 FE 的 ArrowFlight 协议通信端口 | +| Role | 当前 FE 的角色,可能的值有 FOLLOWER 和 OBSERVER | +| IsMaster | 当前 FE 是否被选举为 Master | +| ClusterId | 当前 Doris 集群的 ID,通常为一个随机生成的数字 | +| Join | 用于表示当前 FE 节点是否成功加入当前 Doris 集群 | +| Alive | 当前 FE 是否存活 | +| ReplayedJournalId | 当前 FE 已经回放的最大元数据日志 ID | +| LastStartTime | 当前 FE 启动的时间戳 | +| LastHeartbeat | 当前 FE 上一次成功发送心跳的时间戳 | +| IsHelper | 当前 FE 是否为 bdbje 中的 helper 节点 | +| ErrMsg | 当前 FE 心跳失败时的错误信息 | +| Version | 当前 FE 的版本信息 | +| CurrentConnected | 当前客户端链接是否连接了当前 FE 节点 | + +## 权限控制 + +执行此 SQL 命令的用户必须至少具有以下权限: -## 关键词 +| 权限 | 对象 | 说明 | +|------------|----|----| +| ADMIN_PRIV | | | - SHOW, FRONTENDS +## 注意事项 -## 最佳实践 +如果需要对查询结果进行进一步的过滤,可以使用表值函数[frontends()](../../../sql-functions/table-valued-functions/frontends.md)。`SHOW FRONTENDS` 与下面语句等价: + +```sql +SELECT * FROM FRONTENDS(); +``` +## 示例 + +```sql +SHOW FRONTENDS +``` + +```text ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| Name | Host | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role | IsMaster | ClusterId | Join | Alive | ReplayedJournalId | LastStartTime | LastHeartbeat | IsHelper | ErrMsg | Version | CurrentConnected | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| fe_65a0c6f0_b31f_42ac_bd20_26d851299f1a | 127.0.0.1 | 9010 | 8030 | 9030 | 9020 | 10030 | FOLLOWER | true | 840241689 | true | true | 302891 | 2025-01-20 02:11:39 | 2025-01-21 09:48:36 | true | | doris-2.1.7-rc03-443e87e203 | Yes | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +``` diff --git a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md index 9cc8ae15fc490..158951313bf06 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md +++ b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/ADD-BACKEND.md @@ -24,51 +24,63 @@ specific language governing permissions and limitations under the License. --> - - ## Description -The ADD BACKEND command is used to add one or more backend nodes to a Doris OLAP database cluster. This command allows administrators to specify the host and port of the new backend nodes, along with optional properties that configure their behavior. +The ADD BACKEND is used to add one or more BE nodes to the Doris cluster. This command allows administrators to specify the host and port of the new BE nodes, as well as optional properties to configure their behavior. -grammar: +## Syntax ```sql --- Add nodes (add this method if you do not use the multi-tenancy function) - ALTER SYSTEM ADD BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] [PROPERTIES ("key"="value", ...)]; -```` +ALTER SYSTEM ADD BACKEND ":"[,":" [, ...]] [PROPERTIES (""="" [, ...] )] +``` -### Parameters +## Required Parameters -* `host` can be a hostname or an ip address of the backend node while `heartbeat_port` is the heartbeat port of the node -* `PROPERTIES ("key"="value", ...)`: (Optional) A set of key-value pairs that define additional properties for the backend nodes. These properties can be used to customize the configuration of the backends being added. Available properties include: +**1. ** - * tag.location: Specifies the resource group where the backend node belongs. For example, PROPERTIES ("tag.location" = "groupb"). +> It can be the hostname or IP address of the BE node. -## Examples +**2. ** - 1. Adding Backends Without Additional Properties +> The heartbeat port of the BE node, the default is 9050. - ```sql - ALTER SYSTEM ADD BACKEND "host1:9020,host2:9020"; - ```` +## Optional Parameters - This command adds two backend nodes to the cluster: +**1. `PROPERTIES (""="" [, ... ] )`** - * host1 with port 9020 - * host2 with port 9020 +> A set of key-value pairs used to define additional properties of the BE node. These properties can be used to customize the configuration of the BE being added. Available properties include: +> - `tag.location`: Used to specify the Resource Group to which the BE node belongs. - No additional properties are specified, so the default settings will apply to these backends. +## Access Control Requirements -2. Adding Backends With Resource Group +The user executing this SQL must have at least the following permissions: - ```sql - ALTER SYSTEM ADD BACKEND "host3:9020" PROPERTIES ("tag.location" = "groupb"); - ```` +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | - This command adds a single backend node (host3 with port 9020) to the cluster in resource group `groupb`: +## Usage Notes -## Keywords +1. Before adding a new BE node, make sure the node is correctly configured and running. +2. Using [Resource Group](../../../../admin-manual/workload-management/resource-group.md) can help you better manage and organize the BE nodes in the cluster. +3. When adding multiple BE nodes, you can specify them in one command to improve efficiency. +3. After adding the BE nodes, use the [`SHOW BACKENDS`](./SHOW-BACKENDS.md) to verify whether they have been successfully added and are in a normal state. +4. Consider adding BE nodes in different physical locations or racks to improve the availability and fault tolerance of the cluster. +5. Regularly check and balance the load in the cluster to ensure that the newly added BE nodes are properly utilized. - ALTER, SYSTEM, ADD, BACKEND, PROPERTIES +## Examples -## Best Practice +1. Add BE nodes without additional properties + ```sql + ALTER SYSTEM ADD BACKEND "192.168.0.1:9050,192.168.0.2:9050"; + ``` + This command adds two BE nodes to the cluster: + * 192.168.0.1,port 9050 + * 192.168.0.2,port 9050 + No additional properties are specified, so the default settings will be applied. + +2. Add a BE node to a specified Resource Group + ```sql + ALTER SYSTEM ADD BACKEND "doris-be01:9050" PROPERTIES ("tag.location" = "groupb"); + ``` + This command adds a single BE node (hostname doris-be01, port 9050) to the Resource Group `groupb` in the cluster. diff --git a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md index 45d62b9882ec5..7f61946aa88fe 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md +++ b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/CANCEL-DECOMMISSION-BACKEND.md @@ -24,43 +24,63 @@ specific language governing permissions and limitations under the License. --> - - ## Description -This statement is used to undo a node offline operation. (Administrator only!) +This statement is used to cancel the decommissioning operation of a BE node. -grammar: - -- Find backend through host and port +## Syntax ```sql -CANCEL DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +CANCEL DECOMMISSION BACKEND "" [, "" ... ] ``` -- Find backend through backend_id +Where: ```sql -CANCEL DECOMMISSION BACKEND "id1","id2","id3..."; +be_identifier + : ":" + | "" ``` -## Examples +## Required Parameters + +**** + +> It can be the hostname or IP address of the BE node. + +**** - 1. Cancel the offline operation of both nodes: +> The heartbeat port of the BE node, the default is 9050. - ```sql - CANCEL DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` +**** - 2. Cancel the offline operation of the node with backend_id 1: - - ```sql - CANCEL DECOMMISSION BACKEND "1","2"; - ``` +> The ID of the BE node. -## Keywords +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: - CANCEL, DECOMMISSION, CANCEL ALTER +## Access Control Requirements + +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +1. After executing this command, you can view the decommissioning status (the value of the `SystemDecommissioned` column is false) and the decommissioning progress (the value of the `TabletNum` column no longer decreases slowly) through the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +2. The cluster will slowly migrate the tablets from other nodes back to the current BE, so that the number of tablets on each BE will eventually tend to approach. + +## Examples -## Best Practice +1. Safely decommission two nodes from the cluster according to the Host and HeartbeatPort of the BE. + ```sql + CANCEL DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` +2. Safely decommission one node from the cluster according to the ID of the BE. + ```sql + CANCEL DECOMMISSION BACKEND "10002"; + ``` diff --git a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md index f7168898ce04b..f33136e8da5da 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md +++ b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DECOMMISSION-BACKEND.md @@ -24,50 +24,70 @@ specific language governing permissions and limitations under the License. --> - - - - ## Description -The node offline operation is used to safely log off the node. The operation is asynchronous. If successful, the node is eventually removed from the metadata. If it fails, the logout will not be done (only for admins!) - -grammar: +This statement is used to safely decommission a BE node from the cluster. This operation is asynchronous. -- Find backend through host and port +## Syntax ```sql -ALTER SYSTEM DECOMMISSION BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...]; +ALTER SYSTEM DECOMMISSION BACKEND "" [, "" ... ] ``` -- Find backend through backend_id +Where: ```sql -ALTER SYSTEM DECOMMISSION BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` - illustrate: +## Required Parameters -1. host can be a hostname or an ip address -2. heartbeat_port is the heartbeat port of the node -3. The node offline operation is used to safely log off the node. The operation is asynchronous. If successful, the node is eventually removed from the metadata. If it fails, the logout will not be completed. -4. You can manually cancel the node offline operation. See CANCEL DECOMMISSION +**1. ** -## Examples +> It can be the hostname or IP address of the BE node. -1. Offline two nodes +**2. ** - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "host1:port", "host2:port"; - ``` +> The heartbeat port of the BE node, the default is 9050. - ```sql - ALTER SYSTEM DECOMMISSION BACKEND "id1", "id2"; - ``` +**3. ** -## Keywords +> The ID of the BE node. - ALTER, SYSTEM, DECOMMISSION, BACKEND, ALTER SYSTEM +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: -## Best Practice +## Access Control Requirements +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +1. After executing this command, you can use the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement to view the decommissioning status (the value of the `SystemDecommissioned` column is `true`) and the decommissioning progress (the value of the `TabletNum` column will slowly drop to 0). +2. Under normal circumstances, after the value of the `TabletNum` column drops to 0, this BE node will be deleted. If you do not want Doris to automatically delete the BE, you can change the configuration `drop_backend_after_decommission` of the FE Master to false. +3. If the current BE stores a relatively large amount of data, the DECOMMISSION operation may last for several hours or even days. +4. If the progress of the DECOMMISSION operation gets stuck, specifically, the `TabletNum` column in the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement remains fixed at a certain value, it may be due to the following situations: + - There is no suitable other BE to migrate the tablets on the current BE. For example, in a 3-node cluster with a table having 3 replicas, if one of the nodes is to be decommissioned, this node cannot find other BEs to migrate the data (the other two BEs already have one replica each). + - The tablets on the current BE are still in the [Recycle Bin](../../recycle/SHOW-CATALOG-RECYCLE-BIN.md). You can [empty the recycle bin](../../recycle/DROP-CATALOG-RECYCLE-BIN.md) and then wait for decommission. + - The tablet on the current BE is too large, causing the migration of a single tablet to always timeout and unable to migrate this tablet away. You can adjust the configuration `max_clone_task_timeout_sec` of the FE Master to a larger value (the default is 7200 seconds). + - There are unfinished transactions on the tablets of the current BE. You can wait for the transactions to complete or manually abort the transactions. + - In other cases, you can filter the keyword `replicas to decommission` in the logs of the FE Master to find the abnormal tablet, use the [SHOW TABLET](../../table-and-view/data-and-status-management/SHOW-TABLET.md) statement to find the table to which this tablet belongs, then create a new table, migrate the data from the old table to the new table, and finally use the [DROP TABLE FORCE](../../table-and-view/table/DROP-TABLE.md) to delete the old table. + +## Examples + +1. Safely decommission two nodes from the cluster according to the Host and HeartbeatPort of the BE. + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` + +2. Safely decommission a node from the cluster according to the ID of the BE. + ```sql + ALTER SYSTEM DECOMMISSION BACKEND "10002"; + ``` diff --git a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md index 2029f00fb11a9..37af1df91d4e5 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md +++ b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/DROP-BACKEND.md @@ -24,47 +24,73 @@ specific language governing permissions and limitations under the License. --> - - - ## Description -This statement is used to delete the BACKEND node (administrator only!) +This statement is used to remove BE nodes from the Doris cluster. -grammar: - -- Find backend through host and port +## Syntax ```sql -ALTER SYSTEM DROP BACKEND "host:heartbeat_port"[,"host:heartbeat_port"...] +ALTER SYSTEM DROP BACKEND "" [, "" ... ] ``` -- Find backend through backend_id + +Where: ```sql -ALTER SYSTEM DROP BACKEND "id1","id2"...; +be_identifier + : ":" + | "" ``` -illustrate: +## Required Parameters -1. host can be a hostname or an ip address -2. heartbeat_port is the heartbeat port of the node -3. Adding and deleting nodes is a synchronous operation. These two operations do not consider the existing data on the node, and the node is directly deleted from the metadata, please use it with caution. +**1. ** -## Examples +> It can be the hostname or IP address of the BE node. -1. Delete two nodes +**2. ** - ```sql - ALTER SYSTEM DROP BACKEND "host1:port", "host2:port"; - ``` +> The heartbeat port of the BE node, the default is 9050. - ```sql - ALTER SYSTEM DROP BACKEND "ids1", "ids2"; - ``` +**3. ** -## Keywords +> The ID of the BE node. - ALTER, SYSTEM, DROP, BACKEND, ALTER SYSTEM +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: -## Best Practice +## Access Control Requirements +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +1. It is not recommended to use this command to take a BE node offline. This command will directly remove the BE node from the cluster. The data on the current node will not be load-balanced to other BE nodes. Data loss may occur if there are single-replica tables in the cluster. A better approach is to use the [DECOMMISSION BACKEND](./DECOMMISSION-BACKEND.md) command to gracefully take the BE node offline. +2. Since this operation is a high-risk operation, when you directly run this command: + ```sql + ALTER SYSTEM DROP BACKEND "127.0.0.1:9050"; + ``` + ```text + ERROR 1105 (HY000): errCode = 2, detailMessage = It is highly NOT RECOMMENDED to use DROP BACKEND stmt.It is not safe to directly drop a backend. All data on this backend will be discarded permanently. If you insist, use DROPP instead of DROP + ``` + The above prompt message will appear. If you understand what you are doing, you can replace the `DROP` keyword with `DROPP` and continue: + ```sql + ALTER SYSTEM DROPP BACKEND "127.0.0.1:9050"; + ``` + +## Examples + +1. Remove two nodes from the cluster based on the Host and HeartbeatPort of the BE nodes: + ```sql + ALTER SYSTEM DROPP BACKEND "192.168.0.1:9050", "192.168.0.2:9050"; + ``` + +2. Remove one node from the cluster based on the ID of the BE node: + ```sql + ALTER SYSTEM DROPP BACKEND "10002"; + ``` diff --git a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index d467192713261..e21195ff2e2a5 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -3,7 +3,6 @@ "title": "MODIFY BACKEND", "language": "en" } - --- - - - ## Description -Modify BE node properties (administrator only!) +This statement is used to modify the attributes of BE nodes. After modifying the attributes of BE nodes, it will affect the query, write, and data distribution of the current node. The following are the attributes that can be modified: -grammar: +| 属性 | 影响 | +|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `tag.location` | The resource tag of the BE, with the `default` value being default. After modification, it will affect the data balancing of BEs within the same tag group and the BE nodes for data distribution during table creation. For more information, please refer to[Resource Group](../../../../admin-manual/workload-management/resource-group.md) | +| `disable_query` | Whether to disable queries, with the default value being `false`. After setting it to `true`, no new query requests will be scheduled to this BE node. | +| `disable_load` | Whether to disable load, with the default value being `false`. After setting it to `true`, no new import requests will be scheduled to this BE node. | -- Find backend through host and port +## Syntax ```sql -ALTER SYSTEM MODIFY BACKEND "host:heartbeat_port" SET ("key" = "value"[, ...]); +ALTER SYSTEM MODIFY BACKEND [, ... ] +SET ( + "" = "" +) ``` -- Find backend through backend_id +Where: ```sql -ALTER SYSTEM MODIFY BACKEND "id1" SET ("key" = "value"[, ...]); +be_identifier + : ":" + | "" ``` - illustrate: +## Required Parameters -1. host can be a hostname or an ip address -2. heartbeat_port is the heartbeat port of the node -3. Modify BE node properties The following properties are currently supported: +**1. ** -- tag.xxxx: resource tag -- disable_query: query disable attribute -- disable_load: import disable attribute +> It can be the hostname or IP address of the BE node. -Note: -1. A backend can be set multi resource tags. But must contain "tag.location" type. +**2. ** -## Examples +> The heartbeat port of the BE node, the default is 9050. -1. Modify the resource tag of BE +**3. ** - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a"); - ALTER SYSTEM MODIFY BACKEND "id1" SET ("tag.location" = "group_a", "tag.compute" = "c1"); - ``` +> The ID of the BE node. -2. Modify the query disable property of BE +:::tip +``, ``, and `` can all be obtained by querying with the [SHOW BACKENDS](./SHOW-BACKENDS.md) statement. +::: - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_query" = "true"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_query" = "true"); - ``` +## Access Control Requirements -3. Modify the import disable property of BE +The user who executes this SQL must have at least the following permissions: - ```sql - ALTER SYSTEM MODIFY BACKEND "host1:heartbeat_port" SET ("disable_load" = "true"); - ``` - - ```sql - ALTER SYSTEM MODIFY BACKEND "id1" SET ("disable_load" = "true"); - ``` +| Privilege | Object | Notes | +|-----------|----|-------| +| NODE_PRIV | | | + +## Usage Notes + +Since this operation is at the entire BE level and has a wide impact, it may affect the normal querying, loading, and even table creation operations of the entire cluster if not performed carefully. Please operate with caution. -## Keywords +## Examples - ALTER, SYSTEM, ADD, BACKEND, ALTER SYSTEM +1. Modify the resource tag of the BE -## Best Practice +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("tag.location" = "group_a"); +``` + +2. Modify the `disable_query` attribute of the BE + +```sql +ALTER SYSTEM MODIFY BACKEND "10002" SET ("disable_query" = "true"); +``` +3. Modify the `disable_load` attribute of the BE + +```sql +ALTER SYSTEM MODIFY BACKEND "127.0.0.1:9050" SET ("disable_load" = "true"); +``` diff --git a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md index 4516a4b863ff3..01c1b100affaa 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md +++ b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-BACKENDS.md @@ -24,38 +24,71 @@ specific language governing permissions and limitations under the License. --> - - ## Description -This statement is used to view the BE nodes in the cluster +This statement is used to view the basic status information of BE nodes. + +## Syntax ```sql - SHOW BACKENDS; + SHOW BACKENDS ``` -illustrate: - - 1. LastStartTime indicates the last BE start time. - 2. LastHeartbeat indicates the last heartbeat. - 3. Alive indicates whether the node is alive or not. - 4. If SystemDecommissioned is true, it means that the node is being safely decommissioned. - 5. If ClusterDecommissioned is true, it means that the node is going offline in the current cluster. - 6. TabletNum represents the number of shards on the node. - 7. DataUsedCapacity Indicates the space occupied by the actual user data. - 8. AvailCapacity Indicates the available space on the disk. - 9. TotalCapacity represents the total disk space. TotalCapacity = AvailCapacity + DataUsedCapacity + other non-user data files occupy space. - 10. UsedPct Indicates the percentage of disk used. - 11. ErrMsg is used to display the error message when the heartbeat fails. - 12. Status is used to display some status information of BE in JSON format, including the time information of the last time BE reported its tablet. - 13. HeartbeatFailureCounter: The current number of heartbeats that have failed consecutively. If the number exceeds the `max_backend_heartbeat_failure_tolerance_count` configuration, the isAlive will be set to false. - 14. NodeRole is used to display the role of Backend node. Now there are two roles: mix and computation. Mix node represent the origin Backend node and computation Node represent the compute only node. +## Return Value -## Examples +| Column | Note | +|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| BackendId | The ID of the current BE. | +| Host | The IP address or host name of the current BE. | +| HeartbeatPort | The communication port of the heartbeat service of the current BE. | +| BePort | The thrift RPC communication port of the current BE. | +| HttpPort | The HTTP communication port of the current BE. | +| BrpcPort | The bRPC communication port of the current BE. | +| ArrowFlightSqlPort | The communication port of the ArrowFlight protocol of the current BE. | +| LastStartTime | The timestamp when the current BE started. | +| LastHeartbeat | The timestamp of the last successful heartbeat sent by the current BE. | +| Alive | Whether the current BE is alive. | +| SystemDecommissioned | When this value is true, it means that the current BE node is in the process of safe decommissioning. | +| TabletNum | The number of tablets stored on the current BE. | +| DataUsedCapacity | The disk space occupied by the data of the current BE. | +| TrashUsedCapacity | The disk space occupied by the data in the trash of the current BE. | +| AvailCapacity | The available disk space of the current BE. | +| TotalCapacity | The total disk space of the current BE. TotalCapacity = AvailCapacity + TrashUsedCapacity + DataUsedCapacity + Disk space occupied by other non-user data files. | +| UsedPct | The percentage of the total used disk space of the current BE. | +| MaxDiskUsedPct | The maximum percentage of the used disk space among all disks of the current BE. | +| RemoteUsedCapacity | The disk space occupied by the data uploaded to the remote storage after the hot and cold tiering function is used by the current BE. | +| Tag | The tag information of the current BE, displayed in JSON format. The name of the current BE resource group is saved. | +| ErrMsg | The error message when the heartbeat of the current BE fails. | +| Version | The version information of the current BE. | +| Status | Some status information of the current BE, displayed in JSON format, including: lastSuccessReportTabletsTime, lastStreamLoadTime, isQueryDisabled, isLoadDisabled, etc. It should be noted that the information saved in different versions may vary slightly. | +| HeartbeatFailureCounter | The number of consecutive failed heartbeats of the current BE. If the number exceeds the `max_backend_heartbeat_failure_tolerance_count` configured by the FE Master (the default value is 1), the `Alive` field will be set to false. | +| NodeRole | The role of the current BE. There are two types: `mix` is the default role, and `computation` means that the current node is only used for federated analysis queries. | + +## Access Control Requirements + +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|------------|----|----| +| ADMIN_PRIV | | | -## Keywords +## Usage Notes - SHOW, BACKENDS +If further filtering of the query results is required, the table-valued function [backends()](../../../sql-functions/table-valued-functions/backends.md) can be used. SHOW BACKENDS is equivalent to the following statement: +```sql +SELECT * FROM BACKENDS(); +``` -## Best Practice +## Examples +```sql +SHOW BACKENDS; +``` + +```text ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| BackendId | Host | HeartbeatPort | BePort | HttpPort | BrpcPort | ArrowFlightSqlPort | LastStartTime | LastHeartbeat | Alive | SystemDecommissioned | TabletNum | DataUsedCapacity | TrashUsedCapacity | AvailCapacity | TotalCapacity | UsedPct | MaxDiskUsedPct | RemoteUsedCapacity | Tag | ErrMsg | Version | Status | HeartbeatFailureCounter | NodeRole | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +| 10002 | 127.0.0.1 | 9050 | 9060 | 8040 | 8060 | 10040 | 2025-01-20 02:11:39 | 2025-01-21 11:52:40 | true | false | 281 | 9.690 MB | 0.000 | 10.505 GB | 71.750 GB | 85.36 % | 85.36 % | 0.000 | {"location" : "default"} | | doris-2.1.7-rc03-443e87e203 | {"lastSuccessReportTabletsTime":"2025-01-21 11:51:59","lastStreamLoadTime":1737460114345,"isQueryDisabled":false,"isLoadDisabled":false} | 0 | mix | ++-----------+-----------+---------------+--------+----------+----------+--------------------+---------------------+---------------------+-------+----------------------+-----------+------------------+-------------------+---------------+---------------+---------+----------------+--------------------+--------------------------+--------+-----------------------------+------------------------------------------------------------------------------------------------------------------------------------------+-------------------------+----------+ +``` diff --git a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md index 22554f71a4f71..08b4ff0537f8a 100644 --- a/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md +++ b/versioned_docs/version-2.1/sql-manual/sql-statements/cluster-management/instance-management/SHOW-FRONTENDS.md @@ -24,34 +24,66 @@ specific language governing permissions and limitations under the License. --> - - ## Description -This statement is used to view FE nodes +This statement is used to view the basic status information of the FE nodes. - grammar: +## Syntax ```sql -SHOW FRONTENDS; +SHOW FRONTENDS ``` -illustrate: +## Return Value + +| Column | Note | +|--------------------|-----------------------------------------------------------------------------------------------| +| Name | The name of the current FE in Doris. This name is usually a random string prefixed with `fe`. | +| Host | The IP address or host name of the current FE. | +| EditLogPort | The bdbje communication port of the current FE. | +| HttpPort | The http communication port of the current FE. | +| QueryPort | The MySQL protocol communication port of the current FE. | +| RpcPort | The thrift RPC communication port of the current FE. | +| ArrowFlightSqlPort | The ArrowFlight protocol communication port of the current FE. | +| Role | The role of the current FE. Possible values are FOLLOWER and OBSERVER. | +| IsMaster | Whether the current FE is elected as the Master. | +| ClusterId | The ID of the current Doris cluster, usually a randomly generated number. | +| Join | Used to indicate whether the current FE node has successfully joined the current Doris cluster. | +| Alive | Whether the current FE is alive. | +| ReplayedJournalId | The ID of the largest metadata log that the current FE has replayed. | +| LastStartTime | The timestamp when the current FE started. | +| LastHeartbeat | The timestamp of the last successful heartbeat sent by the current FE. | +| IsHelper | Whether the current FE is a helper node in bdbje. | +| ErrMsg | The error message when the heartbeat of the current FE fails. | +| Version | The version information of the current FE. | +| CurrentConnected | Whether the current client connection is connected to the current FE node. | + +## Access Control Requirements + +The user who executes this SQL must have at least the following permissions: + +| Privilege | Object | Notes | +|------------|----|----| +| ADMIN_PRIV | | | + +## Usage Notes + +If you need to further filter the query results, you can use the table-valued function [frontends()](../../../sql-functions/table-valued-functions/frontends.md). SHOW FRONTENDS is equivalent to the following statement: -1. name indicates the name of the FE node in bdbje. -2. If Join is true, it means that the node has joined the cluster before. But it does not mean that it is still in the cluster (may have lost contact) -3. Alive indicates whether the node is alive or not. -4. ReplayedJournalId indicates the maximum metadata journal id that has been replayed by the node. -5. LastHeartbeat is the last heartbeat. -6. IsHelper indicates whether the node is a helper node in bdbje. -7. ErrMsg is used to display the error message when the heartbeat fails. -8. CurrentConnected indicates whether the FE node is currently connected +```sql +SELECT * FROM FRONTENDS(); +``` ## Examples -## Keywords - - SHOW, FRONTENDS - -## Best Practice +```sql +SHOW FRONTENDS +``` +```text ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| Name | Host | EditLogPort | HttpPort | QueryPort | RpcPort | ArrowFlightSqlPort | Role | IsMaster | ClusterId | Join | Alive | ReplayedJournalId | LastStartTime | LastHeartbeat | IsHelper | ErrMsg | Version | CurrentConnected | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +| fe_65a0c6f0_b31f_42ac_bd20_26d851299f1a | 127.0.0.1 | 9010 | 8030 | 9030 | 9020 | 10030 | FOLLOWER | true | 840241689 | true | true | 302891 | 2025-01-20 02:11:39 | 2025-01-21 09:48:36 | true | | doris-2.1.7-rc03-443e87e203 | Yes | ++-----------------------------------------+-----------+-------------+----------+-----------+---------+--------------------+----------+----------+-----------+------+-------+-------------------+---------------------+---------------------+----------+--------+-----------------------------+------------------+ +``` From 758d4e51d35fe20be6582f6df5be5dbbead3db83 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 15:50:30 +0800 Subject: [PATCH 12/13] update --- .../instance-management/MODIFY-BACKEND.md | 4 +--- .../instance-management/MODIFY-BACKEND.md | 6 ++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 416961da36c42..02c1925c2731e 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -35,7 +35,7 @@ under the License. | `disable_load` | 是否禁用导入,默认为`false`。设置为`true`后,将不会再有新的导入请求规划到这台 BE 节点上。 | :::tip -This statement is not supported in decoupling storage and computing mode. +存算分离模式暂不支持此命令。 ::: ## 语法 @@ -85,8 +85,6 @@ be_identifier 由于此操作是针对整个 BE 级别的,影响面较广,如果操作不慎,可能会影响到整个集群的正常查询、导入甚至是建表操作。请谨慎操作。 -存算分离模式暂不支持此命令。 - ## 示例 1. 修改 BE 的资源标签 diff --git a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index a7e373fd4d2b6..fc935b3346501 100644 --- a/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/versioned_docs/version-3.0/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -34,6 +34,10 @@ This statement is used to modify the attributes of BE nodes. After modifying the | `disable_query` | Whether to disable queries, with the default value being `false`. After setting it to `true`, no new query requests will be scheduled to this BE node. | | `disable_load` | Whether to disable load, with the default value being `false`. After setting it to `true`, no new import requests will be scheduled to this BE node. | +:::tip +This command is not supported in the decoupling storage and computing mode. +::: + ## Syntax ```sql @@ -81,8 +85,6 @@ The user who executes this SQL must have at least the following permissions: Since this operation is at the entire BE level and has a wide impact, it may affect the normal querying, loading, and even table creation operations of the entire cluster if not performed carefully. Please operate with caution. -This command is not supported in the decoupling storage and computing mode. - ## Examples 1. Modify the resource tag of the BE From c1a91be845bbc72f59a130192be3e3cdf84f6494 Mon Sep 17 00:00:00 2001 From: yagagagaga Date: Wed, 22 Jan 2025 15:52:13 +0800 Subject: [PATCH 13/13] update --- .../instance-management/MODIFY-BACKEND.md | 6 ++++-- .../instance-management/MODIFY-BACKEND.md | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index a7e373fd4d2b6..fc935b3346501 100644 --- a/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/docs/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -34,6 +34,10 @@ This statement is used to modify the attributes of BE nodes. After modifying the | `disable_query` | Whether to disable queries, with the default value being `false`. After setting it to `true`, no new query requests will be scheduled to this BE node. | | `disable_load` | Whether to disable load, with the default value being `false`. After setting it to `true`, no new import requests will be scheduled to this BE node. | +:::tip +This command is not supported in the decoupling storage and computing mode. +::: + ## Syntax ```sql @@ -81,8 +85,6 @@ The user who executes this SQL must have at least the following permissions: Since this operation is at the entire BE level and has a wide impact, it may affect the normal querying, loading, and even table creation operations of the entire cluster if not performed carefully. Please operate with caution. -This command is not supported in the decoupling storage and computing mode. - ## Examples 1. Modify the resource tag of the BE diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md index 416961da36c42..02c1925c2731e 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/cluster-management/instance-management/MODIFY-BACKEND.md @@ -35,7 +35,7 @@ under the License. | `disable_load` | 是否禁用导入,默认为`false`。设置为`true`后,将不会再有新的导入请求规划到这台 BE 节点上。 | :::tip -This statement is not supported in decoupling storage and computing mode. +存算分离模式暂不支持此命令。 ::: ## 语法 @@ -85,8 +85,6 @@ be_identifier 由于此操作是针对整个 BE 级别的,影响面较广,如果操作不慎,可能会影响到整个集群的正常查询、导入甚至是建表操作。请谨慎操作。 -存算分离模式暂不支持此命令。 - ## 示例 1. 修改 BE 的资源标签