<?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: current_database() function not working in Hive 1.2.1.2.3.2.0-2950 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166899#M129236</link>
    <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/89832/current-database-function-not-working-in-hive-1212.html#"&gt;@Shalini Goel
&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Good to know that this issue is resolved. Please mark this thread as "Accepted" so that it will be helpful for others.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/89832/current-database-function-not-working-in-hive-1212.html#"&gt;&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2017 17:26:18 GMT</pubDate>
    <dc:creator>jsensharma</dc:creator>
    <dc:date>2017-03-21T17:26:18Z</dc:date>
    <item>
      <title>current_database() function not working in Hive 1.2.1.2.3.2.0-2950</title>
      <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166892#M129229</link>
      <description>&lt;P&gt;Hi All,.&lt;/P&gt;&lt;P&gt;I was trying  to run below query in Hortonworks VMware  and gettting error. Can anyone explain what is the reason for it and  how it  can resolved. This same query worked in Cloudera VMware.&lt;/P&gt;&lt;P&gt;Query: select current_database();&lt;/P&gt;&lt;P&gt;Version:  Hive 1.2.1.2.3.2.0-2950&lt;/P&gt;&lt;P&gt;Error: &lt;/P&gt;&lt;P&gt;FAILED: Hive Internal Error: java.lang.NullPointerException(null)
java.lang.NullPointerException
   at 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:309)
   at org.apache.atlas.hive.hook.HiveHook.fireAndForget(HiveHook.java:202)
   at org.apache.atlas.hive.hook.HiveHook.run(HiveHook.java:160)
   at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1522)
   at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1195)
   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)
   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1049)
   at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:213)
   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
   at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:736)
   at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
   at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
   at org.apache.hadoop.util.RunJar.main(RunJar.java:136)&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 11:17:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166892#M129229</guid>
      <dc:creator>shalini_goel</dc:creator>
      <dc:date>2022-09-16T11:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: current_database() function not working in Hive 1.2.1.2.3.2.0-2950</title>
      <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166893#M129230</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/16755/shalinigoel.html" nodeid="16755"&gt;@Shalini Goel&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In the stackTrace we see &lt;EM&gt;&lt;STRONG&gt;"org.apache.atlas.hive.hook.HiveHook&lt;/STRONG&gt;&lt;/EM&gt;" So can you try removing this property from your hive config and then try again.&lt;/P&gt;&lt;P&gt;Ambari UI --&amp;gt; Hive  --&amp;gt; Configs -&amp;gt; Advanced tab --&amp;gt; Search for "hive.exec.failure.hooks"  and then from there you remove the mentioned property if present.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 13:39:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166893#M129230</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-03-21T13:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: current_database() function not working in Hive 1.2.1.2.3.2.0-2950</title>
      <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166894#M129231</link>
      <description>&lt;P&gt;In  Advanced Settings &amp;gt; General &amp;gt; Property name "hive.exec.post.hooks" , I removed&lt;EM&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;"org.apache.atlas.hive.hook.HiveHook" entry&lt;/P&gt;&lt;P&gt;Still same error !&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:18:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166894#M129231</guid>
      <dc:creator>shalini_goel</dc:creator>
      <dc:date>2017-03-21T15:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: current_database() function not working in Hive 1.2.1.2.3.2.0-2950</title>
      <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166895#M129232</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/16755/shalinigoel.html" nodeid="16755"&gt;@Shalini Goel&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Are you still seeing the same stackTrace which has the following line (even after removing  &lt;EM&gt;&lt;STRONG&gt;"org.apache.atlas.hive.hook.HiveHook&lt;/STRONG&gt;&lt;/EM&gt;" )?&lt;/P&gt;&lt;PRE&gt;org.apache.atlas.hive.hook.HiveHook.registerProcess(HiveHook.java:309) at&lt;/PRE&gt;&lt;P&gt;Can you please post the stackTrace again.  It might be slightly different. &lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:20:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166895#M129232</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-03-21T15:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: current_database() function not working in Hive 1.2.1.2.3.2.0-2950</title>
      <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166896#M129233</link>
      <description>&lt;P&gt;hive&amp;gt; select current_database();
FAILED: Hive Internal Error: java.lang.NullPointerException(null)
java.lang.NullPointerException
   at 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:309)
   at org.apache.atlas.hive.hook.HiveHook.fireAndForget(HiveHook.java:202)
   at org.apache.atlas.hive.hook.HiveHook.run(HiveHook.java:160)
   at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1522)
   at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1195)
   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1059)
   at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1049)
   at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:213)
   at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:165)
   at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:376)
   at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:736)
   at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
   at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
   at org.apache.hadoop.util.RunJar.main(RunJar.java:136)&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:22:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166896#M129233</guid>
      <dc:creator>shalini_goel</dc:creator>
      <dc:date>2017-03-21T15:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: current_database() function not working in Hive 1.2.1.2.3.2.0-2950</title>
      <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166897#M129234</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/16755/shalinigoel.html" nodeid="16755"&gt;@Shalini Goel&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It is strange to see the class "org.apache.atlas.hive.hook.HiveHook" in the stackTrace even if you deleted that hook from your hive config.  Have your changes made via ambari got reflected properly to the host where you are running hive shell?&lt;/P&gt;&lt;P&gt;- Can you please check and share the file " /etc/hive/conf/hive-site.xml" and verify if you have the following emtry in it ?&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&amp;lt;/value&amp;gt;
    &amp;lt;/property&amp;gt;
    &amp;lt;property&amp;gt;
      &amp;lt;name&amp;gt;hive.exec.pre.hooks&amp;lt;/name&amp;gt;
      &amp;lt;value&amp;gt;org.apache.hadoop.hive.ql.hooks.ATSHook&amp;lt;/value&amp;gt;
    &amp;lt;/property&amp;gt;
&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:28:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166897#M129234</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-03-21T15:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: current_database() function not working in Hive 1.2.1.2.3.2.0-2950</title>
      <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166898#M129235</link>
      <description>&lt;P&gt;Thanks Jay !!&lt;/P&gt;&lt;P&gt;I got it. I need not to make change in Ambari, I can do it simply through CLI. It worked. Making change in Ambari was not reflected in "/etc/hive/conf/hive-site.xml". I don't know why.&lt;/P&gt;&lt;PRE&gt;hive&amp;gt; set hive.exec.post.hooks;
hive.exec.post.hooks=org.apache.hadoop.hive.ql.hooks.ATSHook, org.apache.atlas.hive.hook.HiveHook
hive&amp;gt; set hive.exec.post.hooks=org.apache.hadoop.hive.ql.hooks.ATSHook;
hive&amp;gt; select current_database();
OK
default
Time taken: 3.074 seconds, Fetched: 1 row(s)&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 15:51:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166898#M129235</guid>
      <dc:creator>shalini_goel</dc:creator>
      <dc:date>2017-03-21T15:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: current_database() function not working in Hive 1.2.1.2.3.2.0-2950</title>
      <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166899#M129236</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/89832/current-database-function-not-working-in-hive-1212.html#"&gt;@Shalini Goel
&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Good to know that this issue is resolved. Please mark this thread as "Accepted" so that it will be helpful for others.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/89832/current-database-function-not-working-in-hive-1212.html#"&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 17:26:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166899#M129236</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-03-21T17:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: current_database() function not working in Hive 1.2.1.2.3.2.0-2950</title>
      <link>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166900#M129237</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay SenSharma&lt;/A&gt;, &lt;A rel="user" href="https://community.cloudera.com/users/16755/shalinigoel.html" nodeid="16755"&gt;@Shalini Goel&lt;/A&gt; - does this change have any impact on functioning of Atlas in the cluster ? As per &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.6/bk_command-line-installation/content/configuring_atlas_hive_hook.html"&gt;HDP doc&lt;/A&gt;, we need to have the following:&lt;/P&gt;&lt;PRE&gt;hive.exec.post.hooks=org.apache.hadoop.hive.ql.hooks.ATSHook, org.apache.atlas.hive.hook.HiveHook&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Oct 2017 07:50:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/current-database-function-not-working-in-Hive-1-2-1-2-3-2-0/m-p/166900#M129237</guid>
      <dc:creator>dineshc</dc:creator>
      <dc:date>2017-10-11T07:50:51Z</dc:date>
    </item>
  </channel>
</rss>

