Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

How to replicate all hive ddl and database from one cluster to cloud cluster?

 
1 ACCEPTED SOLUTION

For migrating a hive installation, I did the following things.

1) Install hive in the new hadoop cluster.

2) Transfer the data present in the hive metastore directory (i.e /user/hive/warehouse) to the new hadoop cluster 3) taken the mysql metastore dump. 4) Install mysql in the new hadoop cluster 5) Open the hive mysql-metastore dump using text readers such as notepad, notepad++ etc and search for hdfs://ip-address-old-namenode:port and replace with hdfs://ip-address-new-namenode:port and save it.

Where ip-address-old-namenode is the ipaddress of namenode of old hadoop cluster and ip-address- new-namenode is the ipaddress of namenode of new hadoop cluster.

6) After doing the above steps, restore the editted mysql dump into the mysql of new hadoop cluster. 7) Configure hive as normal and do the hive schema upgradations if needed.

This is a solution that I discovered when I faced the migration issues. I dont know whether any other

standard methods are available.

This worked for me perfectly. 🙂

View solution in original post

5 REPLIES 5

Super Guru

Rising Star

@Ashnee Sharma : Did @Kuldeep Kulkarni's response answer your question? If yes, please accept the answer

For migrating a hive installation, I did the following things.

1) Install hive in the new hadoop cluster.

2) Transfer the data present in the hive metastore directory (i.e /user/hive/warehouse) to the new hadoop cluster 3) taken the mysql metastore dump. 4) Install mysql in the new hadoop cluster 5) Open the hive mysql-metastore dump using text readers such as notepad, notepad++ etc and search for hdfs://ip-address-old-namenode:port and replace with hdfs://ip-address-new-namenode:port and save it.

Where ip-address-old-namenode is the ipaddress of namenode of old hadoop cluster and ip-address- new-namenode is the ipaddress of namenode of new hadoop cluster.

6) After doing the above steps, restore the editted mysql dump into the mysql of new hadoop cluster. 7) Configure hive as normal and do the hive schema upgradations if needed.

This is a solution that I discovered when I faced the migration issues. I dont know whether any other

standard methods are available.

This worked for me perfectly. 🙂

Super Guru

@Ashnee Sharma -

are you still having issues with this? Can you accept best answer or provide your own solution?

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.