Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> How to terminate a running HIve Query? (Executed with JDBC, Hive Server 2)


Copy link to this message
-
Re: How to terminate a running HIve Query? (Executed with JDBC, Hive Server 2)
Well... if the query created a MR job on your cluster then there's always:

1. use jobtracker to find your job id.
2. use hadoop job -kill <job_id>  to nuke it.

you're saying there's no way to interrupt/kill the query from the client?
That very well may be the case.
On Tue, Jun 25, 2013 at 10:22 AM, Christian Schneider <
[EMAIL PROTECTED]> wrote:

> I figured out that there are two implementations of the Hive JDBC driver
> in the hive-jdbc-0.10-cdh4.2.0 jar.
>
> 1. org.apache.hadoop.hive.jdbc.HiveStatement
> 2. org.apache.hive.jdbc.HiveStatement
>
> The 1. implements .close() and .cancel() but it will not delete the
> running jobs on the cluster anyway.
>
> Any suggestions?
>
>
> 2013/6/25 Christian Schneider <[EMAIL PROTECTED]>
>
>> Hi,
>> is it possible to kill a running query (including all the hadoop jobs
>> behind)?
>>
>> I think it's not, because the Hive JDBC Driver doesn't implement .close()
>> and .cancel() on the (prepared) statement.
>>
>> This attached code shows the problem.
>>
>> Bevor the statement gets executed, it will spawn a Thread that tries to
>> stop the execution of the query after 10 sec.
>>
>> Are there any other ways to stop the job on the cluster?
>>
>> I could do it over the Job Client, but for that i need the JobId.
>>
>> Thanks a lot.
>>
>>
>> Best Regards,
>>
>> Christian.
>>
>
>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB