About DStream of operation foreach

 

 ForeachRDD role is to convert DStream rdd, real foreach is rdd.foreach, here is the use of rdd foreachpartition operator, can improve performance.

DStream of tranform RDD can be used within the operator, and will not be executed immediately, because it is not action operator.

Guess you like

Origin www.cnblogs.com/sunpengblog/p/11740727.html