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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2.0
    • 2.2.1, 2.3.0
    • Documentation
    • 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(" "))

      Attachments

        Activity

          People

            remisharoon Remis Haroon
            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