recipes
recipes copied to clipboard
State Management
it's a great playbook for some starting flink, nice examples
1-2 examples explaining basic state management would be great
Do you have a specific use-case in mind?
It can be simple aggregate function with sum/count of events! If I get some time over this weekend, will try to raise a PR myself, it will be learning for me as well
It can be simple aggregate function with sum/count of events!
I'm not sure if that makes sense as a recipe, because the answer to such a use-case is using the built-in aggregate/reduce mechanism of Flink which handles state on it's own under the hood, like in the Session Windows recipe. We'd like to avoid recipes where the way they are solving the problem isn't quite the appropriate means to do so, even if it would work and show-case how a feature could be used.
The Serializing Timestamped Data recipe shows how to use a ValueState
, and a simple aggregate use-case wouldn't go much further than that I believe.
will try to raise a PR myself
Please be aware that we don't accept PR contributions, as described in the CONTRIBUTING.md.