<?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>topic Exception in thread &amp;quot;main&amp;quot; org.apache.spark.sql.AnalysisException: Cannot modify the value of a Spark config: spark.executor.memory; in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/exception-in-thread-quot-main-quot-org-apache-spark-sql/m-p/34549#M25291</link>
    <description>&lt;P&gt;I am trying to read a 16mb excel file and I was getting a gc overhead limit exceeded error to resolve that i tried to increase my executor memory with,&lt;/P&gt;&lt;P&gt;&lt;I&gt;spark&lt;/I&gt;.&lt;I&gt;conf&lt;/I&gt;.set("spark.executor.memory", "8g")&lt;/P&gt;&lt;P&gt;but i got the following stack :&lt;/P&gt;&lt;P&gt;Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties&lt;/P&gt;&lt;P&gt;Exception in thread "main" org.apache.spark.sql.AnalysisException: Cannot modify the value of a Spark config: spark.executor.memory;&lt;/P&gt;&lt;P&gt;at org.apache.spark.sql.RuntimeConfig.requireNonStaticConf(RuntimeConfig.scala:158)&lt;/P&gt;&lt;P&gt;at org.apache.spark.sql.RuntimeConfig.set(RuntimeConfig.scala:42)&lt;/P&gt;&lt;P&gt;at com.sundogsoftware.spark.spaceTrim.trimmer$.delayedEndpoint$com$sundogsoftware$spark$spaceTrim$trimmer$1(trimmer.scala:29)&lt;/P&gt;&lt;P&gt;at com.sundogsoftware.spark.spaceTrim.trimmer$delayedInit$body.apply(trimmer.scala:9)&lt;/P&gt;&lt;P&gt;at scala.Function0.apply$mcV$sp(Function0.scala:39)&lt;/P&gt;&lt;P&gt;at scala.Function0.apply$mcV$sp$(Function0.scala:39)&lt;/P&gt;&lt;P&gt;at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)&lt;/P&gt;&lt;P&gt;at scala.App.$anonfun$main$1$adapted(App.scala:80)&lt;/P&gt;&lt;P&gt;at scala.collection.immutable.List.foreach(List.scala:431)&lt;/P&gt;&lt;P&gt;at scala.App.main(App.scala:80)&lt;/P&gt;&lt;P&gt;at scala.App.main$(App.scala:78)&lt;/P&gt;&lt;P&gt;at com.sundogsoftware.spark.spaceTrim.trimmer$.main(trimmer.scala:9)&lt;/P&gt;&lt;P&gt;at com.sundogsoftware.spark.spaceTrim.trimmer.main(trimmer.scala)&lt;/P&gt;&lt;P&gt;my code :-&lt;/P&gt;&lt;P&gt;val&amp;nbsp;&lt;I&gt;spark&lt;/I&gt;&amp;nbsp;= SparkSession&lt;/P&gt;&lt;P&gt;.&lt;I&gt;builder&lt;/I&gt;&lt;/P&gt;&lt;P&gt;.appName("schemaTest")&lt;/P&gt;&lt;P&gt;.master("local[*]")&lt;/P&gt;&lt;P&gt;.getOrCreate()&lt;/P&gt;&lt;P&gt;&lt;I&gt;spark&lt;/I&gt;.&lt;I&gt;conf&lt;/I&gt;.set("spark.executor.memory", "8g")&lt;/P&gt;&lt;P&gt;val&amp;nbsp;&lt;I&gt;df&lt;/I&gt;&amp;nbsp;=&amp;nbsp;&lt;I&gt;spark&lt;/I&gt;.read&lt;/P&gt;&lt;P&gt;.format("com.crealytics.spark.excel").&lt;/P&gt;&lt;P&gt;option("header", "true").&lt;/P&gt;&lt;P&gt;option("inferSchema", "false").&lt;/P&gt;&lt;P&gt;option("treatEmptyValuesAsNulls", "false").&lt;/P&gt;&lt;P&gt;option("addColorColumns", "False").&lt;/P&gt;&lt;P&gt;load("data/12file.xlsx")&lt;/P&gt;</description>
    <pubDate>Tue, 23 Nov 2021 05:03:38 GMT</pubDate>
    <dc:creator>sarvesh</dc:creator>
    <dc:date>2021-11-23T05:03:38Z</dc:date>
    <item>
      <title>Exception in thread "main" org.apache.spark.sql.AnalysisException: Cannot modify the value of a Spark config: spark.executor.memory;</title>
      <link>https://community.databricks.com/t5/data-engineering/exception-in-thread-quot-main-quot-org-apache-spark-sql/m-p/34549#M25291</link>
      <description>&lt;P&gt;I am trying to read a 16mb excel file and I was getting a gc overhead limit exceeded error to resolve that i tried to increase my executor memory with,&lt;/P&gt;&lt;P&gt;&lt;I&gt;spark&lt;/I&gt;.&lt;I&gt;conf&lt;/I&gt;.set("spark.executor.memory", "8g")&lt;/P&gt;&lt;P&gt;but i got the following stack :&lt;/P&gt;&lt;P&gt;Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties&lt;/P&gt;&lt;P&gt;Exception in thread "main" org.apache.spark.sql.AnalysisException: Cannot modify the value of a Spark config: spark.executor.memory;&lt;/P&gt;&lt;P&gt;at org.apache.spark.sql.RuntimeConfig.requireNonStaticConf(RuntimeConfig.scala:158)&lt;/P&gt;&lt;P&gt;at org.apache.spark.sql.RuntimeConfig.set(RuntimeConfig.scala:42)&lt;/P&gt;&lt;P&gt;at com.sundogsoftware.spark.spaceTrim.trimmer$.delayedEndpoint$com$sundogsoftware$spark$spaceTrim$trimmer$1(trimmer.scala:29)&lt;/P&gt;&lt;P&gt;at com.sundogsoftware.spark.spaceTrim.trimmer$delayedInit$body.apply(trimmer.scala:9)&lt;/P&gt;&lt;P&gt;at scala.Function0.apply$mcV$sp(Function0.scala:39)&lt;/P&gt;&lt;P&gt;at scala.Function0.apply$mcV$sp$(Function0.scala:39)&lt;/P&gt;&lt;P&gt;at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)&lt;/P&gt;&lt;P&gt;at scala.App.$anonfun$main$1$adapted(App.scala:80)&lt;/P&gt;&lt;P&gt;at scala.collection.immutable.List.foreach(List.scala:431)&lt;/P&gt;&lt;P&gt;at scala.App.main(App.scala:80)&lt;/P&gt;&lt;P&gt;at scala.App.main$(App.scala:78)&lt;/P&gt;&lt;P&gt;at com.sundogsoftware.spark.spaceTrim.trimmer$.main(trimmer.scala:9)&lt;/P&gt;&lt;P&gt;at com.sundogsoftware.spark.spaceTrim.trimmer.main(trimmer.scala)&lt;/P&gt;&lt;P&gt;my code :-&lt;/P&gt;&lt;P&gt;val&amp;nbsp;&lt;I&gt;spark&lt;/I&gt;&amp;nbsp;= SparkSession&lt;/P&gt;&lt;P&gt;.&lt;I&gt;builder&lt;/I&gt;&lt;/P&gt;&lt;P&gt;.appName("schemaTest")&lt;/P&gt;&lt;P&gt;.master("local[*]")&lt;/P&gt;&lt;P&gt;.getOrCreate()&lt;/P&gt;&lt;P&gt;&lt;I&gt;spark&lt;/I&gt;.&lt;I&gt;conf&lt;/I&gt;.set("spark.executor.memory", "8g")&lt;/P&gt;&lt;P&gt;val&amp;nbsp;&lt;I&gt;df&lt;/I&gt;&amp;nbsp;=&amp;nbsp;&lt;I&gt;spark&lt;/I&gt;.read&lt;/P&gt;&lt;P&gt;.format("com.crealytics.spark.excel").&lt;/P&gt;&lt;P&gt;option("header", "true").&lt;/P&gt;&lt;P&gt;option("inferSchema", "false").&lt;/P&gt;&lt;P&gt;option("treatEmptyValuesAsNulls", "false").&lt;/P&gt;&lt;P&gt;option("addColorColumns", "False").&lt;/P&gt;&lt;P&gt;load("data/12file.xlsx")&lt;/P&gt;</description>
      <pubDate>Tue, 23 Nov 2021 05:03:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/exception-in-thread-quot-main-quot-org-apache-spark-sql/m-p/34549#M25291</guid>
      <dc:creator>sarvesh</dc:creator>
      <dc:date>2021-11-23T05:03:38Z</dc:date>
    </item>
  </channel>
</rss>

