hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " (JIRA)" <>
Subject [jira] [Commented] (HIVE-1537) Allow users to specify LOCATION in CREATE DATABASE statement
Date Wed, 29 Jun 2011 11:19:30 GMT

] commented on HIVE-1537:

This is an automatically generated e-mail. To reply, visit:

(Updated 2011-06-29 11:17:50.481535)

Review request for hive, Ning Zhang and Amareshwari Sriramadasu.


Updating old review request with the new patch, encountered an error yesterday and raised
a new request.


1. Alter database has been removed.
2. create database will fail when database directory cannot be created. (Devaraj's patch)




create database location 'path1';
alter database location 'path2';

After 'alter', only newly created tables will be located under the new location. Tables created
before 'alter' will be under 'path1'.

1. I have moved getDefaultDatabasePath() to HiveMetaStore and made it private. 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 Warehouse 'getDatabasePath()' and similarly 'getTablePath()'.
The usages of older API 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 additional processing if necessary (getDns or whatever).

This addresses bug HIVE-1537.

Diffs (updated)

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ 1140495

  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ 1140495 
  trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ 1140495 
  trunk/metastore/src/test/org/apache/hadoop/hive/metastore/ 1140495

  trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ 1140495 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ 1140495 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/Hive.g 1140495 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ 1140495 
  trunk/ql/src/java/org/apache/hadoop/hive/ql/parse/ 1140495 
  trunk/ql/src/test/org/apache/hadoop/hive/ql/metadata/ 1140495 
  trunk/ql/src/test/queries/clientpositive/database_location.q PRE-CREATION 
  trunk/ql/src/test/results/clientpositive/database_location.q.out PRE-CREATION 



1. Updated for testing the functionality - database creation, alteration
and table's locations as TestCliDriver outputs ignore locations.
2. Added database_location.q for testing the grammar primarily.




> Allow users to specify LOCATION in CREATE DATABASE statement
> ------------------------------------------------------------
>                 Key: HIVE-1537
>                 URL:
>             Project: Hive
>          Issue Type: New Feature
>          Components: Metastore
>            Reporter: Carl Steinbach
>            Assignee: Thiruvel Thirumoolan
>         Attachments: HIVE-1537.patch, hive-1537.metastore.part.patch

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message