CANCEL WARM UP
描述
用于在 Doris 终止指定的预热作业。
语法
CANCEL WARM UP JOB WHERE id = <id>;
必选参数
<id>
想要终止的预热任务的 id,可以通过命令
SHOW WARM UP JOB
查询得到。
权限控制
执行此 SQL 命令的用户必须至少具有 ADMIN_PRIV 权限。
示例
通过 SHOW WARM UP JOB
查询得到当前系统中运行的预热任务:
SHOW WARM UP JOB
其结果为:
+----------------+---------------+---------+-------+-------------------------+-------------+----------+------------+--------+
| JobId | ClusterName | Status | Type | CreateTime | FinishBatch | AllBatch | FinishTime | ErrMsg |
+----------------+---------------+---------+-------+-------------------------+-------------+----------+------------+--------+
| 90290165739458 | CloudCluster1 | RUNNING | TABLE | 2024-11-11 11:11:42.700 | 1 | 3 | NULL | |
+----------------+---------------+---------+-------+-------------------------+-------------+----------+------------+--------+
然后通过 CANCEL WARM UP
进行终止:
CANCEL WARM UP WHERE id = 90290165739458;
若返回以下内容则表明指定 id 对应的预热任务不存在:
ERROR 1105 (HY000): errCode = 2, detailMessage = job id: 110 does not exist.
正确返回后再次 SHOW WARM UP JOB
可以看到任务状态从 RUNNING 变更为 CANCELLED:
+----------------+---------------+-----------+-------+-------------------------+-------------+----------+-------------------------+-------------+
| JobId | ClusterName | Status | Type | CreateTime | FinishBatch | AllBatch | FinishTime | ErrMsg |
+----------------+---------------+-----------+-------+-------------------------+-------------+----------+-------------------------+-------------+
| 90290165739458 | CloudCluster1 | CANCELLED | TABLE | 2024-11-11 11:11:42.700 | 1 | 3 | 2024-11-11 11:11:43.700 | user cancel |
+----------------+---------------+-----------+-------+-------------------------+-------------+----------+-------------------------+-------------+