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 36526200B32 for ; Thu, 9 Jun 2016 00:42:21 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 34FFD160A35; Wed, 8 Jun 2016 22:42:21 +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 7D1BD160A2E for ; Thu, 9 Jun 2016 00:42:20 +0200 (CEST) Received: (qmail 62259 invoked by uid 500); 8 Jun 2016 22:42:19 -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 62239 invoked by uid 99); 8 Jun 2016 22:42:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2016 22:42:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id AB34DC0748 for ; Wed, 8 Jun 2016 22:42:18 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.147 X-Spam-Level: X-Spam-Status: No, score=-0.147 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id bwi6ROC4uLE5 for ; Wed, 8 Jun 2016 22:42:16 +0000 (UTC) Received: from BLU004-OMC2S33.hotmail.com (blu004-omc2s33.hotmail.com [65.55.111.108]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 540F05F20E for ; Wed, 8 Jun 2016 22:42:16 +0000 (UTC) Received: from BLU436-SMTP180 ([65.55.111.73]) by BLU004-OMC2S33.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 8 Jun 2016 15:42:11 -0700 X-TMN: [Z3j3Mdu3oQ3VNoIc3gFk54Fb9iWuSLhC] X-Originating-Email: [msegel_hadoop@hotmail.com] Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_8C2030A8-5200-4080-AAE0-84CD79DF4CAF" MIME-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Creating a Hive table through Spark and potential locking issue (a bug) From: Michael Segel In-Reply-To: Date: Wed, 8 Jun 2016 15:42:08 -0700 CC: David Newberger , "user @spark" References: To: user@hive.apache.org X-Mailer: Apple Mail (2.3124) X-OriginalArrivalTime: 08 Jun 2016 22:42:10.0416 (UTC) FILETIME=[FE4E4700:01D1C1D6] archived-at: Wed, 08 Jun 2016 22:42:21 -0000 --Apple-Mail=_8C2030A8-5200-4080-AAE0-84CD79DF4CAF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="windows-1252" > On Jun 8, 2016, at 3:35 PM, Eugene Koifman = wrote: >=20 > if you split =93create table test.dummy as select * from = oraclehadoop.dummy;=94 > into create table statement, followed by insert into test.dummy as = select=85 you should see the behavior you expect with Hive. > Drop statement will block while insert is running. >=20 > Eugene >=20 OK, assuming true=85=20 Then the ddl statement is blocked because Hive sees the table in use.=20 If you can confirm this to be the case, and if you can confirm the same = for spark and then you can drop the table while spark is running, then = you would have a bug since Spark in the hive context doesn=92t set any = locks or improperly sets locks.=20 I would have to ask which version of hive did you build spark against? =20= That could be another factor. HTH -Mike --Apple-Mail=_8C2030A8-5200-4080-AAE0-84CD79DF4CAF Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="windows-1252"
On Jun 8, 2016, at 3:35 PM, Eugene Koifman <ekoifman@hortonworks.com> wrote:

if you split =93create = table test.dummy as select * from oraclehadoop.dummy;=94
into create table statement, followed by insert into = test.dummy as select=85 you should see the behavior you expect with = Hive.
Drop statement will block while insert is running.

Eugene


OK, assuming = true=85 

Then the ddl statement = is blocked because Hive sees the table in use. 

If you can confirm this to be the case, and if you = can confirm the same for spark and then you can drop the table while = spark is running, then you would have a bug since Spark in the hive = context doesn=92t set any locks or improperly sets = locks. 

I would have to ask = which version of hive did you build spark against?  
That = could be another factor.

HTH

-Mike


= --Apple-Mail=_8C2030A8-5200-4080-AAE0-84CD79DF4CAF--