Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.2.0
-
None
-
Patch
Description
The example code provided in the documentation on 'Spark Streaming Custom Receivers' has an error.
https://spark.apache.org/docs/latest/streaming-custom-receivers.html
// Assuming ssc is the StreamingContext val customReceiverStream = ssc.receiverStream(new CustomReceiver(host, port)) val words = lines.flatMap(_.split(" ")) ...
instead of
lines.flatMap(_.split(" "))
it should be
customReceiverStream.flatMap(_.split(" "))