Sorting a DStream and taking topN

2016-08-07 Thread Ahmed El-Gamal
I have some DStream in Spark Scala and I want to sort it then take the top N. The problem is that whenever I try to run it I get NotSerializableException and the exception message says: This is because the DStream object is being referred to from within the closure. The problem is that I don't kn

Sorting a DStream and taking topN

2016-08-07 Thread Ahmed El-Gamal
I have some DStream in Spark Scala and I want to sort it then take the top N. The problem is that whenever I try to run it I get NotSerializableException and the exception message says: This is because the DStream object is being referred to from within the closure. The problem is that I don't kn