Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

How to properly copy hive tables from one cluster to another?

avatar
Contributor

Hi experts,

We are trying to copy hive tables from one cluster to another to do some testing.

What is the proper way of doing this?

 

Is it possible to distcp the hive tables at the hdfs level first and then somehow run a hive query to somehow have those hive tables recognized by hive?

 

Any help is much appreciated.

 

Thanks,

1 REPLY 1

avatar
Expert Contributor

Hi @ryu ,

I have recently copied the hive tables from our Production cluster to non production cluster using distcp the location of hive warehouse directory from Prod to non prod, After running distcp we created the table schema  on non prod as same as Prod using 'create table'. If table consist partition then please apply 'alter table' to add partition.

 

We are also using hive replication to copy the tables from our Prod to DR cluster.

 

If this has helped you then please mark the answer as solution.