Assume the dataset given below will be streamed.
Manjunatha J
1

That should not be that hard, it is basically manipulating the stream. The following code is pseudo code, but it should give you an idea how the process.

val twitts = getTwitterStream(….)
val commentsWithHighScore = 
twitts
.filter(twitt => getScore(twitt.commets) > 5)
.map(_.comments)
val usersCount = 
twitts
.map(t => (t.user, (t, 1)))
.reduceByKey((t1, t2) => t1._2 + t2._2)
val userReputations =  
userCount
.filter(_.2._2 >= 2)
.filter(x => getCore(x._2._2) < 6)
.map(_._1.reputation)

This is some of them, you can do the other ones in the same way. As you can see we are only manipulating the stream. You might need to do windowed operations for getting data for an entire day or so.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.