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)
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
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