Stateful Operators

(mapWithState)

Apache Spark 2 / Spark Streaming

@jaceklaskowski / StackOverflow / GitHub / Mastering Apache Spark 2

Agenda

  1. Spark Streaming
  2. StreamingContext
  3. Stream Operators
  4. Web UI

Heads-up

Spark Streaming had almost no notable changes between Spark 1.6 and Spark 2.0. Jacek believes that it will marked deprecated soon and replaced by the modern Structured Streaming.

Spark Streaming

  1. Spark Streaming is the incremental stream processing framework for Apache Spark.
  2. Switch to Mastering Apache Spark 2

StreamingContext

  1. StreamingContext is the entry point for all Spark Streaming functionality.
    
            val ssc = new StreamingContext(sc, Seconds(5))
                  
  2. Switch to Mastering Apache Spark 2

Stream Operators

  1. Stream operators allow for transformations to the records from input DStreams and ultimately trigger computations using output operators.
  2. Switch to Mastering Apache Spark 2

Web UI

  1. Streaming applications have their own web UI with Streaming Statistics Page
  2. Switch to Mastering Apache Spark 2

Recap

  1. Spark Streaming
  2. StreamingContext
  3. Stream Operators
  4. Web UI

Questions?