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 DC5DCE314 for ; Fri, 1 Feb 2013 16:55:12 +0000 (UTC) Received: (qmail 12987 invoked by uid 500); 1 Feb 2013 16:55:09 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 12678 invoked by uid 500); 1 Feb 2013 16:55:09 -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 12487 invoked by uid 99); 1 Feb 2013 16:55:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2013 16:55:02 +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 (athena.apache.org: domain of mslimotte@gmail.com designates 209.85.217.174 as permitted sender) Received: from [209.85.217.174] (HELO mail-lb0-f174.google.com) (209.85.217.174) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Feb 2013 16:54:57 +0000 Received: by mail-lb0-f174.google.com with SMTP id l12so4769554lbo.19 for ; Fri, 01 Feb 2013 08:54:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=yhLoD0o7Mv7ZVTOowVybXtTtEONhTh4BwNtm/y3Dj5o=; b=WQ9AHpWPdUErLMV0GCerBlXBuXBBUqBOU1Uvx8TEpeDv1mxsfVqEg2xuTjCcqgNGG2 FERe5ZkvicAjMOIaHeQ/VNusxkydwAHIdZrHPwO8xTP1ZbKKTeEGhwhk3QilgNoxynHc y4cTNvTbKVDMMewE/yjBjl9hYSqoZtVJ7MNDMfi5HHP+nUAt5wZv56ackMMv/hNa1bSV oSVRbzuvRgSaXAe6TyeYHgdH4xuV4oVzNTjTGqyUnjah4rCrGslN8S4Bh2qROC203aSl 9ntha7J6awArZ+kHNhS4rHdHCEMcgj0V9dAXHDcZY5gHvHRDZF00wub3KOl6AcShy9fu 4bbg== X-Received: by 10.112.98.166 with SMTP id ej6mr5027066lbb.62.1359737675559; Fri, 01 Feb 2013 08:54:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.129.137 with HTTP; Fri, 1 Feb 2013 08:54:15 -0800 (PST) In-Reply-To: References: From: Marc Limotte Date: Fri, 1 Feb 2013 08:54:15 -0800 Message-ID: Subject: Re: DROP TABLE does not respect the IF EXISTS clause To: user@hive.apache.org Cc: hive-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=f46d0401f96f23b5f504d4ac9959 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0401f96f23b5f504d4ac9959 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Created https://issues.apache.org/jira/browse/HIVE-3973 On Thu, Jan 31, 2013 at 5:02 PM, Mark Grover w= rote: > Thanks for the update, Marc. Could you please create a Hive JIRA for this= ? > Thanks! > > Harsh, it's most likely the case with your JIRA as well that the error > message is misleading. Thanks for reporting it! > > Mark > > On Thu, Jan 31, 2013 at 4:58 PM, Marc Limotte wrote= : > >> Thanks, Harsh. My issues seems to be related to the one-user limitatio= n >> of the derby metastore. Once that issue was resolved the "table not fou= nd" >> error went away. It was just a misleading error message. >> >> Marc >> >> >> On Thu, Jan 31, 2013 at 4:40 PM, Harsh J wrote: >> >>> Not sure how relevant it is but I faced a similar problem around ALTER >>> TABLE DROP PARTITION IF EXIST. >>> >>> See https://issues.apache.org/jira/browse/HIVE-3576 for the specific >>> issue and my commands to reproduce it, and also try to perhaps set >>> hive.exec.drop.ignorenonexistent to true to see if it changes anything >>> for you? >>> >>> On Fri, Feb 1, 2013 at 3:27 AM, Marc Limotte >>> wrote: >>> > Hi Mark, >>> > >>> > A table. But it doesn't seem to matter. I get this error on the DRO= P, >>> > before even attempting to create a table. I get the same thing for a= ny >>> > arbitrary table name. For example: >>> > >>> > hive> DROP TABLE IF EXISTS kdsjhfkjhds; >>> > FAILED: Error in semantic analysis: Table not found kdsjhfkjhds >>> > >>> > >>> > I think I found something, though. This install is still using the >>> Derby >>> > metastore, and the hive web service is running, so I'm getting errors >>> like >>> > "A read-only user or a user in a read-only database=85". I'm guessin= g >>> the >>> > error above is just a consequence of this one-user limitation. So, >>> the real >>> > issue is that the error message reported by "DROP TABLE IF EXISTS" is >>> > mis-leading and obscures the real problem. >>> > >>> > >>> > thanks, >>> > Marc >>> > >>> > On Thu, Jan 31, 2013 at 11:42 AM, Mark Grover < >>> grover.markgrover@gmail.com> >>> > wrote: >>> >> >>> >> Marc, >>> >> It seemed to work on my installation of Hive 0.9. Is this a table or= a >>> >> view you are trying to drop? >>> >> Mind sharing the create table definition? >>> >> >>> >> Mark >>> >> >>> >> >>> >> On Thu, Jan 31, 2013 at 10:42 AM, Marc Limotte >>> >> wrote: >>> >>> >>> >>> Hi, >>> >>> >>> >>> I'm testing with Hive 0.9.0 (in Amazon EC2, but NOT emr). I'm >>> >>> experiencing a problem where DROP TABLE does not respect the IF >>> EXISTS >>> >>> clause, so it still throws an error when the table doesn't exist an= d >>> this >>> >>> causes the script to stop executing. Here's what it looks like fro= m >>> the >>> >>> hive shell: >>> >>> >>> >>> hive> DROP TABLE IF EXISTS recalc_aggregate_premium; >>> >>> FAILED: Error in semantic analysis: Table not found >>> >>> recalc_aggregate_premium >>> >>> >>> >>> >>> >>> Marc >>> >>> >>> >>> >>> >> >>> > >>> >>> >>> >>> -- >>> Harsh J >>> >> >> > --f46d0401f96f23b5f504d4ac9959 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Created=A0https= ://issues.apache.org/jira/browse/HIVE-3973

On Thu, Jan 31, 2013 at 5:02 PM, Mark Grover <grover.markg= rover@gmail.com> wrote:
Thanks for the update, Marc. Could you pleas= e create a Hive JIRA for this? Thanks!

Harsh, it's m= ost likely the case with your JIRA as well that the error message is mislea= ding. Thanks for reporting it!

Mark
On Thu, Jan 31, 2013 at 4:58 PM, Marc Limotte = <mslimotte@gmail.com> wrote:
Thanks, Harsh. =A0 My issues seems to be related to the one-user limitation= of the derby metastore. =A0Once that issue was resolved the "table no= t found" error went away. =A0It was just a misleading error message.

Marc


On Thu, Jan 31, 2013 at 4:40= PM, Harsh J <harsh@cloudera.com> wrote:
Not sure how relevant it is but I faced a similar problem around ALTER
TABLE DROP PARTITION IF EXIST.

See https://issues.apache.org/jira/browse/HIVE-3576 for the specific=
issue and my commands to reproduce it, and also try to perhaps set
hive.exec.drop.ignorenonexistent to true to see if it changes anything
for you?

On Fri, Feb 1, 2013 at 3:27 AM, Marc Limotte <mslimotte@gmail.com> wrote:
> Hi Mark,
>
> A table. =A0But it doesn't seem to matter. =A0I get this error on = the DROP,
> before even attempting to create a table. =A0I get the same thing for = any
> arbitrary table name. =A0For example:
>
> hive> DROP TABLE IF EXISTS kdsjhfkjhds;
> FAILED: Error in semantic analysis: Table not found kdsjhfkjhds
>
>
> I think I found something, though. =A0This install is still using the = Derby
> metastore, and the hive web service is running, so I'm getting err= ors like
> "A read-only user or a user in a read-only database=85". =A0= I'm guessing the
> error above is just a consequence of this one-user limitation. =A0So, = the real
> issue is that the error message reported by "DROP TABLE IF EXISTS= " is
> mis-leading and obscures the real problem.
>
>
> thanks,
> Marc
>
> On Thu, Jan 31, 2013 at 11:42 AM, Mark Grover <grover.markgrover@gmail.com>
> wrote:
>>
>> Marc,
>> It seemed to work on my installation of Hive 0.9. Is this a table = or a
>> view you are trying to drop?
>> Mind sharing the create table definition?
>>
>> Mark
>>
>>
>> On Thu, Jan 31, 2013 at 10:42 AM, Marc Limotte <
mslimotte@gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm testing with Hive 0.9.0 (in Amazon EC2, but NOT emr). = =A0I'm
>>> experiencing a problem where DROP TABLE does not respect the I= F EXISTS
>>> clause, so it still throws an error when the table doesn't= exist and this
>>> causes the script to stop executing. =A0Here's what it loo= ks like from the
>>> hive shell:
>>>
>>> hive> DROP TABLE IF EXISTS recalc_aggregate_premium;
>>> FAILED: Error in semantic analysis: Table not found
>>> recalc_aggregate_premium
>>>
>>>
>>> Marc
>>>
>>>
>>
>



--
Harsh J



--f46d0401f96f23b5f504d4ac9959--