<?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 how to migrate hive partitioned db to new cluster in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-migrate-hive-partitioned-db-to-new-cluster/m-p/236658#M85148</link>
    <description>&lt;P&gt;hi we have dev cluster with 5 nodes and prod cluster with 5 nodes boath with hive installed, now i want to migrate partitioned hive tables from dev to prod cluster,&lt;/P&gt;&lt;P&gt;can someone help me how to properly migrate tables and metastore to prod cluster.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Nov 2018 22:30:28 GMT</pubDate>
    <dc:creator>yrajahadoop123</dc:creator>
    <dc:date>2018-11-23T22:30:28Z</dc:date>
    <item>
      <title>how to migrate hive partitioned db to new cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-migrate-hive-partitioned-db-to-new-cluster/m-p/236658#M85148</link>
      <description>&lt;P&gt;hi we have dev cluster with 5 nodes and prod cluster with 5 nodes boath with hive installed, now i want to migrate partitioned hive tables from dev to prod cluster,&lt;/P&gt;&lt;P&gt;can someone help me how to properly migrate tables and metastore to prod cluster.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 22:30:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-migrate-hive-partitioned-db-to-new-cluster/m-p/236658#M85148</guid>
      <dc:creator>yrajahadoop123</dc:creator>
      <dc:date>2018-11-23T22:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to migrate hive partitioned db to new cluster</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-migrate-hive-partitioned-db-to-new-cluster/m-p/236659#M85149</link>
      <description>&lt;P&gt;
	&lt;A rel="user" href="https://community.cloudera.com/users/99385/yrajahadoop123.html" nodeid="99385"&gt;@raja reddy&lt;/A&gt;
&lt;BR /&gt;&lt;BR /&gt;You can copy the HDFS files from your dev cluster to prod cluster, then you can re-create the hive table on the prod cluster and then perform a compute statistic for all the metadata like &lt;EM&gt;MSCK REPAIR TABLE&lt;/EM&gt; command. For re-creating the hive tables, you can get the create statement of the table by doing the &lt;EM&gt;show create table &amp;lt;table_name&amp;gt;&lt;/EM&gt; query in your dev cluster.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;
	Following are the high-level steps involved in a Hive migration&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;
	
&lt;LI&gt;Use distcp command to copy the data present in the Hive warehouse complete database directory &lt;EM&gt;(/user/hive/warehouse)&lt;/EM&gt; in Dev cluster to Prod cluster.&lt;BR /&gt;
	&lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP3/HDP-3.0.1/administration/content/using_distcp.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/HDP3/HDP-3.0.1/administration/content/using_distcp.html&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;
	
&lt;LI&gt;Once the files are moved to new prod cluster, take the DDL for dev cluster and create the hive tables in prod cluster. (i.e., &lt;EM&gt;show create table &amp;lt;table_name&amp;gt;&lt;/EM&gt; )&lt;BR /&gt;&lt;A href="https://community.hortonworks.com/questions/227816/%E2%80%8Bhttps://community.hortonworks.com/articles/107762/how-to-extract-all-hive-tables-ddl.html" target="_blank"&gt;https://community.hortonworks.com/articles/107762/how-to-extract-all-hive-tables-ddl.html&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;
	
&lt;LI&gt;Run metastore check with repair table, which will add metadata about partitions to the Hive metastore for partitions for which such metadata doesn't already exist.&lt;BR /&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-RecoverPartitions%28MSCKREPAIRTABLE%29" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-RecoverPartitions(MSCKREPAIRTABLE)&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;
	Suppose if clusters are Kerberized then you can refer below links for distcp.&lt;/P&gt;&lt;P&gt;
	&lt;A href="https://community.hortonworks.com/content/supportkb/151079/configure-distcp-between-two-clusters-with-kerbero.html"&gt;https://community.hortonworks.com/content/supportkb/151079/configure-distcp-between-two-clusters-with-kerbero.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;
	Note: There's no need for export because you can directly copy the data from HDFS between both clusters.&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;Please accept the answer you found most useful&lt;/P&gt;</description>
      <pubDate>Sun, 25 Nov 2018 18:25:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-migrate-hive-partitioned-db-to-new-cluster/m-p/236659#M85149</guid>
      <dc:creator>jagadeesan</dc:creator>
      <dc:date>2018-11-25T18:25:50Z</dc:date>
    </item>
  </channel>
</rss>

