Class InMemoryBagUserStateFactory<K,V,W extends BoundedWindow>
java.lang.Object
org.apache.beam.runners.fnexecution.state.InMemoryBagUserStateFactory<K,V,W>
- All Implemented Interfaces:
StateRequestHandlers.BagUserStateHandlerFactory<K,
V, W>
public class InMemoryBagUserStateFactory<K,V,W extends BoundedWindow>
extends Object
implements StateRequestHandlers.BagUserStateHandlerFactory<K,V,W>
Holds user state in memory. Only one key is active at a time due to the GroupReduceFunction being
called once per key. Needs to be reset via
resetForNewKey()
before processing a new key.-
Constructor Details
-
InMemoryBagUserStateFactory
public InMemoryBagUserStateFactory()
-
-
Method Details
-
forUserState
public StateRequestHandlers.BagUserStateHandler<K,V, forUserStateW> (String pTransformId, String userStateId, Coder<K> keyCoder, Coder<V> valueCoder, Coder<W> windowCoder) - Specified by:
forUserState
in interfaceStateRequestHandlers.BagUserStateHandlerFactory<K,
V, W extends BoundedWindow>
-
resetForNewKey
public void resetForNewKey()Prepares previous emitted state handlers for processing a new key.
-