如何杀掉当前正在执行的hadoop任务

时间:2022-03-24 04:11:38

[root@Slave01 ~]# hadoop job -list
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

15/05/21 14:06:59 INFO client.RMProxy: Connecting to ResourceManager at Slave01/10.1.123.237:8032
Total jobs:4
JobId State StartTime UserName Queue Priority UsedContainers RsvdContainers UsedMem RsvdMem NeededMem AM info
job_1431677581601_0054 PREP 1432187050200 root root.root NORMAL 0 0 0M 0M 0M http://Slave01:8088/proxy/application_1431677581601_0054/
job_1431677581601_0055 PREP 1432187485803 root root.root NORMAL 0 0 0M 0M 0M http://Slave01:8088/proxy/application_1431677581601_0055/
job_1431677581601_0053 RUNNING 1432185508549 root root.root NORMAL 1 0 1024M 0M 1024M http://Slave01:8088/proxy/application_1431677581601_0053/
job_1431677581601_0052 RUNNING 1432185245303 root root.root NORMAL 1 1 1024M 2048M 3072M http://Slave01:8088/proxy/application_1431677581601_0052/

[root@Slave01 ~]# hadoop job -kill job_1431677581601_0055
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

15/05/21 14:08:43 INFO client.RMProxy: Connecting to ResourceManager at Slave01/10.1.123.237:8032
15/05/21 14:08:44 INFO impl.YarnClientImpl: Killed application application_1431677581601_0055
Killed job job_1431677581601_0055
You have new mail in /var/spool/mail/root
[root@Slave01 ~]# hadoop job -kill job_1431677581601_0054
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

15/05/21 14:08:55 INFO client.RMProxy: Connecting to ResourceManager at Slave01/10.1.123.237:8032
15/05/21 14:08:56 INFO impl.YarnClientImpl: Killed application application_1431677581601_0054
Killed job job_1431677581601_0054
[root@Slave01 ~]#

[root@Slave01 ~]# hadoop job -list

DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

15/05/21 14:09:24 INFO client.RMProxy: Connecting to ResourceManager at Slave01/10.1.123.237:8032
Total jobs:2
JobId State StartTime UserName Queue Priority UsedContainers RsvdContainers UsedMem RsvdMem NeededMem AM info
job_1431677581601_0053 RUNNING 1432185508549 root root.root NORMAL 1 0 1024M 0M 1024M http://Slave01:8088/proxy/application_1431677581601_0053/
job_1431677581601_0052 RUNNING 1432185245303 root root.root NORMAL 1 1 1024M 2048M 3072M http://Slave01:8088/proxy/application_1431677581601_0052/
[root@Slave01 ~]#