<?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-defaults.conf constantly being overwritten in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115040#M33956</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11398/zachkirsch.html" nodeid="11398" target="_blank"&gt;@Zach Kirsch&lt;/A&gt;,&lt;/P&gt;&lt;P&gt; I think you are adding your custom jars via editing spark-defaults.conf from command line. Ambari will overwrite your changes when you restart the services(please note that manual editing is not compatible when you manage cluster with ambari).&lt;/P&gt;&lt;P&gt;Instead, go to Ambari UI --&amp;gt; select Spark service --&amp;gt; select config window --&amp;gt; find "Custom spark-defaults"  section and add your jars there. pls refer below sample screenshot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5527-screen-shot-2016-07-05-at-44124-pm.png" style="width: 2038px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23118i8E72E05CF62C3C55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5527-screen-shot-2016-07-05-at-44124-pm.png" alt="5527-screen-shot-2016-07-05-at-44124-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jobin
&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 11:02:49 GMT</pubDate>
    <dc:creator>jgeorge</dc:creator>
    <dc:date>2019-08-19T11:02:49Z</dc:date>
    <item>
      <title>spark-defaults.conf constantly being overwritten</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115039#M33955</link>
      <description>&lt;P&gt;I added a jar to my classpath by adding the extraClassPath options in spark-defaults.conf. Specifically, these two lines:&lt;/P&gt;&lt;PRE&gt;spark.executor.extraClassPath /usr/hdp/2.4.2.0-258/phoenix/phoenix-4.4.0.2.4.2.0-258-client-spark.jar:/usr/share/java/sqljdbc41.jar
spark.driver.extraClassPath   /usr/hdp/2.4.2.0-258/phoenix/phoenix-4.4.0.2.4.2.0-258-client-spark.jar:/usr/share/java/sqljdbc41.jar
&lt;/PRE&gt;&lt;P&gt;I wasn't sure which spark-defaults.conf to edit (here are all of them):&lt;/P&gt;&lt;PRE&gt;$ find / -name spark-defaults*.conf* 2&amp;gt; /dev/null
/usr/hdp/2.4.2.0-258/etc/spark/conf/spark-defaults.conf.template
/usr/hdp/2.4.2.0-258/etc/spark/conf/spark-defaults.conf
/etc/spark/conf.backup/spark-defaults.conf.template
/etc/spark/conf.backup/spark-defaults.conf
/etc/spark/2.4.2.0-258/0/spark-defaults.conf.template
/etc/spark/2.4.2.0-258/0/spark-defaults.conf&lt;/PRE&gt;&lt;P&gt;After some trial and error, my jar only ran successfully when I added the extraClassPath options to /etc/spark/2.4.2.0-258/0/spark-defaults.conf. Editing the others did not resolve the "class not found" exceptions.&lt;/P&gt;&lt;P&gt;However, it seems that my edits to this file are constantly being erased/overwritten. When I tried to run the jar this morning, the lines I had added to the spark-defaults.conf were no longer there, and at the top of the file was "# Generated by Apache Ambari. Mon Jul  4 00:06:17 2016". When I re-added the two lines, everything worked as it did yesterday.&lt;/P&gt;&lt;P&gt;Is there another file I should be editing instead of (or in addition to) /etc/spark/2.4.2.0-258/0/spark-defaults.conf?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 06:01:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115039#M33955</guid>
      <dc:creator>zachkirsch</dc:creator>
      <dc:date>2016-07-06T06:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: spark-defaults.conf constantly being overwritten</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115040#M33956</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11398/zachkirsch.html" nodeid="11398" target="_blank"&gt;@Zach Kirsch&lt;/A&gt;,&lt;/P&gt;&lt;P&gt; I think you are adding your custom jars via editing spark-defaults.conf from command line. Ambari will overwrite your changes when you restart the services(please note that manual editing is not compatible when you manage cluster with ambari).&lt;/P&gt;&lt;P&gt;Instead, go to Ambari UI --&amp;gt; select Spark service --&amp;gt; select config window --&amp;gt; find "Custom spark-defaults"  section and add your jars there. pls refer below sample screenshot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="5527-screen-shot-2016-07-05-at-44124-pm.png" style="width: 2038px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23118i8E72E05CF62C3C55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="5527-screen-shot-2016-07-05-at-44124-pm.png" alt="5527-screen-shot-2016-07-05-at-44124-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jobin
&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:02:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115040#M33956</guid>
      <dc:creator>jgeorge</dc:creator>
      <dc:date>2019-08-19T11:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: spark-defaults.conf constantly being overwritten</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115041#M33957</link>
      <description>&lt;P&gt;I launch my cluster from the command line (via Azure and an ARM template), and ideally I want it to be set up automatically with the right classpath. Is there a way of automating this process (rather than going through the Ambari UI)?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 06:46:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115041#M33957</guid>
      <dc:creator>zachkirsch</dc:creator>
      <dc:date>2016-07-06T06:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: spark-defaults.conf constantly being overwritten</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115042#M33958</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/11398/zachkirsch.html" nodeid="11398"&gt;@Zach Kirsch&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I am assuming you need to update it from command line: you have two options:&lt;/P&gt;&lt;P&gt;- Use Ambari Api and do it&lt;/P&gt;&lt;P&gt;- Use Ambari  configs.sh and get it done. (this one will be easy for you i guess)&lt;/P&gt;&lt;P&gt;example: &lt;/P&gt;&lt;P&gt;/var/lib/ambari-server/resources/scripts/configs.sh set node1 Hortonworks spark-defaults "spark.history.ui.port"  "18090"&lt;/P&gt;&lt;P&gt;[Note: "node1" is my server, "Hortonworks" is my cluster name. Also you will have to restart service to get changes to take effect]&lt;/P&gt;&lt;P&gt;you can find more details here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations"&gt;https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jobin&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 06:54:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115042#M33958</guid>
      <dc:creator>jgeorge</dc:creator>
      <dc:date>2016-07-06T06:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: spark-defaults.conf constantly being overwritten</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115043#M33959</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2016 06:58:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spark-defaults-conf-constantly-being-overwritten/m-p/115043#M33959</guid>
      <dc:creator>zachkirsch</dc:creator>
      <dc:date>2016-07-06T06:58:25Z</dc:date>
    </item>
  </channel>
</rss>

