<?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: Avoid Oozie running Hive action with user credential in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Avoid-Oozie-running-Hive-action-with-user-credential/m-p/128031#M55648</link>
    <description>&lt;P&gt;Thx for your reply. I solve the problem by converting the Oozie script to run Hive2.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Mar 2017 20:52:04 GMT</pubDate>
    <dc:creator>alarsen</dc:creator>
    <dc:date>2017-03-06T20:52:04Z</dc:date>
    <item>
      <title>Avoid Oozie running Hive action with user credential</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Avoid-Oozie-running-Hive-action-with-user-credential/m-p/128029#M55646</link>
      <description>&lt;P&gt;I want to run a very simple Oozie workflow with a Hive action on a kerberized cluster.&lt;/P&gt;&lt;P&gt;The problem is that Hive is using my credential and not the Hive-user as it is doing through Hive View.
If I change my access in Ranger for "/apps/..." then the Oozie workflow is working fine. 
But we don't want personal account to have access for "/apps/..." folder 
&lt;/P&gt;&lt;P&gt;How is it possible to achieve do a Hive action where don't have access to "/apps"..." folder on HDFS?&lt;/P&gt;&lt;P&gt;&lt;B&gt;== WORKFLOW.XML == &lt;/B&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&amp;gt;
&amp;lt;workflow-app xmlns="uri:oozie:workflow:0.5" name="oozie_hive_kerberos_test"&amp;gt; 
&amp;lt;credentials&amp;gt; 
	&amp;lt;credential name="hcat" type="hcat"&amp;gt; 
	&amp;lt;property&amp;gt; 
		&amp;lt;name&amp;gt;hcat.metastore.principal&amp;lt;/name&amp;gt; 
		&amp;lt;value&amp;gt;hive/_HOST@&amp;lt;host&amp;gt;.com&amp;lt;/value&amp;gt; 
	&amp;lt;/property&amp;gt; 
	&amp;lt;property&amp;gt; 
		&amp;lt;name&amp;gt;hcat.metastore.uri&amp;lt;/name&amp;gt; 
		&amp;lt;value&amp;gt;thrift://&amp;lt;host&amp;gt;.com:9083&amp;lt;/value&amp;gt; 
	&amp;lt;/property&amp;gt; 
	&amp;lt;/credential&amp;gt; 
&amp;lt;/credentials&amp;gt; 
&amp;lt;start to="hive"/&amp;gt; 
&amp;lt;action cred="hcat" name="hive"&amp;gt; 
	&amp;lt;hive xmlns="uri:oozie:hive-action:0.6"&amp;gt; 
	&amp;lt;job-tracker&amp;gt;${resourceManager}&amp;lt;/job-tracker&amp;gt; 
	&amp;lt;name-node&amp;gt;${nameNode}&amp;lt;/name-node&amp;gt; 
	&amp;lt;query&amp;gt; 
		use XXXXX; 
		drop table if exists YYYY.ZZZZ; 
	&amp;lt;/query&amp;gt; 
	&amp;lt;/hive&amp;gt; 
	&amp;lt;ok to="end"/&amp;gt; 
	&amp;lt;error to="kill"/&amp;gt; 
	&amp;lt;/action&amp;gt; 
	&amp;lt;kill name="kill"&amp;gt; 
&amp;lt;message&amp;gt;${wf:errorMessage(wf:lastErrorNode())}&amp;lt;/message&amp;gt; 
&amp;lt;/kill&amp;gt; 
&amp;lt;end name="end"/&amp;gt; 
&amp;lt;/workflow-app&amp;gt; 
&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;== ERROR MESSAGE ==&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] 
Logging initialized using configuration in /data/hadoop/yarn/local/usercache/MY_USER_NAME/appcache/application_1487006380071_0351/container_e94_1487006380071_0351_01_000002/hive-log4j.properties 
FAILED: SemanticException MetaException(message:org.apache.hadoop.security.AccessControlException: Permission denied: user=MY_USER_NAME, access=EXECUTE, inode="/apps/hive/warehouse/DATABASE.db":hdfs:hdfs:d--------- 
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319) 
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkTraverse(FSPermissionChecker.java:259) 
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:205) 
at org.apache.ranger.authorization.hadoop.RangerHdfsAuthorizer$RangerAccessControlEnforcer.checkPermission(RangerHdfsAuthorizer.java:307) 
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkPermission(FSPermissionChecker.java:190) 
at org.apache.hadoop.hdfs.server.namenode.FSDirectory.checkPermission(FSDirectory.java:1827) &lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Feb 2017 21:34:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Avoid-Oozie-running-Hive-action-with-user-credential/m-p/128029#M55646</guid>
      <dc:creator>alarsen</dc:creator>
      <dc:date>2017-02-27T21:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid Oozie running Hive action with user credential</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Avoid-Oozie-running-Hive-action-with-user-credential/m-p/128030#M55647</link>
      <description>&lt;P&gt;Your "credential" section looks wrong, it should be something like this:&lt;/P&gt;&lt;PRE&gt; &amp;lt;property&amp;gt;
         &amp;lt;name&amp;gt;hcat.metastore.uri&amp;lt;/name&amp;gt;
            &amp;lt;value&amp;gt;thrift://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;&amp;lt;/value&amp;gt;
         &amp;lt;/property&amp;gt;
         &amp;lt;property&amp;gt;
             &amp;lt;name&amp;gt;hcat.metastore.principal&amp;lt;/name&amp;gt;
             &amp;lt;value&amp;gt;hive/&amp;lt;host&amp;gt;@&amp;lt;realm&amp;gt;&amp;lt;/value&amp;gt;
         &amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;On every node where Oozie client is installed you can find good examples for all Oozie actions including Hive action in "/usr/hdp/current/oozie-client/doc/examples". Check file called apps/hive/workflow.xml.security under "examples" and modify job.properties to provide your "realm" and other required parameters. Also, in case of hive2 action be sure to test using HS2 server running in binary transport mode. There were some bugs in http mode on kerberized cluster. This applies only to hive2 action, the hive action you are trying should work on both transport modes.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Mar 2017 09:36:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Avoid-Oozie-running-Hive-action-with-user-credential/m-p/128030#M55647</guid>
      <dc:creator>pminovic</dc:creator>
      <dc:date>2017-03-05T09:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid Oozie running Hive action with user credential</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Avoid-Oozie-running-Hive-action-with-user-credential/m-p/128031#M55648</link>
      <description>&lt;P&gt;Thx for your reply. I solve the problem by converting the Oozie script to run Hive2.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:52:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Avoid-Oozie-running-Hive-action-with-user-credential/m-p/128031#M55648</guid>
      <dc:creator>alarsen</dc:creator>
      <dc:date>2017-03-06T20:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Avoid Oozie running Hive action with user credential</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Avoid-Oozie-running-Hive-action-with-user-credential/m-p/128032#M55649</link>
      <description>&lt;P style="margin-left: 20px;"&gt;Problem solve by using Hive2&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:52:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Avoid-Oozie-running-Hive-action-with-user-credential/m-p/128032#M55649</guid>
      <dc:creator>alarsen</dc:creator>
      <dc:date>2017-03-06T20:52:52Z</dc:date>
    </item>
  </channel>
</rss>

