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 D317917CAC for ; Wed, 15 Apr 2015 15:34:58 +0000 (UTC) Received: (qmail 78200 invoked by uid 500); 15 Apr 2015 15:34:58 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 78179 invoked by uid 500); 15 Apr 2015 15:34:58 -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 78169 invoked by uid 99); 15 Apr 2015 15:34:58 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Apr 2015 15:34:58 +0000 Date: Wed, 15 Apr 2015 15:34:58 +0000 (UTC) From: "Sushanth Sowmyan (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-10228) Changes to Hive Export/Import/DropTable/DropPartition to support replication semantics MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-10228?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1449= 6376#comment-14496376 ]=20 Sushanth Sowmyan commented on HIVE-10228: ----------------------------------------- RB link : https://reviews.apache.org/r/33224/ > Changes to Hive Export/Import/DropTable/DropPartition to support replicat= ion semantics > -------------------------------------------------------------------------= ------------- > > Key: HIVE-10228 > URL: https://issues.apache.org/jira/browse/HIVE-10228 > Project: Hive > Issue Type: Sub-task > Components: Import/Export > Affects Versions: 1.2.0 > Reporter: Sushanth Sowmyan > Assignee: Sushanth Sowmyan > Attachments: HIVE-10228.2.patch, HIVE-10228.3.patch, HIVE-10228.p= atch > > > We need to update a couple of hive commands to support replication semant= ics. To wit, we need the following: > EXPORT ... [FOR [METADATA] REPLICATION(=E2=80=9Ccomment=E2=80=9D)] > Export will now support an extra optional clause to tell it that this exp= ort is being prepared for the purpose of replication. There is also an addi= tional optional clause here, that allows for the export to be a metadata-on= ly export, to handle cases of capturing the diff for alter statements, for = example. > Also, if done for replication, the non-presence of a table, or a table be= ing a view/offline table/non-native table is not considered an error, and i= nstead, will result in a successful no-op. > IMPORT ... (as normal) =E2=80=93 but handles new semantics=20 > No syntax changes for import, but import will have to change to be able t= o handle all the permutations of export dumps possible. Also, import will h= ave to ensure that it should update the object only if the update being imp= orted is not older than the state of the object. Also, import currently doe= s not work with dbname.tablename kind of specification, this should be fixe= d to work. > DROP TABLE ... FOR REPLICATION('eventid') > Drop Table now has an additional clause, to specify that this drop table = is being done for replication purposes, and that the dop should not actuall= y drop the table if the table is newer than that event id specified. > ALTER TABLE ... DROP PARTITION (...) FOR REPLICATION('eventid') > Similarly, Drop Partition also has an equivalent change to Drop Table. > =3D > In addition, we introduce a new property "repl.last.id", which when tagge= d on to table properties or partition properties on a replication-destinati= on, holds the effective "state identifier" of the object. -- This message was sent by Atlassian JIRA (v6.3.4#6332)