Hi Marco, 1. RuntimeContext is available to all operators and is bound to the current key (if used in a keyed context). 2. Is the same actually. Not sure why it's exposed twice... So use either one. 3. Is additionally bound to the current window.
On Tue, Feb 9, 2021 at 10:46 PM Marco Villalobos <mvillalo...@kineteque.com> wrote: > Hi, > > I am having a difficult time distinguishing the difference between > RuntimeContext state and global state when using a ProcessWindowFunction. > > A ProcessWindowFunction has three access different kinds of state. > 1. RuntimeContext state. > 2. ProcessWindowFunction.Context global state > 3. ProcessWindowFunction.Context window state. > > It's clear to me that the window state belongs to a window, the lines > seemed a bit blurred between RuntimeContext state and > ProcessWindowFunction.Context global state. > > Can somebody please elaborate on the differences, and when I should use > global state vs runtime context state? > > Thank you. >