Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2654D17CFB for ; Mon, 9 Mar 2015 10:04:48 +0000 (UTC) Received: (qmail 38097 invoked by uid 500); 9 Mar 2015 10:04:38 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 38077 invoked by uid 500); 9 Mar 2015 10:04:38 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 38067 invoked by uid 99); 9 Mar 2015 10:04:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Mar 2015 10:04:38 +0000 Date: Mon, 9 Mar 2015 10:04:38 +0000 (UTC) From: "Lefty Leverenz (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-9118) Support auto-purge for tables, when dropping tables/partitions. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-9118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14352734#comment-14352734 ] Lefty Leverenz commented on HIVE-9118: -------------------------------------- Doc note: This is documented in the TBLPROPERTIES bullet item after the CREATE TABLE syntax in the DDL doc (please review). * [LanguageManual DDL -- Create Table | https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTable] > Support auto-purge for tables, when dropping tables/partitions. > --------------------------------------------------------------- > > Key: HIVE-9118 > URL: https://issues.apache.org/jira/browse/HIVE-9118 > Project: Hive > Issue Type: Bug > Components: Metastore > Affects Versions: 1.0.0, 1.1 > Reporter: Mithun Radhakrishnan > Assignee: Mithun Radhakrishnan > Fix For: 1.2.0 > > Attachments: HIVE-9118.1.patch, HIVE-9118.2.patch, HIVE-9118.3.patch > > > HIVE-7100 introduced a way to skip the trash directory, when deleting table-data, while dropping tables. > In HIVE-9083/HIVE-9086, I extended this to work when partitions are dropped. > Here, I propose a table-parameter ({{"auto.purge"}}) to set up tables to skip-trash when table/partition data is deleted, without needing to say "PURGE" on the Hive CLI. Apropos, on {{dropTable()}} and {{dropPartition()}}, table data is deleted directly (and not moved to trash) if the following hold true: > # The table is MANAGED. > # The {{deleteData}} parameter to the {{HMSC.drop*()}} methods is true. > # Either PURGE is explicitly specified on the command-line (or rather, {{"ifPurge"}} is set in the environment context, OR > # TBLPROPERTIES contains {{"auto.purge"="true"}} -- This message was sent by Atlassian JIRA (v6.3.4#6332)