<?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 How do I run Spark 2.2 on YARN? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-run-Spark-2-2-on-YARN/m-p/218315#M72274</link>
    <description>&lt;P&gt;I am trying to run Spark 2.2 with HDP 2.6. I stop Spark2 from Ambari, then I run:&lt;/P&gt;&lt;PRE&gt;/home/ed/spark2.2/spark-2.2.0-bin-hadoop2.7/bin/spark-shell --jars /home/ed/.ivy2/jars/stanford-corenlp-3.6.0-models.jar,/home/ed/.ivy2/jars/jersey-bundle-1.19.1.jar --packages databricks:spark-corenlp:0.2.0-s_2.11,edu.stanford.nlp:stanford-corenlp:3.6.0 \--master yarn --deploy-mode client --driver-memory 4g --executor-memory 4g --executor-cores 2 --num-executors 11 --conf spark.hadoop.yarn.timeline-service.enabled=false&lt;/PRE&gt;&lt;P&gt;It used to run fine, then it started giving me:&lt;/P&gt;&lt;PRE&gt;Error initializing SparkContext.org.apache.spark.SparkException: Yarn application has already ended! It might have been killed or unable to launch application master.&lt;/PRE&gt;&lt;P&gt;now it just hangs after:&lt;/P&gt;&lt;PRE&gt;17/12/05 07:41:17 WARN Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.&lt;/PRE&gt;&lt;P&gt;I can run it OK, without --master yarn --deploy-mode client but then I get the driver only as executor.&lt;/P&gt;&lt;P&gt;I have tried spark.hadoop.yarn.timeline-service.enabled = true.&lt;/P&gt;&lt;P&gt;yarn.nodemanager.vmem-check-enabled and pmem are set to false.&lt;/P&gt;&lt;P&gt;Can anyone help or point me where to look for errors? TIA!&lt;/P&gt;&lt;P&gt;PS spark-defaults.conf:&lt;/P&gt;&lt;PRE&gt;spark.driver.extraLibraryPath /usr/hdp/current/hadoop-client/lib/native:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64
spark.eventLog.dir hdfs:///spark2-history/
spark.eventLog.enabled true
spark.executor.extraLibraryPath /usr/hdp/current/hadoop-client/lib/native:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64
spark.history.fs.logDirectory hdfs:///spark2-history/
spark.history.kerberos.keytab none
spark.history.kerberos.principal none
spark.history.provider org.apache.spark.deploy.history.FsHistoryProvider
spark.history.ui.port 18081
spark.yarn.historyServer.address master.royble.co.uk:18081
spark.driver.extraJavaOptions -Dhdp.version=2.6.0.3-8
spark.yarn.am.extraJavaOptions -Dhdp.version=2.6.0.3-8
# spark.eventLog.dir hdfs:///spark-history
# spark.eventLog.enabled true
# spark.history.fs.logDirectory hdfs:///spark-history
# spark.history.provider org.apache.spark.deploy.history.FsHistoryProvider
# spark.history.ui.port 18080
spark.history.kerberos.keytab none
spark.history.kerberos.principal none
spark.yarn.containerLauncherMaxThreads 25
spark.yarn.driver.memoryOverhead 384
spark.yarn.executor.memoryOverhead 384
spark.yarn.historyServer.address spark-server:18081
spark.yarn.max.executor.failures 3
spark.yarn.preserve.staging.files false
spark.yarn.queue default
spark.yarn.scheduler.heartbeat.interval-ms 5000
spark.yarn.submit.file.replication 3
spark.jars.packages com.databricks:spark-csv_2.11:1.4.0
spark.io.compression.codec lzf
spark.yarn.queue default
spark.blockManager.port 38000
spark.broadcast.port 38001
spark.driver.port 38002
spark.executor.port 38003
spark.fileserver.port 38004
spark.replClassServer.port 38005&lt;/PRE&gt;</description>
    <pubDate>Tue, 05 Dec 2017 15:54:41 GMT</pubDate>
    <dc:creator>ed_day</dc:creator>
    <dc:date>2017-12-05T15:54:41Z</dc:date>
    <item>
      <title>How do I run Spark 2.2 on YARN?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-run-Spark-2-2-on-YARN/m-p/218315#M72274</link>
      <description>&lt;P&gt;I am trying to run Spark 2.2 with HDP 2.6. I stop Spark2 from Ambari, then I run:&lt;/P&gt;&lt;PRE&gt;/home/ed/spark2.2/spark-2.2.0-bin-hadoop2.7/bin/spark-shell --jars /home/ed/.ivy2/jars/stanford-corenlp-3.6.0-models.jar,/home/ed/.ivy2/jars/jersey-bundle-1.19.1.jar --packages databricks:spark-corenlp:0.2.0-s_2.11,edu.stanford.nlp:stanford-corenlp:3.6.0 \--master yarn --deploy-mode client --driver-memory 4g --executor-memory 4g --executor-cores 2 --num-executors 11 --conf spark.hadoop.yarn.timeline-service.enabled=false&lt;/PRE&gt;&lt;P&gt;It used to run fine, then it started giving me:&lt;/P&gt;&lt;PRE&gt;Error initializing SparkContext.org.apache.spark.SparkException: Yarn application has already ended! It might have been killed or unable to launch application master.&lt;/PRE&gt;&lt;P&gt;now it just hangs after:&lt;/P&gt;&lt;PRE&gt;17/12/05 07:41:17 WARN Client: Neither spark.yarn.jars nor spark.yarn.archive is set, falling back to uploading libraries under SPARK_HOME.&lt;/PRE&gt;&lt;P&gt;I can run it OK, without --master yarn --deploy-mode client but then I get the driver only as executor.&lt;/P&gt;&lt;P&gt;I have tried spark.hadoop.yarn.timeline-service.enabled = true.&lt;/P&gt;&lt;P&gt;yarn.nodemanager.vmem-check-enabled and pmem are set to false.&lt;/P&gt;&lt;P&gt;Can anyone help or point me where to look for errors? TIA!&lt;/P&gt;&lt;P&gt;PS spark-defaults.conf:&lt;/P&gt;&lt;PRE&gt;spark.driver.extraLibraryPath /usr/hdp/current/hadoop-client/lib/native:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64
spark.eventLog.dir hdfs:///spark2-history/
spark.eventLog.enabled true
spark.executor.extraLibraryPath /usr/hdp/current/hadoop-client/lib/native:/usr/hdp/current/hadoop-client/lib/native/Linux-amd64-64
spark.history.fs.logDirectory hdfs:///spark2-history/
spark.history.kerberos.keytab none
spark.history.kerberos.principal none
spark.history.provider org.apache.spark.deploy.history.FsHistoryProvider
spark.history.ui.port 18081
spark.yarn.historyServer.address master.royble.co.uk:18081
spark.driver.extraJavaOptions -Dhdp.version=2.6.0.3-8
spark.yarn.am.extraJavaOptions -Dhdp.version=2.6.0.3-8
# spark.eventLog.dir hdfs:///spark-history
# spark.eventLog.enabled true
# spark.history.fs.logDirectory hdfs:///spark-history
# spark.history.provider org.apache.spark.deploy.history.FsHistoryProvider
# spark.history.ui.port 18080
spark.history.kerberos.keytab none
spark.history.kerberos.principal none
spark.yarn.containerLauncherMaxThreads 25
spark.yarn.driver.memoryOverhead 384
spark.yarn.executor.memoryOverhead 384
spark.yarn.historyServer.address spark-server:18081
spark.yarn.max.executor.failures 3
spark.yarn.preserve.staging.files false
spark.yarn.queue default
spark.yarn.scheduler.heartbeat.interval-ms 5000
spark.yarn.submit.file.replication 3
spark.jars.packages com.databricks:spark-csv_2.11:1.4.0
spark.io.compression.codec lzf
spark.yarn.queue default
spark.blockManager.port 38000
spark.broadcast.port 38001
spark.driver.port 38002
spark.executor.port 38003
spark.fileserver.port 38004
spark.replClassServer.port 38005&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Dec 2017 15:54:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-run-Spark-2-2-on-YARN/m-p/218315#M72274</guid>
      <dc:creator>ed_day</dc:creator>
      <dc:date>2017-12-05T15:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run Spark 2.2 on YARN?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-run-Spark-2-2-on-YARN/m-p/218316#M72275</link>
      <description>&lt;P&gt;I've also tried the Dhdp.version= fixes from &lt;A href="https://community.hortonworks.com/questions/41710/spark-job-failing-could-not-find-or-load-main-clas.html"&gt;here&lt;/A&gt;. I've not put the new Spark on my other machines, could that be the problem, if so where do I put it? I created a new folder on master but if I use the same folder on the nodes, how does master knwo about it?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2017 01:19:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-run-Spark-2-2-on-YARN/m-p/218316#M72275</guid>
      <dc:creator>ed_day</dc:creator>
      <dc:date>2017-12-06T01:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I run Spark 2.2 on YARN?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-run-Spark-2-2-on-YARN/m-p/218317#M72276</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11394/edday.html" nodeid="11394"&gt;@ed day&lt;/A&gt;: You need to copy spark jars to hdfs and configure the properties spark.yarn.jars or spark.yarn.archive appropriately.&lt;/P&gt;&lt;P&gt;Please refer official documentation: &lt;A href="https://spark.apache.org/docs/latest/running-on-yarn.html#preparations" target="_blank"&gt;https://spark.apache.org/docs/latest/running-on-yarn.html#preparations&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 03:08:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-do-I-run-Spark-2-2-on-YARN/m-p/218317#M72276</guid>
      <dc:creator>sandyy006</dc:creator>
      <dc:date>2017-12-19T03:08:41Z</dc:date>
    </item>
  </channel>
</rss>

