<?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: Oozie - Spark Action - Hive in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/48671#M26107</link>
    <description>&lt;P&gt;Found another way of achieving this which also works for PySpark in an Oozie Spark action.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add this to the &amp;lt;spark-opts&amp;gt; tag in the action definition:&lt;/P&gt;&lt;PRE&gt;--conf spark.yarn.appMasterEnv.hive.metastore.uris=thrift://&amp;lt;your-hive-metastore&amp;gt;:9083&lt;/PRE&gt;&lt;P&gt;This will add the metastore URI to the application master environment and should allow successful connection to Hive for using tables inside a PySpark script.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Dec 2016 14:02:49 GMT</pubDate>
    <dc:creator>akasper</dc:creator>
    <dc:date>2016-12-20T14:02:49Z</dc:date>
    <item>
      <title>Oozie - Spark Action - Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40129#M26102</link>
      <description>&lt;P&gt;I'm having problems getting a real hive context in a spark-scala application (jar) that is running as an Oozie spark action. &amp;nbsp; The spark app does write to hdfs folders just fine. &amp;nbsp;But it is unable to see the same tables that I see in the Hue Hive editor. &amp;nbsp;It seems to be pointing to creating a new metastore somewhere. &amp;nbsp;I have tried to include the hive-site.xml in various places but to no affect. &amp;nbsp;I've tried including it in the following locations:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The job xml for the spark action&lt;/LI&gt;&lt;LI&gt;The job xml for the workflow&lt;/LI&gt;&lt;LI&gt;A file tag in the workflow.xml for the spark action&lt;/LI&gt;&lt;LI&gt;etc.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run the code successfully many times in spark-shell. &amp;nbsp; I probably put it incorrectly in one of the locations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts on what I am missing?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 13:53:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40129#M26102</guid>
      <dc:creator>DEHallman</dc:creator>
      <dc:date>2026-04-21T13:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie - Spark Action - Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40817#M26103</link>
      <description>I'm facing exactly the same issue. Trying to run a Spark job that is using a HiveContext from an Oozie Spark action results in the job failing to connect to the Hive metastore. I also tried adding the hive-site.xml in the various mentioned places to no avail. So where would be the right place to configure the Oozie Spark action to play nicely with Hive?</description>
      <pubDate>Fri, 13 May 2016 12:53:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40817#M26103</guid>
      <dc:creator>akasper</dc:creator>
      <dc:date>2016-05-13T12:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie - Spark Action - Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40818#M26104</link>
      <description>&lt;P&gt;I'm off to other areas for the time being due to timeboxing. I will need to figure this out eventually. &amp;nbsp;I did find a few other posts on the web from others having the same problem. &amp;nbsp;But, I did not find solutions. &amp;nbsp;Good luck. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If/when I get back to this and figure it out. &amp;nbsp;I'll post a solution.&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2016 12:56:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40818#M26104</guid>
      <dc:creator>DEHallman</dc:creator>
      <dc:date>2016-05-13T12:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie - Spark Action - Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40910#M26105</link>
      <description>&lt;P&gt;I found a solution, even though it is not the prettiest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Spark job, before creating the SparkContext, you need to set a system property for the Hive metastore URI like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;System.setProperty(&lt;SPAN&gt;"hive.metastore.uris"&lt;/SPAN&gt;&lt;SPAN&gt;, "thrift://&amp;lt;your metastore host&amp;gt;:9083"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;P&gt;I have tried setting this through the Oozie configuration but to no avail. So far, this was the only way to make it work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 07:58:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40910#M26105</guid>
      <dc:creator>akasper</dc:creator>
      <dc:date>2016-05-17T07:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie - Spark Action - Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40937#M26106</link>
      <description>Perfect! I added it and can see the right hive env now. It is pretty enough. Thanks!&lt;BR /&gt;&lt;BR /&gt;Hopefully we can figure out how to do it through Oozie later. But, I'm happy...</description>
      <pubDate>Tue, 17 May 2016 17:32:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/40937#M26106</guid>
      <dc:creator>DEHallman</dc:creator>
      <dc:date>2016-05-17T17:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Oozie - Spark Action - Hive</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/48671#M26107</link>
      <description>&lt;P&gt;Found another way of achieving this which also works for PySpark in an Oozie Spark action.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add this to the &amp;lt;spark-opts&amp;gt; tag in the action definition:&lt;/P&gt;&lt;PRE&gt;--conf spark.yarn.appMasterEnv.hive.metastore.uris=thrift://&amp;lt;your-hive-metastore&amp;gt;:9083&lt;/PRE&gt;&lt;P&gt;This will add the metastore URI to the application master environment and should allow successful connection to Hive for using tables inside a PySpark script.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2016 14:02:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Oozie-Spark-Action-Hive/m-p/48671#M26107</guid>
      <dc:creator>akasper</dc:creator>
      <dc:date>2016-12-20T14:02:49Z</dc:date>
    </item>
  </channel>
</rss>

