<?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: Question about beeline connection using spark-hive client in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Question-about-beeline-connection-using-spark-hive-client/m-p/227618#M63853</link>
    <description>&lt;P&gt;In case of spark-hive client, if no database is specified in the connection url, it uses default db and tries to use that, since there is no policy configured for default db it fails. So, create a Ranger policy for default db granting access, whereas in case of HSI client the connection doesn't use any database.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jun 2017 01:38:53 GMT</pubDate>
    <dc:creator>skoneru</dc:creator>
    <dc:date>2017-06-29T01:38:53Z</dc:date>
    <item>
      <title>Question about beeline connection using spark-hive client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Question-about-beeline-connection-using-spark-hive-client/m-p/227617#M63852</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a cluster with ranger enabled and trying to connect to hive using hive-spark beeline &lt;/P&gt;&lt;P&gt;Command:&lt;/P&gt;&lt;P&gt;/usr/hdp/current/spark2-client/bin/beeline -n testuser1 -p testuser1 -u "jdbc:hive2://&amp;lt;host:&amp;lt;port&amp;gt;/;principal=hive/_HOST@EXAMPLE.COM"&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;PRE&gt;Connecting to jdbc:hive2://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/;principal=hive/_HOST@EXAMPLE.COM
INFO Utils: Supplied authorities: &amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;
INFO Utils: Resolved authority: &amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;
WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
INFO HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/;principal=hive/_HOST@EXAMPLE.COM
Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [testuser1] does not have [USE] privilege on [Unknown resource!!] (state=42000,code=40000)
Beeline version 1.2.1.spark2.hdp.1 by Apache Hive
0: jdbc:hive2://&amp;lt;host&amp;gt;- (closed)&amp;gt; &lt;/PRE&gt;&lt;P&gt;The same works fine for HSI client&lt;/P&gt;&lt;PRE&gt;/usr/hdp/current/hive-client/bin/beeline -n testuser1 -p testuser1 -u "jdbc:hive2://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;;principal=hive/_HOST@EXAMPLE.COM"

Connecting to jdbc:hive2://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;;principal=hive/_HOST@EXAMPLE.COM
Connected to: Apache Hive (version 2.1.0.2.6.1.0-111)
Driver: Hive JDBC (version 1.2.1000.2.6.1.0-111)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 1.2.1000.2.6.1.0-111 by Apache Hive
0: jdbc:hive2://&amp;lt;host&amp;gt;-&amp;gt;  
&lt;/PRE&gt;&lt;P&gt;Could someone help with identifying the reason for failure for hive-spark beeline.&lt;/P&gt;&lt;P&gt;It says the user doesnot have use privilege on unknown resource.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 01:35:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Question-about-beeline-connection-using-spark-hive-client/m-p/227617#M63852</guid>
      <dc:creator>ssanthosh</dc:creator>
      <dc:date>2017-06-29T01:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Question about beeline connection using spark-hive client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Question-about-beeline-connection-using-spark-hive-client/m-p/227618#M63853</link>
      <description>&lt;P&gt;In case of spark-hive client, if no database is specified in the connection url, it uses default db and tries to use that, since there is no policy configured for default db it fails. So, create a Ranger policy for default db granting access, whereas in case of HSI client the connection doesn't use any database.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 01:38:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Question-about-beeline-connection-using-spark-hive-client/m-p/227618#M63853</guid>
      <dc:creator>skoneru</dc:creator>
      <dc:date>2017-06-29T01:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Question about beeline connection using spark-hive client</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Question-about-beeline-connection-using-spark-hive-client/m-p/227619#M63854</link>
      <description>&lt;P&gt;Thanks Surya. It worked.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 01:45:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Question-about-beeline-connection-using-spark-hive-client/m-p/227619#M63854</guid>
      <dc:creator>ssanthosh</dc:creator>
      <dc:date>2017-06-29T01:45:23Z</dc:date>
    </item>
  </channel>
</rss>

