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 01093112F2 for ; Tue, 22 Jul 2014 13:08:12 +0000 (UTC) Received: (qmail 73668 invoked by uid 500); 22 Jul 2014 13:08:10 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 73614 invoked by uid 500); 22 Jul 2014 13:08: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 73604 invoked by uid 99); 22 Jul 2014 13:08:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2014 13:08:09 +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 devopam@gmail.com designates 209.85.217.169 as permitted sender) Received: from [209.85.217.169] (HELO mail-lb0-f169.google.com) (209.85.217.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2014 13:08:06 +0000 Received: by mail-lb0-f169.google.com with SMTP id s7so6046688lbd.28 for ; Tue, 22 Jul 2014 06:07:42 -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=BC78+uDbUWeExITd3gPXNrsF/f/4+PpZUzG8roZtePs=; b=XH8yyUqj3gr05aZelCwZohqW2i9GcBxiCLm5E3tb/xvKJf9jq29xcFRmoCQO/WeCYB /dgUrfRDpNg2sPFTAsiDbJ3zclU41OQsjTDFXy5qrHDBnB8DHbsHG89lslvmsnRGzGuJ MWVVwALGDstkRzWk+cJv9HqsbKaDfxC8RvdxrWUp22y8qjivBufUKxfEYqc8uL2lG6P1 RE3VRpdXQ4C9H9lWrKhNd4DH3bHQXlfuMaHL5anVba3+IdP8MU5XY/u1DwzbdhpBBZHn QPzA5Q9rO6o360Bjj9syIj7IU8aytjMp3+t8iAy4JjQri826WDwf/GW3d21aTFmMgLz2 VE3Q== MIME-Version: 1.0 X-Received: by 10.152.115.197 with SMTP id jq5mr17971740lab.24.1406034462082; Tue, 22 Jul 2014 06:07:42 -0700 (PDT) Received: by 10.112.32.232 with HTTP; Tue, 22 Jul 2014 06:07:42 -0700 (PDT) In-Reply-To: References: Date: Tue, 22 Jul 2014 18:37:42 +0530 Message-ID: Subject: Re: Drop Partition by ID From: Devopam Mittra To: "user@hive.apache.org" Content-Type: multipart/alternative; boundary=001a11c34ba8a78c8f04fec7e80a X-Virus-Checked: Checked by ClamAV on apache.org --001a11c34ba8a78c8f04fec7e80a Content-Type: text/plain; charset=UTF-8 Please try using escape character around the '%' if not already done so. regards Dev On Mon, Jul 21, 2014 at 7:32 PM, fab wol wrote: > Hi everyone, > > I have the following problem: I have a partitoned managed table (Partition > table is a string which represents a date, eg. log-date="2014-07-15"). > Unfortunately there is one partition in there like this: > log_date=2014-07-15-23%3A45%3A38 (copied from show partitions stmt). This > partitions most likeley got created to a wrong script 8which is fixed). > > Now i want to delete this partition, but it doesn't work: > > - alter table ... drop partitition > (log_date='2014-07-15-23%3A45%3A38') gives no error, but the partition is > still existing afterwards > - I tried escaping the %-signs with backslashes but no luck with that > - I delete the directory in the HDFS and run msck repair table > afterwards. It recognizes that the folder is missing but is not deleting > the metadata > > So what can I do to get rid of the metadata? My next guess would be to go > directly to the metastore DB and delete the metadata there. But what > exactly has to be deleted? I guess there are several dependencies. > > Other idea: is there a possibility in Hive to delete a partition by a > unique ID or something like that? > > Or what is needed to delete the table with the normal "alter table drop > partition" command? > > Cheers > Wolli > -- Devopam Mittra Life and Relations are not binary --001a11c34ba8a78c8f04fec7e80a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Please try using escape character around the '%' i= f not already done so.

regards
Dev
=


On Mon, Jul 2= 1, 2014 at 7:32 PM, fab wol <darkwolli32@gmail.com> wrot= e:
Hi everyone,

=
I have the following problem: I have a partitoned managed table (Parti= tion table is a string which represents a date, eg. log-date=3D"2014-0= 7-15"). Unfortunately there is one partition in there like this: log_d= ate=3D2014-07-15-23%3A45%3A38 (copied from show partitions stmt). This part= itions most likeley got created to a wrong script 8which is fixed).

Now i want to delete this partition, but it doesn't= work:
  • alter table ... drop partitition (log_date=3D'= 2014-07-15-23%3A45%3A38') gives no error, but the partition is still ex= isting afterwards
  • I tried escaping the %-signs with backslashes but no luck with that
  • I delete the directory in the HDFS and run msck repair table afterward= s. It recognizes that the folder is missing but is not deleting the metadat= a
So what can I do to get rid of the metadata? My next guess would = be to go directly to the metastore DB and delete the metadata there. But wh= at exactly has to be deleted? I guess there are several dependencies.

Other idea: is there a possibility in Hive to del= ete a partition by a unique ID or something like that?

=
Or what is needed to delete the table with the normal "alter tabl= e drop partition" command?

Cheers
Wolli



--
Devopam Mitt= ra
Life and Relations are not binary
--001a11c34ba8a78c8f04fec7e80a--