Overview
Getting Started
User Guides
API Reference
Development
Migration Guides
Spark SQL
Pandas API on Spark
Structured Streaming
MLlib (DataFrame-based)
Spark Streaming (Legacy)
MLlib (RDD-based)
Spark Core
Resource Management
Errors
pyspark.streaming.DStream.reduceByKey
¶
DStream.
reduceByKey
(
func
:
Callable
[
[
V
,
V
]
,
V
]
,
numPartitions
:
Optional
[
int
]
=
None
)
→ pyspark.streaming.dstream.DStream
[
Tuple
[
K
,
V
]
]
[source]
¶
Return a new DStream by applying reduceByKey to each RDD.
pyspark.streaming.DStream.reduce
pyspark.streaming.DStream.reduceByKeyAndWindow