DStream.
mapPartitionsWithIndex
Return a new DStream in which each RDD is generated by applying mapPartitionsWithIndex() to each RDDs of this DStream.
previous
pyspark.streaming.DStream.mapPartitions
next
pyspark.streaming.DStream.mapValues