From dev-return-146395-archive-asf-public=cust-asf.ponee.io@hive.apache.org Wed Feb 21 11:36:17 2018 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 4F88C18061A for ; Wed, 21 Feb 2018 11:36:17 +0100 (CET) Received: (qmail 14177 invoked by uid 500); 21 Feb 2018 10:36:16 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 14161 invoked by uid 99); 21 Feb 2018 10:36:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Feb 2018 10:36:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id D3B70C00DA; Wed, 21 Feb 2018 10:36:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.69 X-Spam-Level: X-Spam-Status: No, score=0.69 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id aLjV_MGs_i6X; Wed, 21 Feb 2018 10:36:13 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 06AE95F17F; Wed, 21 Feb 2018 10:36:13 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 97205E00D6; Wed, 21 Feb 2018 10:36:12 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id F021CC40137; Wed, 21 Feb 2018 10:36:11 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7250495571028378821==" MIME-Version: 1.0 Subject: Review Request 65730: HIVE-18697: The HiveMetastore.exchange_partitions method throws FileNotFoundException if the given partition doesn't exist in the source table From: Marta Kuczora via Review Board To: Peter Vary , Adam Szita Cc: hive , Marta Kuczora Date: Wed, 21 Feb 2018 10:36:10 -0000 Message-ID: <20180221103610.27951.4089@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Marta Kuczora X-ReviewGroup: hive X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/65730/ X-Sender: Marta Kuczora Reply-To: Marta Kuczora X-ReviewRequest-Repository: hive-git --===============7250495571028378821== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/65730/ ----------------------------------------------------------- Review request for hive, Peter Vary and Adam Szita. Bugs: HIVE-18697 https://issues.apache.org/jira/browse/HIVE-18697 Repository: hive-git Description ------- Extended the HiveMetastore.exchange_partitions method to check if the partitionsToExchange list is empty and if it is throw a MetaException with a proper error message that no partition exists with the given values for the source table. Previously a FileNotFoundException was thrown (wrapped in a MetaException) when tried to move the partition folder to the dest table. So the type of the exception was not changed, only the error message. Diffs ----- standalone-metastore/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 47de215 standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestExchangePartitions.java 3a06aec Diff: https://reviews.apache.org/r/65730/diff/1/ Testing ------- There are tests for this use case in TestExchangePartitions: - testExchangePartitionsNoPartExists - testExchangePartitionNoPartExists Thanks, Marta Kuczora --===============7250495571028378821==--