2shou
2shou

Reputation: 145

How to kill a mapred job started by hive?

I'm working by CDH 5.1 now. It starts normal Hadoop job by YARN but hive still works with mapred. Sometimes a big query will hang for a long time and I want to kill it.

I can find this big job by JobTracker web console while it didn't provide a button to kill it.

Another way is killing by command line. However, I couldn't find any job running by command line.

I have tried 2 commands:

How to kill big query like this?

Upvotes: 8

Views: 32030

Answers (1)

Harman
Harman

Reputation: 727

You can get the Job ID from Hive CLI when you run a job or from the Web UI. You can also list the job IDs using the application ID from resource manager. Ideally, you should get everything from

mapred job -list

or

hadoop job -list

Using the Job ID you can kill it by using the below command.

hadoop job -kill <job_id>

Another alternative would be to kill the application using

yarn application -kill <application_id>

Upvotes: 18

Related Questions