Reputation: 3305
I was trying to terminating a running HIVE query by CTRL + C , but when i was looking into the child node processes using JPS it was showing me below output:
23955 YarnChild
3020 DataNode
3140 NodeManager
24269 YarnChild
23861 YarnChild
24026 YarnChild
24202 YarnChild
23862 YarnChild
24083 YarnChild
24708 Jps
24147 YarnChild
Can anybody please tell me how to terminate all the processes in the child?
Upvotes: 1
Views: 1479
Reputation: 6430
Try WebHCat API from browser or command line, using utilities like Curl. Here's WebHCat API to delete a hive job
Also note that the link says that
The job is not immediately deleted, therefore the information returned may not reflect deletion, as in our example. Use GET jobs/:jobid to monitor the job and confirm that it is eventually deleted.
Upvotes: 0
Reputation: 2382
In my experience, if hive is killed using ctrl+c, it only terminates the hive JVM. The actual MR job is not killed.
Personally, I kill the actual MR job instead of killing hive JVM.
When hive query runs, it mentions the MR job's id that it has started. Note down that ID, and execute the following command on the namenode:
hadoop job -kill <my_job_id>
Once this job is killed, it automatically finishes the hive query. No need to restart the whole cluster.
Upvotes: 1