Hi,

you are right. There are some limitation about RichReduceFunctions on windows. Maybe the new AggregateFunction `window.aggregate()` could solve your problem, you can provide an accumulator which is your custom state that you can update for each record. I couldn't find a documentation page, it might be created in next weeks after the feature freeze.

Regarding the MapState I loop in Stefan, maybe he can give you some advice here.

Timo




Am 26/04/17 um 04:25 schrieb Sand Stone:
Hi, Flink newbie here.

I played with the API (built from GitHub master), I encountered some
issues but I am not sure if they are limitations or actually by
design:
     1. the data stream reduce method does not take a
RichReduceFunction. The code compiles but throws runtime exception
when submitted. [My intent is to maintain a MapState, more below]

      2. Flink seems to be picky on where the MapState is used at
runtime. MapState is restricted to keyed stream, and cannot be used
with certain operators. However I might need to maintain a MapState
for certain (persistent) keyed state for processing contexts. [I could
use an external kv store via async io API, but I am hoping Flink could
help to maintain the (rocksdb) db instances so I could avoid another
layer of external store].

Any pointer to blog/doc/video is greatly appreciated.

Thanks!


Reply via email to