Hi Marco, I think yes, the operator state could be used in batch mode. Since there is no checkpoint in batch mode, the operator state would serve as a kind of ordinary in-memory storage.
Best, Yun ------------------------------------------------------------------ Sender:Marco Villalobos<[email protected]> Date:2021/06/05 19:56:08 Recipient:JING ZHANG<[email protected]> Cc:user<[email protected]> Theme:Re: Is it possible to use OperatorState, when NOT implementing a source or sink function? Does that work in the DataStream API in Batch Execution Mode? On Sat, Jun 5, 2021 at 12:04 AM JING ZHANG <[email protected]> wrote: Hi,please use `CheckpointedFunction`, you could initialize your operator state in `initializeState` method by using context.getOperatorStateStore().*** Best regards, JING ZHANG Marco Villalobos <[email protected]> 于2021年6月5日周六 下午1:55写道: Is it possible to use OperatorState, when NOT implementing a source or sink function? If yes, then how?
