Semantics of foreachPartition()

2014-12-18 Thread Tobias Pfeiffer
Hi, I have the following code in my application: tmpRdd.foreach(item = { println(abc: + item) }) tmpRdd.foreachPartition(iter = { iter.map(item = { println(xyz: + item) }) }) In the output, I see only the abc prints

Re: Semantics of foreachPartition()

2014-12-18 Thread Tobias Pfeiffer
Hi again, On Thu, Dec 18, 2014 at 6:43 PM, Tobias Pfeiffer t...@preferred.jp wrote: tmpRdd.foreachPartition(iter = { iter.map(item = { println(xyz: + item) }) }) Uh, with iter.foreach(...) it works... the reason being apparently that