repartition(numPartitions)
repartition(numPartitions)
Changes the level of parallelism in this DStream by creating more or fewer partitions. By default, Spark set the number of partitions to number of CPU cores (threads) in the Spark machine for parallelism. Each partition can be processed by one CPU core (thread)
Example:
Last updated