Hi all
I'm using 1.0, and have all my data nicely bundled in one allWindow, but
I don't understand the syntax in Scala to make on json out of those for
dumping the whole window into Kafka.
My type is:
val stream: AllWindowedStream[(List[String], Long, Int), TimeWindow]
and I want to do
stream.apply ????????
I've tried to convert the Java example from the documentation to Scala,
but I can't get anything meaningful to compile
allWindowedStream.apply (new AllWindowFunction<Tuple2<String,Integer>,
Integer, Window>() {
public void apply (Window window,
Iterable<Tuple2<String, Integer>> values,
Collector<Integer> out) throws Exception {
int sum = 0;
for (value t: values) {
sum += t.f1;
}
out.collect (new Integer(sum));
}
});
Help very appreciated!
Greetings
--
Bart van Deenen
[email protected]