Hi,
Maybe you can try like this?
val transformed= events.map(event => ((event.user, event.ip),
1).reduceByKey(_ +_)
val alarm= transformed.filter(transformed._2 >= 10)

Patrick




--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/Need-help-Creating-a-rule-using-the-Streaming-API-tp27954p27974.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe e-mail: user-unsubscr...@spark.apache.org

Reply via email to