Re: counting words (not frequency)

2016-07-22 Thread Roshan Naik
Seems a bit convoluted for such a simple problem. I am thinking a custom streaming count() operator will simplify. Wasn¹t able to find examples for custom Streaming operators. -roshan On 7/21/16, 8:00 PM, "hrajaram" wrote: >Can't you use a KeyedStream, I mean keyBy with the sameKey? something

counting words (not frequency)

2016-07-21 Thread Roshan Naik
Was trying to write a simple streaming Flink program that counts the total words(not the frequency) in a fie. I was thinking on the lines of : counts = text.flatMap(new Tokenizer()) .count(); // count() isnt part of streamin APIs (but supported for batching) Any suggestions on how to do this