pyspark.streaming.DStream.partitionBy

DStream.partitionBy(numPartitions, partitionFunc=<function portable_hash>)[source]

Return a copy of the DStream in which each RDD are partitioned using the specified partitioner.