Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-21508

Documentation on 'Spark Streaming Custom Receivers' has error in example code

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.1, 2.3.0
    • Component/s: Documentation
    • Labels:
      None
    • Flags:
      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(" "))

        Attachments

          Activity

            People

            • Assignee:
              remisharoon Remis Haroon
              Reporter:
              remisharoon Remis Haroon
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified