Spark Streaming Examples with Stateful operations in Spark 1.6.2 Using MapWithState function added in Spark 1.6.2 Versions used: Scala 2.10.4 Spark 1.6.2