<?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: &amp;quot;bad substitution&amp;quot; error running Spark on Yarn in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/quot-bad-substitution-quot-error-running-Spark-on-Yarn/m-p/288335#M213580</link>
    <description>&lt;P&gt;This worked!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already made these changes prior to running the last command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;FONT face="Courier New"&gt;hdp-select status hadoop-client&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Set a couple of parameters&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="Courier New"&gt;export HADOOP_OPTS="-Dhdp.version=2.6.1.0-129”&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="Courier New"&gt;export HADOOP_CONF_DIR=/etc/hadoop/conf&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Source-in the environment&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="Courier New"&gt;source ~/get_env.sh&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;FONT face="Courier New"&gt;Included last two lines to $SPARK_HOME/conf/spark-defaults.conf&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;FONT face="Courier New"&gt;spark.driver.extraJavaOptions &amp;nbsp; -Dhdp.version=2.6.1.0-129&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;&lt;FONT face="Courier New"&gt;spark.yarn.am.extraJavaOptions -Dhdp.version=2.6.1.0-129&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Added Hadoop version under Ambari / Yarn / Advanced / Custom:&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;hdp.version=&lt;SPAN class=""&gt;2.6.1.0-129&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Ensure this runs okay&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="Courier New"&gt;yarn jar hadoop-mapreduce-examples.jar pi 5 5&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Run spark pi example under yarn&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="Courier New"&gt;cd /home/spark/spark-2.4.4-bin-hadoop2.7&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="Courier New"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;FONT face="Courier New"&gt;spark-submit &amp;nbsp; --class org.apache.spark.examples.SparkPi &amp;nbsp;--master yarn &amp;nbsp; --deploy-mode cluster &amp;nbsp; --executor-memory 2G &amp;nbsp;--num-executors 5 &amp;nbsp;--executor-cores 2 &amp;nbsp; --conf spark.authenticate.enableSaslEncryption=true &amp;nbsp; --conf spark.network.sasl.serverAlwaysEncrypt=true &amp;nbsp; --conf spark.authenticate=true &amp;nbsp; examples/jars/spark-examples_2.11-2.4.4.jar &amp;nbsp; 100&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sun, 26 Jan 2020 19:18:33 GMT</pubDate>
    <dc:creator>Srini_hi</dc:creator>
    <dc:date>2020-01-26T19:18:33Z</dc:date>
  </channel>
</rss>

