pyspark.streaming.DStream.mapPartitions

DStream.mapPartitions(f: Callable[[Iterable[T]], Iterable[U]], preservesPartitioning: bool = False) → pyspark.streaming.dstream.DStream[U][source]

Return a new DStream in which each RDD is generated by applying mapPartitions() to each RDDs of this DStream.