Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E375FE4E5 for ; Tue, 25 Jun 2013 17:22:47 +0000 (UTC) Received: (qmail 72875 invoked by uid 500); 25 Jun 2013 17:22:46 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 72801 invoked by uid 500); 25 Jun 2013 17:22:39 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 72789 invoked by uid 99); 25 Jun 2013 17:22:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jun 2013 17:22:38 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cschneiderpublic@gmail.com designates 74.125.82.45 as permitted sender) Received: from [74.125.82.45] (HELO mail-wg0-f45.google.com) (74.125.82.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jun 2013 17:22:31 +0000 Received: by mail-wg0-f45.google.com with SMTP id j13so9810265wgh.24 for ; Tue, 25 Jun 2013 10:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Atwzl37n0TUkUPkcMz57RaS2cY44eKuwOMGyyfhr0Do=; b=F9GbeP6kxPnNMOJcRtENRRujQkTUkY4PR2lF3pBEdbIZBtBBeKClGuiBe1Fk0YCO0f 5LMSAUvZxGRxPgNWgHIR2YdT7PyA4wFPuXFg8uWCSSCtDBG45xhGa8JNLztKnr0Wd6Wq IQe9kGW8kN2RW3gPfakPiof0a+5TRkPfGjCadINuKCRU7lqJKxuk2AAdiFRT4JPanQim k0Xsq1IL+RwiCoyI8DYMnYC6JkWY40wMHFTA/RZ5seMj4ZMpiNahMauKipOXx0fL0Dza YQ3PePTz+BUKXn7hhMH/Qo6HNE3+AB+HrYOew3bYgYQnhXDCBxrOgzavbKTKStRH0J40 zARQ== MIME-Version: 1.0 X-Received: by 10.180.207.43 with SMTP id lt11mr9722402wic.57.1372180931775; Tue, 25 Jun 2013 10:22:11 -0700 (PDT) Received: by 10.194.33.136 with HTTP; Tue, 25 Jun 2013 10:22:11 -0700 (PDT) In-Reply-To: References: Date: Tue, 25 Jun 2013 19:22:11 +0200 Message-ID: Subject: Re: How to terminate a running HIve Query? (Executed with JDBC, Hive Server 2) From: Christian Schneider To: user@hive.apache.org Content-Type: multipart/alternative; boundary=001a11c3f7ec01938604dffdc5ec X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3f7ec01938604dffdc5ec Content-Type: text/plain; charset=ISO-8859-1 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 > 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. > --001a11c3f7ec01938604dffdc5ec Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I figured out that there are two implementations of the Hi= ve JDBC driver in the hive-jdbc-0.10-cdh4.2.0 jar.

1.=A0= org.apache.hadoop.hive.jdbc.HiveStatement=A0
2. org.apache.hive.j= dbc.HiveStatement

The 1. implements .close() and .cancel() but it will no= t delete the running jobs on the cluster anyway.

A= ny suggestions?


2013/6/25 Christian Schneider <cschneiderpublic@gmail.com>=
Hi,
= is it possible to kill a running query (including all the hadoop jobs behin= d)?

I think it's not, because the Hive JDBC Driver doesn't implement .c= lose() 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 sto= p 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.


--001a11c3f7ec01938604dffdc5ec--