命令说明
如果rebalance 对象处于STARTING、RUNNING、PAUSED 状态,可以使用cancel
rebalance 命令终止rebalance 操作。
如果cancel rebalance 命令返回影响行数为1,
则
rebalance 操作终止成功;如果返回影响行数为0,则终止操作失败。
注意
如果rebalance 操作的running 状态进度已经超过了90%,那么执行cancel
命令不起作用
语法格式
cancel rebalance
GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
359
rebalance_options:
Table [[vc_name.]database_name.]table_name
| Database [vc_name.]database_name
| instance
表4- 45 参数说明
参数名称
描
述
table
[[vc_name.]database_name.]table_name
如果指定表处于STARTING 、
RUNNING、PAUSED 状态,可以使用
cancel rebalance命令终止rebalance操作。
如果cancel rebalance 命令返回影响行数
为1,则rebalance 操作终止成功;如果
返回影响行数为0,则终止操作失败。
database [vc_name.]database_name
cancel rebalance database 终止指定数据
库下所有处于STARTING、RUNNING、
PAUSED 状态表的rebalance 操作。
cancel
rebalance database 命令返回的影响行数
是成功终止的rebalance 任务数。
instance
cancel rebalance instance 终止当前实例下
所有处于STARTING 、RUNNING 、
PAUSED 状态表的rebalance 操作。
cancel
rebalance instance 命令返回的影响行数
是成功终止的rebalance 任务数。
示例
示例1:
gbase> select index_name, status, percentage
from gclusterdb.rebalancin
g_status;
+--------------+--------+------------+
| index_name
| status | percentage |
+--------------+--------+------------+
| test.testdis | PAUSED | 10
|
+--------------+--------+------------+
1 row in set
gbase> cancel rebalance table testdis;
Query OK, 1 row affected
gbase> select index_name, status, percentage
from gclusterdb.rebalancin
g_status;
+--------------+----------+------------+
| index_name
| status
| percentage |
+--------------+----------+------------+
GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
360
| test.testdis | CANCELED | 0
|
+--------------+----------+------------+
1 row in set
示例2:
gbase>
select
index_name,
status,
percentage
from
gclusterdb.rebalancing_status;
+---------------+---------+------------+
| index_name
| status
| percentage |
+---------------+---------+------------+
| test.testdis
| RUNNING | 10
|
| test.testrep
| RUNNING | 90
|
| test.testrand | STARTING| 0
|
+---------------+---------+------------+
3 rows in set
gbase> cancel rebalance database test ;
Query OK, 3 row affected
gbase>
select
index_name,
status,
percentage
from
gclusterdb.rebalancing_status;
+---------------+-----------+------------+
| index_name
| status
| percentage |
+---------------+-----------+------------+
| test.testdis
| CANCELED
| 0
|
| test.testrep
| COMPLETED | 100
|
| test.testrand | CANCELED
| 0
|
+---------------+-----------+------------+
3 rows in set
示例3:
gbase> cancel rebalance instance ;
Query OK, 4 rows affected
gbase>
select
index_name,
status,
percentage
from
gclusterdb.rebalancing_status;
+---------------+-----------+------------+
| index_name
| status
| percentage |
+---------------+-----------+------------+
| test.testrep
| COMPLETED | 100
|
| test.testdis
| CANCELED
| 0
|
| test.testrand | COMPLETED | 100
|
| test1.t1
| CANCELED
| 0
|
| test1.t3
| CANCELED
| 0
|
| test1.t2
| CANCELED
| 0
|
+---------------+-----------+------------+
GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
361
6 rows in set