Alex Fournier
08/25/2023, 11:42 AMRichFlatMap instance, there can not be a concurrent access to flatMap().
• different Task Slots belonging to the same Task Manager may hold analogous Task Chains. The operators running Those are spawned via serialization/deserialization from the ones Constructed in the main() "execution plan" and then initialized individually via open() for example.
• Therefore, holding static attributes in the operator classes is prone to race conditions, but having non-static atttributes is not. However, they need to be flagged as `transient`and properly initialized in open(). However, those attributes will not be part of state and if I want them to be, I will need to convert those attributes into ValueState<> ones and manage them
Is this mental model flawed? If yes, how?Chesnay Schepler
08/25/2023, 11:44 AMAlex Fournier
08/25/2023, 11:48 AMAri Huttunen
08/25/2023, 12:40 PMAri Huttunen
08/25/2023, 12:41 PMChesnay Schepler
08/25/2023, 12:46 PMchain(source -> map) -> sink
These are 2 vertices. If you run this with a parallelism of 1, then there are 2 subtasks total; one for the chain(source -> map) vertex, one for the sink. Both are deployed as a separate task (each using a different thread), but using 1 slot because of slot-sharing (by default!).Chesnay Schepler
08/25/2023, 12:47 PM