<?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 Why we are using shared variables into spark? in Community Articles</title>
    <link>https://community.databricks.com/t5/community-articles/why-we-are-using-shared-variables-into-spark/m-p/76071#M149</link>
    <description>&lt;P&gt;Hello Databricks Community&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;!&lt;/P&gt;&lt;P&gt;I am excited to share my first blog &lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt; post with you all. This is a small and basic introduction to the concept of shared variables in Apache Spark. I hope this post will help those who are new to Spark understand why shared variables are important and how to use them effectively.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When you pass a function like filter() to Spark, it's executed on the worker nodes in the cluster. This function can indeed access variables defined outside of it,&amp;nbsp;but the changes made to those variables are not reflected back to the driver program automatically. This is because each task running on a worker node operates on its own copy of the variables, and&amp;nbsp;these copies are not automatically synchronized with the variables in the driver program.&lt;BR /&gt;&lt;BR /&gt;Accumulators and Broadcast variable are used to remove above drawback ( i.e. we can get the updated values back to our Driver program)&lt;/STRONG&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":handshake:"&gt;🤝&lt;/span&gt; Let's connect, engage, and grow together! I'm eager to hear your thoughts, experiences, and perspectives.&lt;/SPAN&gt;I look forward to your feedback and engaging in discussions with the community.&lt;/P&gt;&lt;P&gt;Thank you for your support!&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2024 12:21:02 GMT</pubDate>
    <dc:creator>Yogic24</dc:creator>
    <dc:date>2024-06-28T12:21:02Z</dc:date>
    <item>
      <title>Why we are using shared variables into spark?</title>
      <link>https://community.databricks.com/t5/community-articles/why-we-are-using-shared-variables-into-spark/m-p/76071#M149</link>
      <description>&lt;P&gt;Hello Databricks Community&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;!&lt;/P&gt;&lt;P&gt;I am excited to share my first blog &lt;span class="lia-unicode-emoji" title=":rocket:"&gt;🚀&lt;/span&gt; post with you all. This is a small and basic introduction to the concept of shared variables in Apache Spark. I hope this post will help those who are new to Spark understand why shared variables are important and how to use them effectively.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When you pass a function like filter() to Spark, it's executed on the worker nodes in the cluster. This function can indeed access variables defined outside of it,&amp;nbsp;but the changes made to those variables are not reflected back to the driver program automatically. This is because each task running on a worker node operates on its own copy of the variables, and&amp;nbsp;these copies are not automatically synchronized with the variables in the driver program.&lt;BR /&gt;&lt;BR /&gt;Accumulators and Broadcast variable are used to remove above drawback ( i.e. we can get the updated values back to our Driver program)&lt;/STRONG&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":handshake:"&gt;🤝&lt;/span&gt; Let's connect, engage, and grow together! I'm eager to hear your thoughts, experiences, and perspectives.&lt;/SPAN&gt;I look forward to your feedback and engaging in discussions with the community.&lt;/P&gt;&lt;P&gt;Thank you for your support!&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 12:21:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/community-articles/why-we-are-using-shared-variables-into-spark/m-p/76071#M149</guid>
      <dc:creator>Yogic24</dc:creator>
      <dc:date>2024-06-28T12:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why we are using shared variables into spark?</title>
      <link>https://community.databricks.com/t5/community-articles/why-we-are-using-shared-variables-into-spark/m-p/76353#M150</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/107220"&gt;@Yogic24&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Welcome to the Databricks Community! Thank you for sharing your first blog post with us, I am sure it will help our community members.&amp;nbsp;&lt;SPAN&gt;Thank you for your contribution and support!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Rishabh&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 17:34:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/community-articles/why-we-are-using-shared-variables-into-spark/m-p/76353#M150</guid>
      <dc:creator>RishabhTiwari07</dc:creator>
      <dc:date>2024-07-01T17:34:35Z</dc:date>
    </item>
  </channel>
</rss>

