<?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/135406#M98065</link>
    <description>&lt;P&gt;Using HDP 2.5, submitting from a vanilla Spark 2.1.0 (i.e., not HDP), and deploying with deploy-mode "cluster", we were successful by using a variation on the suggestions of &lt;A rel="user" href="https://community.cloudera.com/users/132/abajwa.html" nodeid="132"&gt;@Ali Bajwa&lt;/A&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Creating a file named "java-opts" in our Spark conf directory containing "-Dhdp.version=2.5.x.x-xx" (subsituting our specific version)&lt;/LI&gt;&lt;LI&gt;Adding into our Spark configuration (via the Spark submit --conf option) "spark.driver.extraJavaOptions=-Dhdp.version=2.5.x.x-xx" and "spark.executor.extraJavaOptions=-Dhdp.version=2.5.x.x-xx" &lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Both of the creation of the "java-opts" file and the spark configuration modifications were required for success in our case.&lt;/P&gt;&lt;P&gt;The "spark.driver.extraJavaOptions" option was definitely necessary in our case, but the "spark.executor.extraJavaOptions" may not be necessary. As I understand it, the "spark.yarn.am.extraJavaOptions" option that Ali mentioned is not relevant in cluster mode.&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/132/abajwa.html" nodeid="132"&gt;&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/132/abajwa.html" nodeid="132"&gt;&lt;/A&gt; &lt;/P&gt;</description>
    <pubDate>Wed, 14 Feb 2018 02:20:52 GMT</pubDate>
    <dc:creator>mathis_andrew</dc:creator>
    <dc:date>2018-02-14T02:20:52Z</dc:date>
  </channel>
</rss>

