From issues-return-154833-archive-asf-public=cust-asf.ponee.io@hive.apache.org Mon Apr 1 06:51:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 430BE180672 for ; Mon, 1 Apr 2019 08:51:02 +0200 (CEST) Received: (qmail 90120 invoked by uid 500); 1 Apr 2019 06:51:01 -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 90110 invoked by uid 99); 1 Apr 2019 06:51:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Apr 2019 06:51:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 77038E2961 for ; Mon, 1 Apr 2019 06:51:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 246832459B for ; Mon, 1 Apr 2019 06:51:00 +0000 (UTC) Date: Mon, 1 Apr 2019 06:51:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work logged] (HIVE-21109) Stats replication for ACID tables. 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-21109?focusedWorklogId=3D= 221122&page=3Dcom.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpa= nel#worklog-221122 ] ASF GitHub Bot logged work on HIVE-21109: ----------------------------------------- Author: ASF GitHub Bot Created on: 01/Apr/19 06:50 Start Date: 01/Apr/19 06:50 Worklog Time Spent: 10m=20 Work Description: ashutosh-bapat commented on pull request #579: HIVE= -21109 : Support stats replication for ACID tables. URL: https://github.com/apache/hive/pull/579#discussion_r270732089 =20 =20 ########## File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java ########## @@ -2950,21 +2957,32 @@ public Partition createPartition(Table tbl, Map partSpec) throws int size =3D addPartitionDesc.getPartitionCount(); List in =3D new ArrayList(size= ); - AcidUtils.TableSnapshot tableSnapshot =3D AcidUtils.getTableSnapshot(c= onf, tbl, true); long writeId; String validWriteIdList; - if (tableSnapshot !=3D null && tableSnapshot.getWriteId() > 0) { - writeId =3D tableSnapshot.getWriteId(); - validWriteIdList =3D tableSnapshot.getValidWriteIdList(); + + // In case of replication, get the writeId from the source and use val= id write Id list + // for replication. + if (addPartitionDesc.getReplicationSpec().isInReplicationScope() && + addPartitionDesc.getPartition(0).getWriteId() > 0) { =20 Review comment: writeId will be 0 for non-transactional tables. Also this is createParti= tions code, which may get executed for with writeId =3D 0 for non-transacti= onal modifications to partitions for transactional tables as well. The cond= ition, which I borrowed from the old code is required so that we don't crea= te a valid writeId list or try to get a table snapshot when writeId is zero= . =20 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 221122) Time Spent: 9h 40m (was: 9.5h) > Stats replication for ACID tables. > ---------------------------------- > > Key: HIVE-21109 > URL: https://issues.apache.org/jira/browse/HIVE-21109 > Project: Hive > Issue Type: Sub-task > Reporter: Ashutosh Bapat > Assignee: Ashutosh Bapat > Priority: Major > Labels: pull-request-available > Attachments: HIVE-21109.01.patch, HIVE-21109.02.patch, HIVE-21109= .03.patch, HIVE-21109.04.patch, HIVE-21109.05.patch, HIVE-21109.06.patch, H= IVE-21109.07.patch, HIVE-21109.08.patch > > Time Spent: 9h 40m > Remaining Estimate: 0h > > Transactional tables require a writeID associated with the stats update. = This writeId needs to be in sync with the writeId on the source and hence= =C2=A0needs to be replicated from the source. -- This message was sent by Atlassian JIRA (v7.6.3#76005)