foreachRDD(func)
foreachRDD(func)
The most generic output operator that applies a function, func, to each RDD generated from the stream. This function should push the data in each RDD to an external system, such as saving the RDD to files, or writing it over the network to a database. Note that the function func is executed in the driver process running the streaming application, and will usually have RDD actions in it that will force the computation of the streaming RDDs.
Example:
PrevioussaveAsHadoopFiles(prefix, [suffix])NextBuild Twitter Scala API Library for Spark Streaming using sbt
Last updated