<?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: Ambari Hive View: How to make Hive queries run as current user? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120778#M83541</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/687/christopherwmenke.html" nodeid="687"&gt;@Kit Menke&lt;/A&gt;&lt;P&gt;Can you please check is below property set in hive-site.xml, if not please set it and try. &lt;/P&gt;&lt;PRE&gt;hive.server2.enable.doAs = true&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2"&gt;Link&lt;/A&gt; for more details.&lt;/P&gt;</description>
    <pubDate>Sat, 04 Jun 2016 20:49:52 GMT</pubDate>
    <dc:creator>bandarusridhar1</dc:creator>
    <dc:date>2016-06-04T20:49:52Z</dc:date>
    <item>
      <title>Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120772#M83535</link>
      <description>&lt;P&gt;We have a kerberized cluster and just finished configuring the Hive and HDFS views inside Ambari 2.1.2.1 by following the documentation here: &lt;A href="http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.1/bk_ambari_views_guide/content/section_kerberos_setup_hive_view.html" target="_blank" rel="nofollow noopener noreferrer"&gt;http://docs.hortonworks.com/HDPDocuments/Ambari-2.1.2.1/bk_ambari_views_guide/content/section_kerberos_setup_hive_view.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm able to login to ambari with my username to use both the Hive and HDFS view OK. I'm testing these views with Ranger now. The problem is the Hive view seems to be running as the ambari-server user.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4764-ranger-audit.png" style="width: 1524px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/22865iF636CD904BF91A04/image-size/medium?v=v2&amp;amp;px=400" role="button" title="4764-ranger-audit.png" alt="4764-ranger-audit.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How do make the hive view run queries as my username instead of ambari-server?&lt;/P&gt;&lt;P&gt;Note: The HDFS view seems to be working correctly because I can see the correct username in the audit logs.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 10:31:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120772#M83535</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2019-08-19T10:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120773#M83536</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/687/christopherwmenke.html" nodeid="687"&gt;@Kit Menke&lt;/A&gt; have you enabled hive impersonations?  &lt;A href="http://hortonworks.com/blog/best-practices-for-hive-authorization-using-apache-ranger-in-hdp-2-2/"&gt;link&lt;/A&gt; to best practice.  More on enabling hive impersonations &lt;A href="https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-Impersonation"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2016 03:35:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120773#M83536</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-06-04T03:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120774#M83537</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1486/smanjee.html" nodeid="1486"&gt;@Sunile Manjee&lt;/A&gt; I think Scenario #1 is what I'm aiming for. I set "Run as end user instead of Hive user" to false but still I'm seeing ambari-server show up in the ranger audit log.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2016 04:26:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120774#M83537</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-06-04T04:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120775#M83538</link>
      <description>&lt;P&gt;There seems to be a missing param in the docs for "Hive authentication" property. It should work after you add the bolded below to pass in user logged into ambari as the hive.server2.proxy.user:&lt;/P&gt;&lt;P&gt;auth=KERBEROS;principal=hive/HIVE_HOST@REALM;&lt;STRONG&gt;hive.server2.proxy.user=${username}
&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/306/bganesan.html" nodeid="306"&gt;@bganesan&lt;/A&gt;: seems like we may need to update our doc&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2016 06:16:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120775#M83538</guid>
      <dc:creator>abajwa</dc:creator>
      <dc:date>2016-06-04T06:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120776#M83539</link>
      <description>&lt;P&gt;Wonder if you are hitting this issue?&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/AMBARI-13875" target="_blank"&gt;https://issues.apache.org/jira/browse/AMBARI-13875&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It's fixed in Ambari 2.2+. The latest Ambari is 2.2.2.0 and upgrade docs / general docs can be found here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://docs.hortonworks.com/HDPDocuments/Ambari/Ambari-2.2.2.0/index.html" target="_blank"&gt;http://docs.hortonworks.com/HDPDocuments/Ambari/Ambari-2.2.2.0/index.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2016 06:17:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120776#M83539</guid>
      <dc:creator>jeff1</dc:creator>
      <dc:date>2016-06-04T06:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120777#M83540</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/310/jeff.html" nodeid="310"&gt;@jeff&lt;/A&gt; That does look like what I'm running into. I tried adding hive.server2.proxy.user as suggested by &lt;A rel="user" href="https://community.cloudera.com/users/132/abajwa.html" nodeid="132"&gt;@Ali Bajwa&lt;/A&gt; but it didn't have any affect so must be that bug. I'll see if we can update Ambari.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2016 06:30:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120777#M83540</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-06-04T06:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120778#M83541</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/687/christopherwmenke.html" nodeid="687"&gt;@Kit Menke&lt;/A&gt;&lt;P&gt;Can you please check is below property set in hive-site.xml, if not please set it and try. &lt;/P&gt;&lt;PRE&gt;hive.server2.enable.doAs = true&lt;/PRE&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2"&gt;Link&lt;/A&gt; for more details.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jun 2016 20:49:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120778#M83541</guid>
      <dc:creator>bandarusridhar1</dc:creator>
      <dc:date>2016-06-04T20:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120779#M83542</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/5746/bandarusridhar1.html" nodeid="5746"&gt;@Sri  Bandaru&lt;/A&gt; I've tried changing doAs to both true and false and saw the same behavior either way when using the Ambari Hive view. We want to leave it as false anyways.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jun 2016 21:34:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120779#M83542</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-06-08T21:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120780#M83543</link>
      <description>&lt;P&gt;After upgrading to Ambari 2.2.2.0 and adding hive.server2.proxy.user=${username} to the Ambari Hive View config this started working. Thanks &lt;A rel="user" href="https://community.cloudera.com/users/310/jeff.html" nodeid="310"&gt;@jeff&lt;/A&gt; and &lt;A rel="user" href="https://community.cloudera.com/users/132/abajwa.html" nodeid="132"&gt;@Ali Bajwa&lt;/A&gt;!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 04:07:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120780#M83543</guid>
      <dc:creator>christopher_w_m</dc:creator>
      <dc:date>2016-06-09T04:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120781#M83544</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/687/christopherwmenke.html" nodeid="687"&gt;@Kit Menke&lt;/A&gt; glad to hear it! Thanks for taking the time to update the forum after getting it working.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 05:57:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120781#M83544</guid>
      <dc:creator>abajwa</dc:creator>
      <dc:date>2016-06-09T05:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Ambari Hive View: How to make Hive queries run as current user?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120782#M83545</link>
      <description>&lt;P&gt;Per the JIRA from Jeff, looks like the feature did not work prior to Ambari 2.2+. The &lt;A href="http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.0.0/bk_ambari_views_guide/content/section_kerberos_setup_hive_view.html"&gt;relevant doc section in Ambari 2.2.0.0&lt;/A&gt; looks ok so I think we are good. Although it might be good to update older docs to explicitly call out the fact that running queries as logged in user won't work.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 10:16:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Ambari-Hive-View-How-to-make-Hive-queries-run-as-current/m-p/120782#M83545</guid>
      <dc:creator>abajwa</dc:creator>
      <dc:date>2016-06-09T10:16:07Z</dc:date>
    </item>
  </channel>
</rss>

