You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Eva Tse <et...@netflix.com> on 2009/08/13 04:18:35 UTC

Is there a good way to move the hive warehouse directory?

We currently run hive and store all our data in a warehouse on
/user/hive/warehouse. Now we want to move the original warehouse from
/user/hive/warehouse to new /user/hive/$USER/warehouse and retain all the
data in the original warehouse.  Is there a good way to do it?

Here is the background: We want multiple users to be able to create tables
of same names. The use case is we have a development environment where
multiple developers would use to access hive, but they would all use the
same table namespace for testing/developing, etc.  And we are overwriting
­hiveconf for both the warehouse root dir and the database name via the
connection string.

Thanks,
Eva.

Re: Is there a good way to move the hive warehouse directory?

Posted by Prasad Chakka <pc...@facebook.com>.
I don't think I understand it exactly but check the metastore db for a table 'SDS' and the the table's location is specified in 'LOCATION' column. You could write a SQL query to change this to what you want.

I suggest you backup the metastore db first before doing this.

Prasad

________________________________
From: Eva Tse <et...@netflix.com>
Reply-To: <hi...@hadoop.apache.org>
Date: Wed, 12 Aug 2009 19:18:35 -0700
To: <hi...@hadoop.apache.org>
Subject: Is there a good way to move the hive warehouse directory?

We currently run hive and store all our data in a warehouse on /user/hive/warehouse. Now we want to move the original warehouse from /user/hive/warehouse to new /user/hive/$USER/warehouse and retain all the data in the original warehouse.  Is there a good way to do it?

Here is the background: We want multiple users to be able to create tables of same names. The use case is we have a development environment where multiple developers would use to access hive, but they would all use the same table namespace for testing/developing, etc.  And we are overwriting -hiveconf for both the warehouse root dir and the database name via the connection string.

Thanks,
Eva.