Re: Problems with window function

2017-10-15 Thread AndreaKinn
KeySelector was exactly what I need. Thank you a lot. I modified my code in this way and now it works: DataStream LCxAccStream = env .addSource(new FlinkKafkaConsumer010<>("LCacc", new CustomDeserializer(), properties)).setParallelism(4)

Re: Problems with window function

2017-10-14 Thread Tony Wei
Hi Andrea, AFAIK, `keyBy` function you used will wrap all keys you selected into `Tuple`. You can use `Tuple.f0` to get your key, whose type will be `String`. If you want the KeyedStream has String Type for its key, you can use `KeySelector` in keyBy function. [1] Hope this will help you. Best Re

Problems with window function

2017-10-14 Thread AndreaKinn
Hi all, I'm trying to implement a time ordering inside a stream using window function. Then my purposes is to order the element inside a tumbling window. This is my code (written following the doc): DataStream LCxAccStream = env .addSource(new FlinkKafkaConsumer010