<?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 Hive not resolving namenode HA in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-not-resolving-namenode-HA/m-p/124970#M43260</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;After enabling HA on the name node, hive is unable to access the hive databases whose metastore name got updated to the new FS path: &lt;/P&gt;&lt;PRE&gt;Error: Error while compiling statement: FAILED: SemanticException java.lang.IllegalArgumentException: java.net.UnknownHostException: cluster1 (state=42000,code=40000)&lt;/PRE&gt;&lt;P&gt;hive metastore tool shows:&lt;/P&gt;&lt;PRE&gt;hive --service metatool -listFSRootListing FS Roots..

hdfs://cluster1/apps/hive/warehouse/test2.db

hdfs://cluster1/apps/hive/warehouse/raw.db

hdfs://cluster1/apps/hive/warehouse/test.db

hdfs://cluster1/apps/hive/warehouse

hdfs://cluster1/apps/hive/warehouse/lookup.db&lt;/PRE&gt;&lt;P&gt;cluster1 is the correct fs.defaultFS that was setup during HA. &lt;/P&gt;&lt;PRE&gt;&amp;lt;property&amp;gt;

&amp;lt;name&amp;gt;fs.defaultFS&amp;lt;/name&amp;gt;

&amp;lt;value&amp;gt;hdfs://cluster1&amp;lt;/value&amp;gt;

&amp;lt;final&amp;gt;true&amp;lt;/final&amp;gt;

&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;If I create a new database in hive, it gets created using the actual name node host name:&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://ip-10-555-2-555.ec2.internal:&amp;gt; create database test3;&lt;/P&gt;&lt;P&gt;No rows affected (0.148 seconds)&lt;/P&gt;&lt;P&gt;Listing FS Roots..&lt;/P&gt;&lt;P&gt;hdfs://ip-10-123-5-42.ec2.internal:8020/apps/hive/warehouse/test3.db&lt;/P&gt;&lt;P&gt;any ideas on what could be missing? hdfs client works fine with the HA name. &lt;/P&gt;</description>
    <pubDate>Wed, 12 Oct 2016 05:36:39 GMT</pubDate>
    <dc:creator>mliem</dc:creator>
    <dc:date>2016-10-12T05:36:39Z</dc:date>
    <item>
      <title>Hive not resolving namenode HA</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-not-resolving-namenode-HA/m-p/124970#M43260</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;After enabling HA on the name node, hive is unable to access the hive databases whose metastore name got updated to the new FS path: &lt;/P&gt;&lt;PRE&gt;Error: Error while compiling statement: FAILED: SemanticException java.lang.IllegalArgumentException: java.net.UnknownHostException: cluster1 (state=42000,code=40000)&lt;/PRE&gt;&lt;P&gt;hive metastore tool shows:&lt;/P&gt;&lt;PRE&gt;hive --service metatool -listFSRootListing FS Roots..

hdfs://cluster1/apps/hive/warehouse/test2.db

hdfs://cluster1/apps/hive/warehouse/raw.db

hdfs://cluster1/apps/hive/warehouse/test.db

hdfs://cluster1/apps/hive/warehouse

hdfs://cluster1/apps/hive/warehouse/lookup.db&lt;/PRE&gt;&lt;P&gt;cluster1 is the correct fs.defaultFS that was setup during HA. &lt;/P&gt;&lt;PRE&gt;&amp;lt;property&amp;gt;

&amp;lt;name&amp;gt;fs.defaultFS&amp;lt;/name&amp;gt;

&amp;lt;value&amp;gt;hdfs://cluster1&amp;lt;/value&amp;gt;

&amp;lt;final&amp;gt;true&amp;lt;/final&amp;gt;

&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;If I create a new database in hive, it gets created using the actual name node host name:&lt;/P&gt;&lt;P&gt;0: jdbc:hive2://ip-10-555-2-555.ec2.internal:&amp;gt; create database test3;&lt;/P&gt;&lt;P&gt;No rows affected (0.148 seconds)&lt;/P&gt;&lt;P&gt;Listing FS Roots..&lt;/P&gt;&lt;P&gt;hdfs://ip-10-123-5-42.ec2.internal:8020/apps/hive/warehouse/test3.db&lt;/P&gt;&lt;P&gt;any ideas on what could be missing? hdfs client works fine with the HA name. &lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 05:36:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-not-resolving-namenode-HA/m-p/124970#M43260</guid>
      <dc:creator>mliem</dc:creator>
      <dc:date>2016-10-12T05:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: Hive not resolving namenode HA</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-not-resolving-namenode-HA/m-p/124971#M43261</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11088/mliem.html" nodeid="11088"&gt;@mliem&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please refer to below link for configuring namenode HA. Make sure that step#15 is executed&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.1.1/bk_Ambari_Users_Guide/content/_how_to_configure_namenode_high_availability.html" target="_blank"&gt;https://docs.hortonworks.com/HDPDocuments/Ambari-2.2.1.1/bk_Ambari_Users_Guide/content/_how_to_configure_namenode_high_availability.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Below is the details of Step#15&lt;/P&gt;&lt;PRE&gt;If you are using Hive, you must manually change the Hive Metastore FS root to point to the Nameservice URI instead of the NameNode URI. You created the Nameservice ID in the Get Started step.
Check the current FS root. On the Hive host:
hive --config /etc/hive/conf.server --service metatool -listFSRoot
The output looks similar to the following: Listing FS Roots... hdfs://&amp;lt;namenode-host&amp;gt;/apps/hive/warehouse
Use this command to change the FS root:
$ hive --config /etc/hive/conf.server --service metatool -updateLocation &amp;lt;new-location&amp;gt;&amp;lt;old-location&amp;gt;
For example, where the Nameservice ID is mycluster:
$ hive --config /etc/hive/conf.server --service metatool -updateLocation hdfs://mycluster/apps/hive/warehouse hdfs://c6401.ambari.apache.org/apps/hive/warehouse
The output looks similar to the following:
Successfully updated the following locations...Updated X records in SDS table

&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Oct 2016 13:48:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-not-resolving-namenode-HA/m-p/124971#M43261</guid>
      <dc:creator>sgowda</dc:creator>
      <dc:date>2016-10-12T13:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hive not resolving namenode HA</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-not-resolving-namenode-HA/m-p/124972#M43262</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/3205/santoshbalamatti.html" nodeid="3205"&gt;@santoshsb&lt;/A&gt;&lt;P&gt;They are already configured to point to the nameservice URI. See my first screenshot:&lt;/P&gt;&lt;P&gt;hive --service metatool -listFSRootListing FS Roots.&lt;/P&gt;&lt;P&gt;hdfs://cluster1/apps/hive/warehouse/test2.d&lt;/P&gt;&lt;P&gt;hdfs://cluster1/apps/hive/warehouse/raw.db&lt;/P&gt;&lt;P&gt;hdfs://cluster1/apps/hive/warehouse/test.db&lt;/P&gt;&lt;P&gt;hdfs://cluster1/apps/hive/warehouse&lt;/P&gt;&lt;P&gt;hdfs://cluster1/apps/hive/warehouse/lookup.db&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2016 21:43:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-not-resolving-namenode-HA/m-p/124972#M43262</guid>
      <dc:creator>mliem</dc:creator>
      <dc:date>2016-10-12T21:43:32Z</dc:date>
    </item>
  </channel>
</rss>

