<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Moving a hive database from one cluster to another in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186084#M67927</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/1485/vtpcnk.html" nodeid="1485"&gt;@n c&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You don't have to copy the metadata. Copy the folder structure with all the data to the new cluster. Recreate the table and don't forget to do a compute statistic on the table. This will recreate a lot of metadata in order to have the CBO working fine.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;There's no need for export tool because you can directly copy the data from HDFS &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Michel&lt;/P&gt;</description>
    <pubDate>Thu, 14 Sep 2017 16:29:40 GMT</pubDate>
    <dc:creator>msumbul1</dc:creator>
    <dc:date>2017-09-14T16:29:40Z</dc:date>
    <item>
      <title>Moving a hive database from one cluster to another</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186081#M67924</link>
      <description>&lt;P&gt;We have a hive database on cluster 1. We want to move this hive database to cluster 2. Both clusters have other hive databases as well. For Hive backup, we normally backup the hive metadata on MYSQL and also the physical hive files (database directories with table sub-directories) and use this for restore. So for this purpose of backing up a single database we can get the particular database's data directory. But how to get the metadata for a particular database from MYSQL? Appreciate any insights.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 00:52:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186081#M67924</guid>
      <dc:creator>vtpcnk</dc:creator>
      <dc:date>2017-09-13T00:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a hive database from one cluster to another</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186082#M67925</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/1485/vtpcnk.html" nodeid="1485"&gt;@n c&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You can also copy the hdfs file, then re-create the hive table on the target hive and then perform a compute statistic for all the metadata.&lt;BR /&gt;You can get the create statement of the table by doing the following query: show create table xxxxx&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 19:36:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186082#M67925</guid>
      <dc:creator>msumbul1</dc:creator>
      <dc:date>2017-09-13T19:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a hive database from one cluster to another</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186083#M67926</link>
      <description>&lt;P&gt;Hi msumbul, thats exactly what i thought as well. but hortonworks is saying it will mess up the metadata. "No, it is not tested and supported. The metadata
for the tables will be totally different."  &lt;/P&gt;&lt;P&gt;BTW is there an export capability in hive. ie can we export and import data. That way also I think we can create empty tables and import them in. Appreciate the insights.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 20:53:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186083#M67926</guid>
      <dc:creator>vtpcnk</dc:creator>
      <dc:date>2017-09-13T20:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a hive database from one cluster to another</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186084#M67927</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/1485/vtpcnk.html" nodeid="1485"&gt;@n c&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You don't have to copy the metadata. Copy the folder structure with all the data to the new cluster. Recreate the table and don't forget to do a compute statistic on the table. This will recreate a lot of metadata in order to have the CBO working fine.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;There's no need for export tool because you can directly copy the data from HDFS &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Michel&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 16:29:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186084#M67927</guid>
      <dc:creator>msumbul1</dc:creator>
      <dc:date>2017-09-14T16:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a hive database from one cluster to another</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186085#M67928</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/1485/vtpcnk.html" nodeid="1485"&gt;@n c&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use Insert Overwrite Local Directory command in hive to export to the desired format and use distcp to copy the files or even the complete database in hive( which means entire files which are created under each tables in a database) into the second cluster. Once the files are moved to new cluster take the DDL for previous cluster and create the hive tables. Once its done you can either insert/copy the files into hive tables in new cluster. Hope it Helps!!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Sep 2017 18:13:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186085#M67928</guid>
      <dc:creator>balavignesh_nag</dc:creator>
      <dc:date>2017-09-14T18:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a hive database from one cluster to another</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186086#M67929</link>
      <description>&lt;P&gt;Is there any command to show the create database command?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 01:47:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186086#M67929</guid>
      <dc:creator>vtpcnk</dc:creator>
      <dc:date>2017-09-15T01:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a hive database from one cluster to another</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186087#M67930</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/1485/vtpcnk.html" nodeid="1485"&gt;@n c&lt;/A&gt;&lt;P&gt;No we cant get the something similar to DDL of a table in terms of database. But we can use describe database to see the other properties. Hope it helps!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 10:59:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186087#M67930</guid>
      <dc:creator>balavignesh_nag</dc:creator>
      <dc:date>2017-09-15T10:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a hive database from one cluster to another</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186088#M67931</link>
      <description>&lt;P&gt;Hey all, thanks so much for the input. i went with msumbul's instructions and was able to successfully port a hive database from one cluster to another - so special thanks to msumbul!!! BTW I took out all the CREATE TABLEs out of the database. But what about other database objects? Procedures etc? Is there anyway to check for objects other than tables in a Hive database? Appreciate the insights.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Sep 2017 01:18:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186088#M67931</guid>
      <dc:creator>vtpcnk</dc:creator>
      <dc:date>2017-09-16T01:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Moving a hive database from one cluster to another</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186089#M67932</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/1485/vtpcnk.html" nodeid="1485"&gt;@n c&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You are welcome! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; . I don't think there's other object in hive (but not sure) there's the UDF for that you need to export the jar and you use for UDF in you first cluster.&lt;/P&gt;&lt;P&gt;May I ask you to accept my answer? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Michel&lt;/P&gt;</description>
      <pubDate>Sat, 16 Sep 2017 19:18:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Moving-a-hive-database-from-one-cluster-to-another/m-p/186089#M67932</guid>
      <dc:creator>msumbul1</dc:creator>
      <dc:date>2017-09-16T19:18:26Z</dc:date>
    </item>
  </channel>
</rss>

