io.gearpump.streaming.dsl
Example:
val data = "This is a good start, bingo!! bingo!!" app.fromCollection(data.lines.toList). // word => (word, count) flatMap(line => line.split("[\\s]+")).map((_, 1)). // (word, count1), (word, count2) => (word, count1 + count2) groupBy(kv => kv._1).reduce(sum(_, _))
val appId = context.submit(app) context.close()
name of app
Example:
val data = "This is a good start, bingo!! bingo!!" app.fromCollection(data.lines.toList). // word => (word, count) flatMap(line => line.split("[\\s]+")).map((_, 1)). // (word, count1), (word, count2) => (word, count1 + count2) groupBy(kv => kv._1).reduce(sum(_, _))
val appId = context.submit(app) context.close()