<?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: Hive NullPointerException from Atlas with Basic Query in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125536#M31077</link>
    <description>&lt;P&gt;Can you post what is "hive.exec.post.hooks" in Hive configs set to? If it has the Atlas plugin in that list then remove that from the list and restart the HiveServer2.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jun 2016 05:36:34 GMT</pubDate>
    <dc:creator>deepesh1</dc:creator>
    <dc:date>2016-06-09T05:36:34Z</dc:date>
    <item>
      <title>Hive NullPointerException from Atlas with Basic Query</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125533#M31074</link>
      <description>&lt;P&gt;We have a third party product that tries to execute a simple bit of SQL to verify that the user can execute MR/Tez jobs against a source. It attempts to run:&lt;/P&gt;&lt;PRE&gt;SELECT COUNT(1)&lt;/PRE&gt;&lt;P&gt;Which works under a normal Hive installation. However, in the HDP 2.4 sandbox it results in an error. Logs indicate:&lt;/P&gt;&lt;PRE&gt;Query ID = hive_20160607173731_61e36107-5139-477b-a52a-fe20b0ee04b6Total jobs = 1Launching Job 1 out of 1Status: Running (Executing on YARN cluster with App id application_1465317865651_0003)Map 1: -/-Reducer 2: 0/1Map 1: 0/1Reducer 2: 0/1Map 1: 0(+1)/1Reducer 2: 0/1Map 1: 1/1Reducer 2: 0/1Map 1: 1/1Reducer 2: 0(+1)/1Map 1: 1/1Reducer 2: 1/1OKFAILED: Hive Internal Error: java.lang.NullPointerException(null)java.lang.NullPointerExceptionat org.apache.atlas.hive.bridge.HiveMetaStoreBridge.registerDatabase(HiveMetaStoreBridge.java:109)at org.apache.atlas.hive.bridge.HiveMetaStoreBridge.registerTable(HiveMetaStoreBridge.java:270)at org.apache.atlas.hive.hook.HiveHook.registerProcess(HiveHook.java:321)at org.apache.atlas.hive.hook.HiveHook.fireAndForget(HiveHook.java:214)at org.apache.atlas.hive.hook.HiveHook.run(HiveHook.java:172)at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1585)at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1254)at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1118)at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1113)at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:154)at org.apache.hive.service.cli.operation.SQLOperation.access$100(SQLOperation.java:71)at org.apache.hive.service.cli.operation.SQLOperation$1$1.run(SQLOperation.java:206)at java.security.AccessController.doPrivileged(Native Method)at javax.security.auth.Subject.doAs(Subject.java:415)at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)at org.apache.hive.service.cli.operation.SQLOperation$1.run(SQLOperation.java:218)at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)at java.util.concurrent.FutureTask.run(FutureTask.java:262)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)at java.lang.Thread.run(Thread.java:745)&lt;/PRE&gt;&lt;P&gt;Assuming we can't change the source query, can we get a fix?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 01:05:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125533#M31074</guid>
      <dc:creator>william_bowen</dc:creator>
      <dc:date>2016-06-08T01:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: Hive NullPointerException from Atlas with Basic Query</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125534#M31075</link>
      <description>&lt;P&gt;Can you disable Atlas and see if the query works?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 01:20:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125534#M31075</guid>
      <dc:creator>deepesh1</dc:creator>
      <dc:date>2016-06-09T01:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Hive NullPointerException from Atlas with Basic Query</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125535#M31076</link>
      <description>&lt;P&gt;Thanks for the response. I tried disabling Atlas (and only Atlas) in Ambari as admin. Afterward, I tried executing any Hive query through both Ambari or Beeline. In both cases I get an error:&lt;/P&gt;&lt;PRE&gt;Error: Error while processing statement: FAILED: Hive Internal Error: com.sun.jersey.api.client.ClientHandlerException(java.io.IOException: java.net.ConnectException: Connection refused) (state=08S01,code=12)&lt;/PRE&gt;&lt;P&gt;It seems Hive and Atlas are tightly coupled. Working against any sort of "dummy database" causes an error in the Atlas bridge which propagates up to Hive. Example:&lt;/P&gt;&lt;PRE&gt;8: jdbc:hive2://localhost:10000&amp;gt; select count(1);
INFO  : Tez session hasn't been created yet. Opening session
INFO  : Dag name: select count(1)(Stage-1)
INFO  : 
INFO  : Status: Running (Executing on YARN cluster with App id application_1465411333149_0001)
INFO  : Map 1: -/-Reducer 2: 0/1
INFO  : Map 1: 0/1Reducer 2: 0/1
INFO  : Map 1: 0(+1)/1Reducer 2: 0/1
INFO  : Map 1: 1/1Reducer 2: 0(+1)/1
INFO  : Map 1: 1/1Reducer 2: 1/1
Error: Error while processing statement: FAILED: Hive Internal Error: java.lang.NullPointerException(null) (state=08S01,code=12)
8: jdbc:hive2://localhost:10000&amp;gt; select 1;
Error: Error while processing statement: FAILED: Hive Internal Error: java.lang.NullPointerException(null) (state=08S01,code=12)&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jun 2016 02:10:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125535#M31076</guid>
      <dc:creator>william_bowen</dc:creator>
      <dc:date>2016-06-09T02:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hive NullPointerException from Atlas with Basic Query</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125536#M31077</link>
      <description>&lt;P&gt;Can you post what is "hive.exec.post.hooks" in Hive configs set to? If it has the Atlas plugin in that list then remove that from the list and restart the HiveServer2.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 05:36:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125536#M31077</guid>
      <dc:creator>deepesh1</dc:creator>
      <dc:date>2016-06-09T05:36:34Z</dc:date>
    </item>
    <item>
      <title>Re: Hive NullPointerException from Atlas with Basic Query</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125537#M31078</link>
      <description>&lt;P&gt;Thanks for the tip. It was set to this:&lt;/P&gt;&lt;PRE&gt;&amp;lt;property&amp;gt;
      &amp;lt;name&amp;gt;hive.exec.post.hooks&amp;lt;/name&amp;gt;
      &amp;lt;value&amp;gt;org.apache.hadoop.hive.ql.hooks.ATSHook, org.apache.atlas.hive.hook.HiveHook&amp;lt;/value&amp;gt;
    &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;Removing the Atlas hook (org.apache.atlas.hive.hook.HiveHook) allowed the query to run unimpeded.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 06:38:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125537#M31078</guid>
      <dc:creator>william_bowen</dc:creator>
      <dc:date>2016-06-09T06:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hive NullPointerException from Atlas with Basic Query</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125538#M31079</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/10978/williambowen.html" nodeid="10978"&gt;@William Bowen&lt;/A&gt; is disabling Atlas an acceptable workaround?&lt;/P&gt;&lt;P&gt;To summarize the workaround, you disabled Atlas, modified hive config property "hive.exec.post.hooks" to get rid of "org.apache.atlas.hive.hook.HiveHook" from its value and then bounced the HiveServer2.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 07:09:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Hive-NullPointerException-from-Atlas-with-Basic-Query/m-p/125538#M31079</guid>
      <dc:creator>deepesh1</dc:creator>
      <dc:date>2016-06-09T07:09:26Z</dc:date>
    </item>
  </channel>
</rss>

