pyspark.streaming.DStream.mapPartitionsWithIndex

DStream。 mapPartitionsWithIndex ( f:可調用的((int,Iterable(T]],Iterable(U]],preservesPartitioning:bool= )→pyspark.streaming.dstream.DStream(U]

返回一個新的DStream每個抽樣生成通過應用mapPartitionsWithIndex DStream每個抽樣()。