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 E47E54829 for ; Wed, 29 Jun 2011 11:41:17 +0000 (UTC) Received: (qmail 21443 invoked by uid 500); 29 Jun 2011 11:41:17 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 21334 invoked by uid 500); 29 Jun 2011 11:41: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 21313 invoked by uid 99); 29 Jun 2011 11:41:15 -0000 Received: from reviews.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 11:41:15 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 844F51C00A7; Wed, 29 Jun 2011 11:41:18 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============0123082843221854863==" MIME-Version: 1.0 Subject: Re: Review Request: HIVE-1537 - Allow users to specify LOCATION in CREATE DATABASE statement From: "Amareshwari Sriramadasu" To: "Ning Zhang" , "Amareshwari Sriramadasu" Date: Wed, 29 Jun 2011 11:41:18 -0000 Message-ID: <20110629114118.29523.19305@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org X-ReviewRequest-URL: https://reviews.apache.org/r/949/ Cc: "Thiruvel Thirumoolan" , "hive" In-Reply-To: <20110629111750.29523.91331@reviews.apache.org> References: <20110629111750.29523.91331@reviews.apache.org> --===============0123082843221854863== 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/949/#review930 ----------------------------------------------------------- Changes look fine to me. = Ning, what do you think about removing the api in Warehouse.java vs depreca= ting them? = - Amareshwari On 2011-06-29 11:17:50, Thiruvel Thirumoolan wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/949/ > ----------------------------------------------------------- > = > (Updated 2011-06-29 11:17:50) > = > = > Review request for hive, Ning Zhang and Amareshwari Sriramadasu. > = > = > Summary > ------- > = > Usage: > = > create database location 'path1'; > alter database location 'path2'; > = > After 'alter', only newly created tables will be located under the new lo= cation. Tables created before 'alter' will be under 'path1'. > = > Notes: > ------ > 1. I have moved getDefaultDatabasePath() to HiveMetaStore and made it pri= vate. There should only be one API to obtain the location of a database and= it has to accept 'Database' as an arg and hence the new method in Warehous= e 'getDatabasePath()' and similarly 'getTablePath()'. The usages of older A= PI also has been changed. Hope that should be fine. > 2. One could argue why have getDatabasePath() as location can be obtained= by db.getLocationUri(). I wanted to retain this method to do any additiona= l processing if necessary (getDns or whatever). > = > = > This addresses bug HIVE-1537. > https://issues.apache.org/jira/browse/HIVE-1537 > = > = > Diffs > ----- > = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHand= ler.java 1140495 = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore= .java 1140495 = > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.jav= a 1140495 = > trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaS= tore.java 1140495 = > trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java 1140495 = > trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.j= ava 1140495 = > trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1140495 = > trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ImportSemanticAnalyze= r.java 1140495 = > trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java= 1140495 = > trunk/ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java 1140= 495 = > trunk/ql/src/test/queries/clientpositive/database_location.q PRE-CREATI= ON = > trunk/ql/src/test/results/clientpositive/database_location.q.out PRE-CR= EATION = > = > Diff: https://reviews.apache.org/r/949/diff > = > = > Testing > ------- > = > 1. Updated TestHiveMetaStore.java for testing the functionality - databas= e creation, alteration and table's locations as TestCliDriver outputs ignor= e locations. > 2. Added database_location.q for testing the grammar primarily. > = > Thanks, > Thiruvel > = > = > Thanks, > = > Thiruvel > = > --===============0123082843221854863==--