如何在工作流开始之前 kill/cancel 协调器操作?
How to kill/cancel a coordinator action before the workflow starts?
我需要一种方法来终止处于状态 READY
并且还没有工作流 ID 的协调器操作。
我的协调员长这样:
$ oozie job -info 0000123-000000123456789-oozie-oozi-C
Job ID : 0000123-000000123456789-oozie-oozi-C
------------------------------------------------------------------------------------------------------------------------------------
Job Name : test_1
App Path : /user/myuser1/workflows/test_workflow
Status : RUNNING
Start Time : 2021-02-16 08:01 GMT
End Time : 2021-02-16 12:01 GMT
Pause Time : -
Concurrency : 1
------------------------------------------------------------------------------------------------------------------------------------
ID Status Ext ID Err Code Created Nominal Time
0000123-000000123456789-oozie-oozi-C@1 SUCCEEDED 0000123-000000123456789-oozie-oozi-W - 2021-02-16 09:47 GMT 2021-02-16 08:01 GMT
------------------------------------------------------------------------------------------------------------------------------------
0000123-000000123456789-oozie-oozi-C@2 RUNNING 0000125-000000123456789-oozie-oozi-W - 2021-02-16 09:51 GMT 2021-02-16 09:01 GMT
------------------------------------------------------------------------------------------------------------------------------------
0000123-000000123456789-oozie-oozi-C@3 READY - - 2021-02-16 09:56 GMT 2021-02-16 10:01 GMT
------------------------------------------------------------------------------------------------------------------------------------
我需要能够以某种方式终止 0000123-000000123456789-oozie-oozi-C@3
,而我无法等到为操作分配工作流 ID,这似乎只发生在工作流应该开始之前.
我已经尝试了 oozie job -kill <coord action id>
和 oozie job -action <coord action id> -kill <coord action id>
但这给了我:
Error: E0605 : E0605: Action does not exist [select w.id, w.user, w.group, w.appName, w.statusStr, w.bundleId, w.appNamespace, w.doneMaterialization from CoordinatorJobBean w where w.id = :id]
结果命令是:
oozie job -kill <coordinator id> -action <action number>
因此,对于操作 0000123-000000123456789-oozie-oozi-C@3
,它看起来像这样:
$ oozie job -kill 0000123-000000123456789-oozie-oozi-C -action 3
Action ID Nominal Time
------------------------------------------------------------------------------------------------------------------------------------
0000123-000000123456789-oozie-oozi-C@3 2021-02-16 10:01 UTC
我需要一种方法来终止处于状态 READY
并且还没有工作流 ID 的协调器操作。
我的协调员长这样:
$ oozie job -info 0000123-000000123456789-oozie-oozi-C
Job ID : 0000123-000000123456789-oozie-oozi-C
------------------------------------------------------------------------------------------------------------------------------------
Job Name : test_1
App Path : /user/myuser1/workflows/test_workflow
Status : RUNNING
Start Time : 2021-02-16 08:01 GMT
End Time : 2021-02-16 12:01 GMT
Pause Time : -
Concurrency : 1
------------------------------------------------------------------------------------------------------------------------------------
ID Status Ext ID Err Code Created Nominal Time
0000123-000000123456789-oozie-oozi-C@1 SUCCEEDED 0000123-000000123456789-oozie-oozi-W - 2021-02-16 09:47 GMT 2021-02-16 08:01 GMT
------------------------------------------------------------------------------------------------------------------------------------
0000123-000000123456789-oozie-oozi-C@2 RUNNING 0000125-000000123456789-oozie-oozi-W - 2021-02-16 09:51 GMT 2021-02-16 09:01 GMT
------------------------------------------------------------------------------------------------------------------------------------
0000123-000000123456789-oozie-oozi-C@3 READY - - 2021-02-16 09:56 GMT 2021-02-16 10:01 GMT
------------------------------------------------------------------------------------------------------------------------------------
我需要能够以某种方式终止 0000123-000000123456789-oozie-oozi-C@3
,而我无法等到为操作分配工作流 ID,这似乎只发生在工作流应该开始之前.
我已经尝试了 oozie job -kill <coord action id>
和 oozie job -action <coord action id> -kill <coord action id>
但这给了我:
Error: E0605 : E0605: Action does not exist [select w.id, w.user, w.group, w.appName, w.statusStr, w.bundleId, w.appNamespace, w.doneMaterialization from CoordinatorJobBean w where w.id = :id]
结果命令是:
oozie job -kill <coordinator id> -action <action number>
因此,对于操作 0000123-000000123456789-oozie-oozi-C@3
,它看起来像这样:
$ oozie job -kill 0000123-000000123456789-oozie-oozi-C -action 3
Action ID Nominal Time
------------------------------------------------------------------------------------------------------------------------------------
0000123-000000123456789-oozie-oozi-C@3 2021-02-16 10:01 UTC