Based on the image above, I need to share the state between two operators, at the moment, from one KeyedProcessFunction
that will manage to process events and convert them from class X to class Y and keep the states for the incoming records to send always the latest information of the class Y to the Python Inference function.
The result from the Inference function needs to be mapped back into class Y and update the state of this object already created on the ProcessFunction
before do Sink
.
As far as I've read Broadcast state is not possible when RocksDB. "No RocksDB state backend: Broadcast state is kept in-memory at runtime and memory provisioning should be done accordingly. This holds for all operator states."
questions:
- What is the best way of doing that as I'm using RocksDB as State Backend?
- Is it possible to share states between a
KeyedProcessFunction
and aRichMapFunction
?