Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

What is the best way to migrate a HIVE table into another cluster's HIVE instance?

What is the best way to migrate a HIVE table into another cluster's HIVE instance?

New Contributor

Hello,

What is the most formal or preferable way to migrate a Hive table from one cluster to another cluster running HIVE of course.

I have found this reference located here.

My issue with this approach is why not use discp at all and just export directly to another HDFS instance over the network and then do an import from there?

Please note this is not an production environment so the fact that it is "noisy" or bandwidth invasive is not an issue.

Thanks for any advice!

3 REPLIES 3

Re: What is the best way to migrate a HIVE table into another cluster's HIVE instance?

Hi @Freemon Johnson,

distcp would work just fine. Copy the files and then execute your DDL on the second cluster. Hope this helps!

Re: What is the best way to migrate a HIVE table into another cluster's HIVE instance?

New Contributor

Sorry @Scott Shaw,

Can you please elaborate or be more explicit? Do you have to export the tables first then do dscp? Is the DDL the schematool or something else?

My assumption is if all of the metadata and data are sent over isn't that able to be imported entirely at once? My apologies for my ignorance I just want to make sure I do this correctly the first time and without corrupting the database.

Highlighted

Re: What is the best way to migrate a HIVE table into another cluster's HIVE instance?

Hi @Freemon Johnson, sorry for the confusion. You should be able to distcp the files located in /hive/warehouse to the secondary server. Then you can get your existing tables' ddl's and execute them on the secondary hive instance. Maybe this link will help https://stackoverflow.com/questions/31502364/sqoop-import-from-hive-to-hive

Don't have an account?
Coming from Hortonworks? Activate your account here