Thanks David,

I will take a shot at this today.

Best
Bhupesh

On Sun, Aug 21, 2011 at 6:51 PM, David Burley <da...@geek.net> wrote:

> Bhupesh,
>
> The following worked for us on a MySQL metastore:
>
> mysqldump metastore > metastore-backup-`date +%Y%m%d`.sql
> mysql metastore
> UPDATE SDS SET LOCATION=REPLACE(LOCATION, 'hdfs://hadoop-namenode-1',
> 'hdfs://hadoop-namenode-2');
> UPDATE DBS SET `DESC`=REPLACE(`DESC`, 'hdfs://hadoop-namenode-1',
> 'hdfs://hadoop-namenode-2');
>
> But I think you noted you are using Derby. If I were using Derby, I'd
> switch to MySQL to make the management less painful, and then do the
> above. I provided some info on migrating from Derby to MySQL here:
>
> http://search-hadoop.com/m/J15J0FwAg1/v=plain
>
> If you must run Derby -- I'd think you could use the same tool,
> RazorSQL to load up the metastore and then tweak the underlying data.
>
> Good Luck!
>
> --David
>
> On Fri, Aug 19, 2011 at 5:26 PM, Bhupesh Bansal <bhup...@groupon.com>
> wrote:
> > 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
> >
> >
> >
> ====
> This e- mail message is intended only for the named recipient(s) above. It
> may contain confidential and privileged information. If you are not the
> intended recipient you are hereby notified that any dissemination,
> distribution or copying of this e-mail and any attachment(s) is strictly
> prohibited. If you have received this e-mail in error, please immediately
> notify the sender by replying to this e-mail and delete the message and any
> attachment(s) from your system. Thank you.
>
>

Reply via email to