Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BF5C688E for ; Fri, 3 Jun 2011 20:55:00 +0000 (UTC) Received: (qmail 16736 invoked by uid 500); 3 Jun 2011 20:55:00 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 16712 invoked by uid 500); 3 Jun 2011 20:55:00 -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 16701 invoked by uid 99); 3 Jun 2011 20:55:00 -0000 Received: from reviews.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2011 20:55:00 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 26BAB1C0066; Fri, 3 Jun 2011 20:55:01 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3229671332799011154==" MIME-Version: 1.0 Subject: Re: Review Request: HIVE-2194: Add actions to MetaStoreEventListener to be performed on alter table and alter partition operations. From: "Carl Steinbach" To: "Paul Yang" Date: Fri, 03 Jun 2011 20:55:01 -0000 Message-ID: <20110603205501.27820.34582@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org X-ReviewRequest-URL: https://reviews.apache.org/r/853/ Cc: "Sohan Jain" , "hive" , "Carl Steinbach" In-Reply-To: <20110603202003.5752.36611@reviews.apache.org> References: <20110603202003.5752.36611@reviews.apache.org> --===============3229671332799011154== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/853/#review758 ----------------------------------------------------------- trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.= java This method should either succeed or throw an exception. Since it alrea= dy throws checked exceptions, adding a boolean return value makes things mo= re complicated for the caller, and signals the same type of failure as an e= xception but without the ability to include information about what caused t= he failure. I think it would be better to modify the code so that an except= ion is always thrown when success=3D=3DFALSE. = This comment also applies to the various alterTable and alterPartition = methods located in other classes. - Carl On 2011-06-03 20:20:03, Sohan Jain wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/853/ > ----------------------------------------------------------- > = > (Updated 2011-06-03 20:20:03) > = > = > Review request for hive and Paul Yang. > = > = > Summary > ------- > = > HIVE-2038 introduced the MetaStoreEventListener abstract class that defin= es actions to be performed after particular events on a metastore. Improve = upon that class by adding events to be performed on "alter table" and "alte= r partition" actions. Also, update the hive metastore to call the appropri= ate functions of the listeners when the events happen. > = > = > This addresses bug HIVE-2194. > https://issues.apache.org/jira/browse/HIVE-2194 > = > = > Diffs > ----- > = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/AlterHandler.= java 1130342 = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHand= ler.java 1130342 = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore= .java 1130342 = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreEven= tListener.java 1130342 = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.j= ava 1130342 = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java= 1130342 = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/events/AlterP= artitionEvent.java PRE-CREATION = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/events/AlterT= ableEvent.java PRE-CREATION = > trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyListener= .java 1130342 = > trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStore= EventListener.java 1130342 = > = > Diff: https://reviews.apache.org/r/853/diff > = > = > Testing > ------- > = > Added test cases to TestMetaStoreEventListener. > = > = > Thanks, > = > Sohan > = > --===============3229671332799011154==--