<?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 Has anyone tried Spark2 jar execution in Yarn cluster mode through Oozie? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127977#M51525</link>
    <description>&lt;P&gt;I'm trying to run the SparkPi example using the example jar in Spark2 and running it through Oozie. Attached are the different configuration files for Oozie:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11404-job-properties.txt"&gt;job-properties.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11405-workflow.xml"&gt;workflow.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt; I've the below directory structure both on local FS and HDFS:&lt;/P&gt;&lt;P&gt;+-~/sparkAction/ &lt;/P&gt;&lt;P&gt;  +-job.properties &lt;/P&gt;&lt;P&gt;  +-workflow.xml &lt;/P&gt;&lt;P&gt;  +-lib/ &lt;/P&gt;&lt;P&gt;      +-spark-examples_2.11-2.0.0.2.5.3.0-37.jar  &lt;/P&gt;&lt;P&gt;      +-spark-hdp-assembly.jar&lt;/P&gt;&lt;P&gt;When I run this using this command as the yarn user :&lt;/P&gt;&lt;P&gt;oozie job -oozie &lt;A href="http://kvs-in-merlin04.int.kronos.com:11000/oozie" target="_blank"&gt;http://kvs-in-merlin04.int.kronos.com:11000/oozie&lt;/A&gt; -config job.properties -run&lt;/P&gt;&lt;P&gt;I'm getting the below error:&lt;/P&gt;&lt;PRE&gt;java.lang.NoClassDefFoundError: org/apache/spark/sql/SparkSession$
	at org.apache.spark.examples.SparkPi$.main(SparkPi.scala:28)
	at org.apache.spark.examples.SparkPi.main(SparkPi.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.spark.deploy.yarn.ApplicationMaster$anon$2.run(ApplicationMaster.scala:559)
Caused by: java.lang.ClassNotFoundException: org.apache.spark.sql.SparkSession$
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more&lt;/PRE&gt;&lt;P&gt;The Oozie launcher successfully starts the SparkPi on yarn so that means there are no permission issues. But the Spark program is not finding the SparkSession class!!!&lt;/P&gt;&lt;P&gt;Please help...&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2017 16:50:53 GMT</pubDate>
    <dc:creator>shikhar_agarwal</dc:creator>
    <dc:date>2017-01-13T16:50:53Z</dc:date>
    <item>
      <title>Has anyone tried Spark2 jar execution in Yarn cluster mode through Oozie?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127977#M51525</link>
      <description>&lt;P&gt;I'm trying to run the SparkPi example using the example jar in Spark2 and running it through Oozie. Attached are the different configuration files for Oozie:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11404-job-properties.txt"&gt;job-properties.txt&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/11405-workflow.xml"&gt;workflow.xml&lt;/A&gt;&lt;/P&gt;&lt;P&gt; I've the below directory structure both on local FS and HDFS:&lt;/P&gt;&lt;P&gt;+-~/sparkAction/ &lt;/P&gt;&lt;P&gt;  +-job.properties &lt;/P&gt;&lt;P&gt;  +-workflow.xml &lt;/P&gt;&lt;P&gt;  +-lib/ &lt;/P&gt;&lt;P&gt;      +-spark-examples_2.11-2.0.0.2.5.3.0-37.jar  &lt;/P&gt;&lt;P&gt;      +-spark-hdp-assembly.jar&lt;/P&gt;&lt;P&gt;When I run this using this command as the yarn user :&lt;/P&gt;&lt;P&gt;oozie job -oozie &lt;A href="http://kvs-in-merlin04.int.kronos.com:11000/oozie" target="_blank"&gt;http://kvs-in-merlin04.int.kronos.com:11000/oozie&lt;/A&gt; -config job.properties -run&lt;/P&gt;&lt;P&gt;I'm getting the below error:&lt;/P&gt;&lt;PRE&gt;java.lang.NoClassDefFoundError: org/apache/spark/sql/SparkSession$
	at org.apache.spark.examples.SparkPi$.main(SparkPi.scala:28)
	at org.apache.spark.examples.SparkPi.main(SparkPi.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.spark.deploy.yarn.ApplicationMaster$anon$2.run(ApplicationMaster.scala:559)
Caused by: java.lang.ClassNotFoundException: org.apache.spark.sql.SparkSession$
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 7 more&lt;/PRE&gt;&lt;P&gt;The Oozie launcher successfully starts the SparkPi on yarn so that means there are no permission issues. But the Spark program is not finding the SparkSession class!!!&lt;/P&gt;&lt;P&gt;Please help...&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 16:50:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127977#M51525</guid>
      <dc:creator>shikhar_agarwal</dc:creator>
      <dc:date>2017-01-13T16:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone tried Spark2 jar execution in Yarn cluster mode through Oozie?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127978#M51526</link>
      <description>&lt;P&gt;I am not sure if Spark2 is supported via Oozie yet but let's say it does, did you add the spark 2 libraries to Oozie sharelib? That will be your first step.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2017 04:06:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127978#M51526</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2017-01-15T04:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone tried Spark2 jar execution in Yarn cluster mode through Oozie?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127979#M51527</link>
      <description>&lt;P&gt;Hi Artem,&lt;/P&gt;&lt;P&gt;Yes i created a new directory under HDFS and included it in the Oozie libpath as below :&lt;/P&gt;&lt;P&gt;oozie.libpath=/user/oozie/share/lib/spark2&lt;/P&gt;&lt;P&gt;I included all the jars from under this Spark2 installation directory /usr/hdp/2.5.3.0-37/spark2/jars to the above HDFS directory but still it gives me this error:&lt;/P&gt;&lt;PRE&gt;Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SparkMain], main() threw exception, Application application_1484116726997_0144 finished with failed status
org.apache.spark.SparkException: Application application_1484116726997_0144 finished with failed status
	at org.apache.spark.deploy.yarn.Client.run(Client.scala:1122)
	at org.apache.spark.deploy.yarn.Client$.main(Client.scala:1169)
	at org.apache.spark.deploy.yarn.Client.main(Client.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$runMain(SparkSubmit.scala:738)
	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
	at org.apache.oozie.action.hadoop.SparkMain.runSpark(SparkMain.java:289)
	at org.apache.oozie.action.hadoop.SparkMain.run(SparkMain.java:211)
	at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:51)
	at org.apache.oozie.action.hadoop.SparkMain.main(SparkMain.java:59)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:242)
	at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
	at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
	at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724)
	at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
log4j:WARN No appenders could be found for logger (org.apache.spark.util.ShutdownHookManager).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See &lt;A href="http://logging.apache.org/log4j/1.2/faq.html#noconfig" target="_blank"&gt;http://logging.apache.org/log4j/1.2/faq.html#noconfig&lt;/A&gt; for more info.&lt;/PRE&gt;&lt;P&gt;Any ideas about what might be causing this error?&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2017 17:14:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127979#M51527</guid>
      <dc:creator>shikhar_agarwal</dc:creator>
      <dc:date>2017-01-15T17:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone tried Spark2 jar execution in Yarn cluster mode through Oozie?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127980#M51528</link>
      <description>&lt;P&gt;Looks like from comments on the following Jira, Spark2 support will arrive with Oozie 5.0 &lt;A href="https://issues.apache.org/jira/plugins/servlet/mobile#issue/OOZIE-2767" target="_blank"&gt;https://issues.apache.org/jira/plugins/servlet/mobile#issue/OOZIE-2767&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jan 2017 23:15:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127980#M51528</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2017-01-15T23:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone tried Spark2 jar execution in Yarn cluster mode through Oozie?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127981#M51529</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/12621/shikharagarwal.html" nodeid="12621"&gt;@Shikhar Agarwal&lt;/A&gt; Spark2 is not officially supported in HDP via Oozie and it is not implemented in Apache Oozie either. Please consider accepting this answer to close the thread. Sorry it's not much of help here.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Feb 2017 22:28:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127981#M51529</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2017-02-13T22:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone tried Spark2 jar execution in Yarn cluster mode through Oozie?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127982#M51530</link>
      <description>&lt;P&gt;Thanks Artem&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 00:29:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127982#M51530</guid>
      <dc:creator>shikhar_agarwal</dc:creator>
      <dc:date>2017-02-14T00:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone tried Spark2 jar execution in Yarn cluster mode through Oozie?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127983#M51531</link>
      <description>&lt;P&gt;Hi Artem, do you have a Hortonworks link stating that Spark2 is not officially supported in HDP via Oozie?  I want to implement Spark2 via Oozie, and using HDP 2.6, and it seems from &lt;A href="https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.0/bk_spark-component-guide/content/ch_oozie-spark-action.html"&gt;this doc&lt;/A&gt; that Spark2 via Oozie (oozie 4.2 in hdp2.6) IS possible.  Perhaps the poster didn't copy some libraries or jars to the spark2 sharelib? (again, see link).&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2017 20:59:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127983#M51531</guid>
      <dc:creator>tshiels</dc:creator>
      <dc:date>2017-06-16T20:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: Has anyone tried Spark2 jar execution in Yarn cluster mode through Oozie?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127984#M51532</link>
      <description>&lt;P&gt;You can see more info from YARN logs&lt;/P&gt;&lt;PRE&gt;yarn logs -applicationId application_1484116726997_0144&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Oct 2017 15:43:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Has-anyone-tried-Spark2-jar-execution-in-Yarn-cluster-mode/m-p/127984#M51532</guid>
      <dc:creator>erkansirin78</dc:creator>
      <dc:date>2017-10-10T15:43:23Z</dc:date>
    </item>
  </channel>
</rss>

