spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacek Laskowski <ja...@japila.pl>
Subject Why's ds.foreachPartition(println) not possible?
Date Tue, 05 Jul 2016 13:22:56 GMT
Hi,

It's with the master built today. Why can't I call
ds.foreachPartition(println)? Is using type annotation the only way to
go forward? I'd be so sad if that's the case.

scala> ds.foreachPartition(println)
<console>:28: error: overloaded method value foreachPartition with alternatives:
  (func: org.apache.spark.api.java.function.ForeachPartitionFunction[Record])Unit
<and>
  (f: Iterator[Record] => Unit)Unit
 cannot be applied to (Unit)
       ds.foreachPartition(println)
          ^

scala> sc.version
res9: String = 2.0.0-SNAPSHOT

Pozdrawiam,
Jacek Laskowski
----
https://medium.com/@jaceklaskowski/
Mastering Apache Spark http://bit.ly/mastering-apache-spark
Follow me at https://twitter.com/jaceklaskowski

---------------------------------------------------------------------
To unsubscribe e-mail: dev-unsubscribe@spark.apache.org


Mime
View raw message