Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BA383200B6A for ; Mon, 22 Aug 2016 20:28:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B8C5B160AB3; Mon, 22 Aug 2016 18:28:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D93E0160A87 for ; Mon, 22 Aug 2016 20:28:27 +0200 (CEST) Received: (qmail 62581 invoked by uid 500); 22 Aug 2016 18:28:26 -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 62571 invoked by uid 99); 22 Aug 2016 18:28:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2016 18:28:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 27CDA1A5477 for ; Mon, 22 Aug 2016 18:28:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id E8EAmo9VZnSf for ; Mon, 22 Aug 2016 18:28:24 +0000 (UTC) Received: from mail-qt0-f172.google.com (mail-qt0-f172.google.com [209.85.216.172]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id CCFDE5FAE7 for ; Mon, 22 Aug 2016 18:28:23 +0000 (UTC) Received: by mail-qt0-f172.google.com with SMTP id 93so1179933qtg.2 for ; Mon, 22 Aug 2016 11:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=8TftNIJ+SyLlAj+uRf0ZopzuwFCwHeWDpOM7jbl5sZw=; b=xr56TvQqhQHwJ60xjxODiyE/w/J+E2Ck1whYvKg0pGp7i/VX/aslTE6RljvGHlxGwk OAioSyEGqrF8iWndybCz23CLj6Zb3fd7cy9JJTlscpgqIbZiz5KCWU90koFKafwFx/j9 I8V3IooZW6cg7ZX+mIa3CMFaztMRYJ4s5ktzNa2RhDFoGYz/r91jjqAtwQe7I6U5kcE+ MOBk6chaaOwY5G7pw6w8tWt7/XT0slIud3gnTP22V95MRVHxJ4llCFIZSstD5SJViwVL RHNYZcmrWkGfShcx4BP2TSxFw8/Uiq2zxHgnw8UKiP63Y53ERGUC63we1D1OoeUSgB3Q m+Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=8TftNIJ+SyLlAj+uRf0ZopzuwFCwHeWDpOM7jbl5sZw=; b=LBKAhSVOFXe0gEjVJquhSP6ZIStDIgk3iuK4pfwgmK2T4ixpzx0KfpbZpP+aJFWcBh 8udAX0vP6QxB9C/YguwwZ+4Y8QMwSqL1yEC2tw0UqVHXaqX6j3BlMS+WMi7yyb/W4u+9 AjNIqWeGEqBv1wk0m9pStKGwxogF4KabKalJ8ENTTkfCttKHJV4SwCcZalEHq67O2xWR Xn8aJqJIys6WIG4i+p03+mXq57kxyRkFlr5ITmNWo9tK6rIQWVTkmjZEilI+QG9Odp3K nFwAB8ew6x0kSO47v1nuVaehndlYHHu/iI1ugdmNgb1j/qmyNnmymKW0RHfkFfDHImZ9 jT6A== X-Gm-Message-State: AEkooutMxxam36dI32HCdiaGQL4APyJPG0/k/1NUa3DAo9FvX0DlkNoMszQ8IDhH2PYIjvGbeBfa+ZvQsDnxsA== X-Received: by 10.237.60.112 with SMTP id u45mr25302760qte.27.1471890503241; Mon, 22 Aug 2016 11:28:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.67.136 with HTTP; Mon, 22 Aug 2016 11:28:22 -0700 (PDT) In-Reply-To: References: From: Mich Talebzadeh Date: Mon, 22 Aug 2016 19:28:22 +0100 Message-ID: Subject: Re: Hive transaction doesn't release lock. To: user Content-Type: multipart/alternative; boundary=94eb2c1902fe981237053aad36f6 archived-at: Mon, 22 Aug 2016 18:28:28 -0000 --94eb2c1902fe981237053aad36f6 Content-Type: text/plain; charset=UTF-8 there are issues with locks not being released even when the transaction is aborted. There are still entries in hive_locks. I ended up deleting the row from hive_locks table manually. Not ideal but you know that the lock should not be there as the table is dropped. HTH Dr Mich Talebzadeh LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw * http://talebzadehmich.wordpress.com *Disclaimer:* Use it at your own risk. Any and all responsibility for any loss, damage or destruction of data or any other property which may arise from relying on this email's technical content is explicitly disclaimed. The author will in no case be liable for any monetary damages arising from such loss, damage or destruction. On 22 August 2016 at 16:27, Igor Kuzmenko wrote: > Hello, I'm using Apache Hive 1.2.1 and Apache Storm to stream data in hive > table. > After making some tests I tried to truncate my table, but sql execution > doesn't complete because of the lock on table: > > > select * from HIVE_LOCKS; > > > # TXN_ID, TXN_STATE, TXN_STARTED, TXN_LAST_HEARTBEAT, TXN_USER, TXN_HOST, > TC_TXNID, TC_DATABASE, TC_TABLE, TC_PARTITION > '78461824', 'a', '1471762974000', '1471768488000', 'storm', 'sorm-data03. > msk.mts.ru', '78461824', 'default', 'data_http', 'dt=20160821' > > > > At the same time: > > select * from TXNS, TXN_COMPONENTS > where 1=1 > and TXNS.TXN_ID = TXN_COMPONENTS.TC_TXNID > and TXNS.TXN_ID = 78461824 > ; > > > # TXN_ID, TXN_STATE, TXN_STARTED, TXN_LAST_HEARTBEAT, TXN_USER, TXN_HOST, > TC_TXNID, TC_DATABASE, TC_TABLE, TC_PARTITION > 78461824, a, 1471762974000, 1471768488000, storm, sorm-data03.msk.mts.ru, > 78461824, default, data_http, dt=20160821 > > > Txn 78461824 is in aborted state, but still keep lock on table > 'data_http'. How can I avoid this? What should I do to get rid of that > lock? > > --94eb2c1902fe981237053aad36f6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
there are issues with locks not being released even w= hen=C2=A0the transaction is aborted. There are still entries in hive_locks.=

I ended up deleting the row from=C2=A0hive_locks = table manually. Not ideal but you know that the lock should not be there as= the table is dropped.

HTH

=

Dr Mich Talebzadeh

=C2=A0

LinkedIn =C2=A0https://www.linkedin.com/profile/view?id=3DAAEA= AAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw

=C2=A0

http:= //talebzadehmich.wordpress.com


Disclaimer:=C2=A0Use = it=C2=A0at your own risk. Any and all responsibilit= y for any loss, damage or destruction of data or any other property which may arise from relying on this email= 9;s=C2=A0technical=C2=A0content is explicitly disclaimed. The author will in no case be liable for any monetary damages arising from = such loss, damage or destruction.

=C2=A0

<= font color=3D"#000000" face=3D"Times New Roman" size=3D"3">

On 22 August 2016 at 16:27, Igor Kuzmenko <f1sherox@gmail.com> wrote:
Hello, I'm using Apache Hive 1.2.1 and Apache Storm t= o stream data in hive table.
After making some tests I=C2=A0tried=C2=A0= to truncate my table, but sql execution doesn'= ;t complete because of the lock on table:

select * from HIVE_LOCKS;

<= div>
# TXN_ID, TXN_STATE, TXN_STARTED, TXN_LAST_HEARTBEAT, TXN_USER, TXN_HOST, TC_TXNID, TC_DATABASE, TC_TABL= E, TC_PARTITION
'78461824', 'a', '14717629740= 00', '1471768488000', 'storm', 'sorm-data03.<= span>msk.mts.ru', '78461824= ', 'default', 'data_http', 'dt=3D20160821'



At the same = time:

select * from TXNS, TXN_COMPONENTS
where 1=3D1
=
and TXNS.TXN_ID = =3D TXN_COMPONENTS.TC_TXNID
and TXNS.TXN_ID =3D 78461824
;


<= div>
# TXN_ID, TXN_STATE, TXN_STARTED, TXN_LAST_HEARTBEAT, TXN_USER, TXN_HOST, TC_TXNID, TC_DATABASE, TC_TABL= E, TC_PARTITION
78461824, a, 1471762974000, 1471768488000, storm,= sorm-data03.msk.= mts.ru, 78461824, default, da= ta_http, dt=3D20160821

=

Txn 78461824 is in abor= ted state, but still keep lock on table 'data_http'. How can I avoi= d this? What should I do to get rid of that lock?=C2=A0


--94eb2c1902fe981237053aad36f6--