<?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: How to get spark.executor.memory size of spark session? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375396#M242437</link>
    <description>&lt;P&gt;The following articles will help to identify the small file issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;A href="https://community.cloudera.com/t5/Community-Articles/Identify-where-most-of-the-small-file-are-located-in-a-large/ta-p/247253" target="_blank"&gt;https://community.cloudera.com/t5/Community-Articles/Identify-where-most-of-the-small-file-are-located-in-a-large/ta-p/247253&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;A href="https://sauravagarwaldigital.medium.com/too-small-data-solving-small-files-issue-using-spark-b7ef66827a24" target="_blank"&gt;https://sauravagarwaldigital.medium.com/too-small-data-solving-small-files-issue-using-spark-b7ef66827a24&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 20 Aug 2023 15:54:16 GMT</pubDate>
    <dc:creator>RangaReddy</dc:creator>
    <dc:date>2023-08-20T15:54:16Z</dc:date>
    <item>
      <title>How to get spark.executor.memory size of spark session?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375178#M242321</link>
      <description>&lt;DIV class="votecell post-layout--left"&gt;&lt;DIV class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-200"&gt;&lt;SPAN&gt;I am using Spark 2.3.2.3.1.0.0-78. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-200"&gt;&lt;SPAN&gt;I tried to use: &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-200"&gt;&lt;SPAN&gt;spark_session.sparkContext._conf.get('spark.executor.memory') &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class="js-voting-container d-flex jc-center fd-column ai-stretch gs4 fc-black-200"&gt;&lt;SPAN&gt;but I only received 'None'.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;Can someone help me, please?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 14 Aug 2023 08:34:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375178#M242321</guid>
      <dc:creator>sonnh</dc:creator>
      <dc:date>2023-08-14T08:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get spark.executor.memory size of spark session?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375302#M242382</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/105062"&gt;@sonnh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you do not specify &lt;/SPAN&gt;&lt;STRONG&gt;spark.executor.memory&lt;/STRONG&gt;&lt;SPAN&gt; when using &lt;/SPAN&gt;spark-submit or spark-shell&lt;SPAN&gt;, or &lt;/SPAN&gt;pyspark&lt;SPAN&gt;, the &lt;STRONG&gt;default&lt;/STRONG&gt; value for &lt;/SPAN&gt;&lt;STRONG&gt;spark.executor.memory&lt;/STRONG&gt;&lt;SPAN&gt; will be set to &lt;STRONG&gt;1g&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="bg-black rounded-md mb-4"&gt;&lt;DIV class="p-4 overflow-y-auto"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;Launch the Spark Shell by passing the Executor Memory:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="bg-black rounded-md mb-4"&gt;&lt;DIV class="p-4 overflow-y-auto"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;[root@local ~]# pyspark --conf spark.executor.memory=1g
&amp;gt;&amp;gt;&amp;gt; spark.conf.get("spark.executor.memory")
u'1g'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="p-4 overflow-y-auto"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="p-4 overflow-y-auto"&gt;&lt;DIV class="bg-black rounded-md mb-4"&gt;&lt;DIV class="p-4 overflow-y-auto"&gt;&lt;STRONG&gt;Launch the Spark Shell by without passing the Executor Memory:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="p-4 overflow-y-auto"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;[root@local ~]# pyspark
&amp;gt;&amp;gt;&amp;gt; spark.conf.get("spark.executor.memory")
py4j.protocol.Py4JJavaError: An error occurred while calling o66.get. :
java.util.NoSuchElementException: spark.executor.memory ...&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;Spark is not able to detect/load the &lt;STRONG&gt;spark.executor.memory&lt;/STRONG&gt; parameter value from launched spark shell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Reference:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://spark.apache.org/docs/latest/configuration.html" target="_blank" rel="noopener"&gt;https://spark.apache.org/docs/latest/configuration.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 05:29:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375302#M242382</guid>
      <dc:creator>RangaReddy</dc:creator>
      <dc:date>2023-08-17T05:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to get spark.executor.memory size of spark session?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375348#M242413</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Tks &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/78612"&gt;@RangaReddy&lt;/a&gt;&amp;nbsp; My purpose is to collect a series of pagings from an RDBMS and compare it with JVM_HEAP_MEMORY. Do you find this approach acceptable? I believe it could help alleviate the issue of small files on HDFS.&amp;nbsp;&amp;nbsp;I'm facing difficulties in calculating the size of the DataFrame. It seems there's no straightforward way to accomplish it&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 07:24:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375348#M242413</guid>
      <dc:creator>sonnh</dc:creator>
      <dc:date>2023-08-18T07:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get spark.executor.memory size of spark session?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375396#M242437</link>
      <description>&lt;P&gt;The following articles will help to identify the small file issue:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp;&lt;A href="https://community.cloudera.com/t5/Community-Articles/Identify-where-most-of-the-small-file-are-located-in-a-large/ta-p/247253" target="_blank"&gt;https://community.cloudera.com/t5/Community-Articles/Identify-where-most-of-the-small-file-are-located-in-a-large/ta-p/247253&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&lt;A href="https://sauravagarwaldigital.medium.com/too-small-data-solving-small-files-issue-using-spark-b7ef66827a24" target="_blank"&gt;https://sauravagarwaldigital.medium.com/too-small-data-solving-small-files-issue-using-spark-b7ef66827a24&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2023 15:54:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375396#M242437</guid>
      <dc:creator>RangaReddy</dc:creator>
      <dc:date>2023-08-20T15:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get spark.executor.memory size of spark session?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375397#M242438</link>
      <description>&lt;P&gt;To calculate the DataFrame size, you can use SizeEstimator class.&lt;/P&gt;</description>
      <pubDate>Sun, 20 Aug 2023 15:54:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-spark-executor-memory-size-of-spark-session/m-p/375397#M242438</guid>
      <dc:creator>RangaReddy</dc:creator>
      <dc:date>2023-08-20T15:54:49Z</dc:date>
    </item>
  </channel>
</rss>

