<?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: Spark 2 on YARN via Oozie Hue wrong version in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/64535#M74445</link>
    <description>&lt;P&gt;I figured it out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After upgrading Spark2 I had to copy all the jar files to a new hdfs dir /user/oozie/share/lib/spark2 and include the oozie-sharelib-spark jar as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the workflow, I had to set a conf parameter with value spark2 (which is the new dir containing all spark2 jars) and updated the share lib in oozie.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;oozie.action.sharelib.for.spark&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;spark2&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Support says this is setup is not supported as of CDH 5.12 though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Feb 2018 15:27:27 GMT</pubDate>
    <dc:creator>jhernandez</dc:creator>
    <dc:date>2018-02-12T15:27:27Z</dc:date>
    <item>
      <title>Spark 2 on YARN via Oozie Hue wrong version</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/64495#M74444</link>
      <description>&lt;P&gt;I followed the instructions, in the &lt;A href="https://www.cloudera.com/documentation/spark2/latest/topics/spark2_installing.html" target="_blank"&gt;cloudera documentation site&lt;/A&gt;, to upgrade Spark 1.6 to Spark 2 in my cluster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- downloaded and installed CSD on each node, master &amp;amp; data&lt;/P&gt;&lt;P&gt;- restarted scm server&lt;/P&gt;&lt;P&gt;- downloaded the parcel and deployed to the cluster&lt;/P&gt;&lt;P&gt;- in CM I added the service Spark 2 to the cluster&lt;/P&gt;&lt;P&gt;- added Spark gateway to all hosts, master and data&lt;/P&gt;&lt;P&gt;- ran python script to set Spark 2 as the default via 'alternatives'&lt;/P&gt;&lt;P&gt;- restarted the cluster&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use SBT and Eclipse to develop code, if I do a simple hello world, &amp;nbsp;and load it via Hue and then use Oozie Spark workflow, the spark version is still Spark 1.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I restarted the cluster but still get this i Hue &amp;gt; Oozie:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Child yarn jobs are found - 
Spark Version 1.6.0-cdh5.12.1
Spark Action Main class        : org.apache.spark.deploy.SparkSubmit

Oozie Spark action configuration&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a different place I should check to set Spark 2 on YARN?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the error log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SparkMain], main() threw exception, org/apache/spark/sql/SparkSession
java.lang.NoClassDefFoundError: org/apache/spark/sql/SparkSession
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
	at java.lang.Class.getMethod0(Class.java:3018)
	at java.lang.Class.getMethod(Class.java:1784)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 13:44:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/64495#M74444</guid>
      <dc:creator>jhernandez</dc:creator>
      <dc:date>2026-04-21T13:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Spark 2 on YARN via Oozie Hue wrong version</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/64535#M74445</link>
      <description>&lt;P&gt;I figured it out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After upgrading Spark2 I had to copy all the jar files to a new hdfs dir /user/oozie/share/lib/spark2 and include the oozie-sharelib-spark jar as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the workflow, I had to set a conf parameter with value spark2 (which is the new dir containing all spark2 jars) and updated the share lib in oozie.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;oozie.action.sharelib.for.spark&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;spark2&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Support says this is setup is not supported as of CDH 5.12 though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 15:27:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/64535#M74445</guid>
      <dc:creator>jhernandez</dc:creator>
      <dc:date>2018-02-12T15:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Spark 2 on YARN via Oozie Hue wrong version</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/79782#M74446</link>
      <description>&lt;P&gt;Hi&lt;SPAN class=""&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;We are&amp;nbsp;using CM 5.12.1, we&amp;nbsp;use both spark on yarn and spark2, the developers are able to run oozie jobs using spark on yarn and they also see the UI interface on Hue under oozie editor. Now they wanted oozie jobs to run through spark2 also. When i perform the steps given by you to add spark2 to oozie, will we be able to see spark2 on the Hue interface &lt;SPAN&gt;under oozie editor&amp;nbsp;&lt;/SPAN&gt;and after doing so will developers be able to run spark2-submit using oozie.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Appreciate your help&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 17:39:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/79782#M74446</guid>
      <dc:creator>sparamas</dc:creator>
      <dc:date>2018-09-13T17:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Spark 2 on YARN via Oozie Hue wrong version</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/79832#M74447</link>
      <description>&lt;P&gt;Sparamas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's is really cool you&amp;nbsp;want to run&amp;nbsp;both versions of Spark. I personally decided to only use Spark 2. The setup is tricky but I have written a few instructions for you&amp;nbsp;&lt;A title="Spark 2 via Hue Shell Workflow" href="http://www.hernandezgraham.com/2018/09/14/cloudera-cdh-12-run-2-via-hue-with-shell/" target="_blank"&gt;Spark 2 via Hue Shell Workflow&lt;/A&gt;&amp;nbsp;in my blog. If I get to it&amp;nbsp;and don't forget to do so, I will post it in GitHub.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you skip the part to setup spark_submit2 as the default with alternatives, which sounds that is your case, then you must define spark_submit2 inside the shell scripts via Hue workflow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;J. Levi&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 14:29:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/79832#M74447</guid>
      <dc:creator>jhernandez</dc:creator>
      <dc:date>2018-09-14T14:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Spark 2 on YARN via Oozie Hue wrong version</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/79842#M74448</link>
      <description>&lt;P&gt;Thanks Levi. I'll try to define&amp;nbsp;&lt;SPAN&gt;spark_submit2 inside the shell scripts via Hue workflow and see how it goes from there.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 17:48:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/79842#M74448</guid>
      <dc:creator>sparamas</dc:creator>
      <dc:date>2018-09-14T17:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Spark 2 on YARN via Oozie Hue wrong version</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/80008#M74449</link>
      <description>&lt;P&gt;Hi Levi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now they say that they want to move completely to spark2 for Oozie to run jobs. In that case the steps which you have given like adding the spark2 libraries and moving the jar files should work correct. And the property which you gave to add,&amp;nbsp;do i need to&amp;nbsp;configure it from Cloudera Manager or go to Oozie.xml file and add the property.&lt;/P&gt;&lt;PRE&gt;&amp;lt;property&amp;gt;
    &amp;lt;name&amp;gt;oozie.action.sharelib.for.spark&amp;lt;/name&amp;gt;
    &amp;lt;value&amp;gt;spark2&amp;lt;/value&amp;gt;
&amp;lt;/property&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 19:53:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/80008#M74449</guid>
      <dc:creator>sparamas</dc:creator>
      <dc:date>2018-09-18T19:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Spark 2 on YARN via Oozie Hue wrong version</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/80054#M74450</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the steps from &lt;A title="Oozie Spark2" href="https://www.ericlin.me/2017/01/how-to-load-different-version-of-spark-into-oozie/" target="_blank"&gt;Eric's Blog&lt;/A&gt;&amp;nbsp;to customize Oozie with Spark 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best of luck with Spark 2!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 19:33:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/80054#M74450</guid>
      <dc:creator>jhernandez</dc:creator>
      <dc:date>2018-09-19T19:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: Spark 2 on YARN via Oozie Hue wrong version</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/80061#M74451</link>
      <description>&lt;P&gt;Thanks Levi&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 21:52:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/80061#M74451</guid>
      <dc:creator>sparamas</dc:creator>
      <dc:date>2018-09-19T21:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: Spark 2 on YARN via Oozie Hue wrong version</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/80305#M74452</link>
      <description>&lt;P&gt;I'm wondering if anyone can help with&amp;nbsp;my issue.&amp;nbsp; I followed the blog from Eric and I can now submit jobs through oozie&amp;nbsp;with spark2 on yarn.&amp;nbsp; However, when I try to write to a Hive table through spark I'm getting an error.&amp;nbsp; In my session, I enable hive support:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;sparkBuilder&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;enableHiveSupport&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm then trying to run an alter table via spark.sql:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;transactions&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;sparkSession&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;sql&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;s"ALTER TABLE transactions DROP IF EXISTS PARTITION(OHREQUID_PART = &lt;/SPAN&gt;&lt;SPAN&gt;$&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;r&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;getInt&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;)}&lt;/SPAN&gt;&lt;SPAN&gt;)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I run this through spark2-submit, it works fine, but if I run through Ozzie I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;User class threw exception: java.lang.NoSuchMethodError: org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Iface.get_all_functions()Lorg/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse;
java.lang.NoSuchMethodError: org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Iface.get_all_functions()Lorg/apache/hadoop/hive/metastore/api/GetAllFunctionsResponse;&lt;/PRE&gt;&lt;P&gt;I've copied all of the spark&amp;nbsp;jars from&amp;nbsp;/opt/cloudera/parcels/SPARK2/lib/spark2/jars/ to&amp;nbsp;/user/oozie/share/lib/lib_&amp;lt;slid&amp;gt;/spark2/, I've uplaoded&amp;nbsp;the hive-site.xml to the same directory, also copied in the oozie-sharelib-spark.jar jar.&amp;nbsp; chown'd&amp;nbsp;all of the files to oozie:oozie.&amp;nbsp; I also have&amp;nbsp;oozie.action.sharelib.for.spark=spark2 set in my properties file.&amp;nbsp; I also made sur ethe jars are showing up in oozie&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;shareliblist&lt;EM&gt;&amp;nbsp;spark2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems like a dependency collision to me, but I'm not sure which jar would be causing the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any insights&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;These are the jars I have loaded in the spark2 sharelib related to hive:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hdfs://nameservice1/user/oozie/share/lib/lib_20180613213413/spark2/hive-metastore-1.1.0-cdh5.13.3.jar&lt;BR /&gt;hdfs://nameservice1/user/oozie/share/lib/lib_20180613213413/spark2/hive-serde-1.1.0-cdh5.13.3.jar&lt;BR /&gt;hdfs://nameservice1/user/oozie/share/lib/lib_20180613213413/spark2/hive-shims-0.23-1.1.0-cdh5.13.3.jar&lt;BR /&gt;hdfs://nameservice1/user/oozie/share/lib/lib_20180613213413/spark2/hive-shims-1.1.0-cdh5.13.3.jar&lt;BR /&gt;hdfs://nameservice1/user/oozie/share/lib/lib_20180613213413/spark2/hive-shims-common-1.1.0-cdh5.13.3.jar&lt;BR /&gt;hdfs://nameservice1/user/oozie/share/lib/lib_20180613213413/spark2/hive-shims-scheduler-1.1.0-cdh5.13.3.jar&lt;BR /&gt;hdfs://nameservice1/user/oozie/share/lib/lib_20180613213413/spark2/hive-site.xml&lt;BR /&gt;hdfs://nameservice1/user/oozie/share/lib/lib_20180613213413/spark2/spark-hive-exec_2.11-2.3.0.cloudera2.jar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Sep 2018 18:47:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Spark-2-on-YARN-via-Oozie-Hue-wrong-version/m-p/80305#M74452</guid>
      <dc:creator>RobXC</dc:creator>
      <dc:date>2018-09-25T18:47:05Z</dc:date>
    </item>
  </channel>
</rss>

