Return a new DStream by selecting only the records of the source DStream on which func returns true.
val union = ssc.union(rawStreams) union.filter(_.contains("the")).count().foreachRDD(r => println(s"Grep count: ${r.collect().mkString}"))
Last updated 6 years ago