hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ayon Sinha <ayonsi...@yahoo.com>
Subject Re: Alter table Set Locations for all partitions
Date Sun, 21 Aug 2011 05:05:31 GMT
Make sure your Hive metadata database is a separate one and the new one has the tables pointing
to the new cluster. I has this situation "hive comes up fine and show tables etc but the hive
location is still pointing to old cluster" so all MR for Hive queries were pulling data over
the network from the old cluster.
Another way is to dump the metadata DB for the old cluster and string replace old cluster
name with new cluster name in the db-dump.
And the other option may be to use Sqoop telling it to pull data from the old Hive cluster
via Hive JDBC drivers.
 
-Ayon
See My Photos on Flickr
Also check out my Blog for answers to commonly asked questions.



________________________________
From: Bhupesh Bansal <bhupesh@groupon.com>
To: user@hive.apache.org
Sent: Friday, August 19, 2011 2:26 PM
Subject: Alter table Set Locations for all partitions


Hey Folks, 


I am wondering what is the easiest way to migrate data off one hadoop/hive cluster to another.


I distcp all data to new cluster, and then copied the metadata directory to new cluster. 
hive comes up fine and show tables etc but the hive location is still pointing to old cluster

There is one command
alter table table_name set location new_location 

but it doesnt work for partitioned tables, is there a way we can do it for *ALL* partitions
easily ??

Best
Bhupesh
Mime
View raw message