<?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 Re: rdd.foreachPartition() does nothing? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26141#M18256</link>
    <description>&lt;P&gt;Is it lazy evaluated so you need to trigger action I guess&lt;/P&gt;</description>
    <pubDate>Wed, 09 Mar 2022 10:49:34 GMT</pubDate>
    <dc:creator>Hubert-Dudek</dc:creator>
    <dc:date>2022-03-09T10:49:34Z</dc:date>
    <item>
      <title>rdd.foreachPartition() does nothing?</title>
      <link>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26139#M18254</link>
      <description>&lt;P&gt;I expected the code below to print "hello" for each partition, and "world" for each record. But when I ran it the code ran but had no print outs of any kind. No errors either. What is happening here?&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%scala
&amp;nbsp;
val rdd = spark.sparkContext.parallelize(Seq(1,2,3,4,5,6,7,8))
rdd.foreachPartition(partition =&amp;gt; {
 println("hello")
 partition.foreach(fun=&amp;gt;{
   println("world")
 })
})&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 03:15:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26139#M18254</guid>
      <dc:creator>p42af</dc:creator>
      <dc:date>2022-03-09T03:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: rdd.foreachPartition() does nothing?</title>
      <link>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26140#M18255</link>
      <description>&lt;P&gt;Check your stdout logs&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 06:56:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26140#M18255</guid>
      <dc:creator>RKNutalapati</dc:creator>
      <dc:date>2022-03-09T06:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: rdd.foreachPartition() does nothing?</title>
      <link>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26141#M18256</link>
      <description>&lt;P&gt;Is it lazy evaluated so you need to trigger action I guess&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2022 10:49:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26141#M18256</guid>
      <dc:creator>Hubert-Dudek</dc:creator>
      <dc:date>2022-03-09T10:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: rdd.foreachPartition() does nothing?</title>
      <link>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26142#M18257</link>
      <description>&lt;P&gt;Hi @Leon P​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to check the executor's logs. Check the Stdout&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 00:24:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26142#M18257</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2022-04-06T00:24:33Z</dc:date>
    </item>
    <item>
      <title>Re: rdd.foreachPartition() does nothing?</title>
      <link>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26143#M18258</link>
      <description>&lt;P&gt;Hi @Leon P​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a friendly follow-up. Do you still need help or you were able to check the executor's logs and find the messages?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 20:54:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/rdd-foreachpartition-does-nothing/m-p/26143#M18258</guid>
      <dc:creator>jose_gonzalez</dc:creator>
      <dc:date>2022-04-25T20:54:39Z</dc:date>
    </item>
  </channel>
</rss>

