Class BatchSideInputHandlerFactory
java.lang.Object
org.apache.beam.runners.fnexecution.translation.BatchSideInputHandlerFactory
- All Implemented Interfaces:
StateRequestHandlers.SideInputHandlerFactory
public class BatchSideInputHandlerFactory
extends Object
implements StateRequestHandlers.SideInputHandlerFactory
StateRequestHandler
that uses a BatchSideInputHandlerFactory.SideInputGetter
to access side inputs.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Returns the value for the side input with the given PCollection id from the runner. -
Method Summary
Modifier and TypeMethodDescription<V,
W extends BoundedWindow>
StateRequestHandlers.IterableSideInputHandler<V, W> forIterableSideInput
(String transformId, String sideInputId, Coder<V> elementCoder, Coder<W> windowCoder) <K,
V, W extends BoundedWindow>
StateRequestHandlers.MultimapSideInputHandler<K, V, W> forMultimapSideInput
(String transformId, String sideInputId, KvCoder<K, V> elementCoder, Coder<W> windowCoder) static BatchSideInputHandlerFactory
forStage
(org.apache.beam.sdk.util.construction.graph.ExecutableStage stage, BatchSideInputHandlerFactory.SideInputGetter sideInputGetter) Creates a new state handler for the given stage.
-
Method Details
-
forStage
public static BatchSideInputHandlerFactory forStage(org.apache.beam.sdk.util.construction.graph.ExecutableStage stage, BatchSideInputHandlerFactory.SideInputGetter sideInputGetter) Creates a new state handler for the given stage. Note that this requires a traversal of the stage itself, so this should only be called once per stage rather than once per bundle. -
forIterableSideInput
public <V,W extends BoundedWindow> StateRequestHandlers.IterableSideInputHandler<V,W> forIterableSideInput(String transformId, String sideInputId, Coder<V> elementCoder, Coder<W> windowCoder) Description copied from interface:StateRequestHandlers.SideInputHandlerFactory
Returns anStateRequestHandlers.IterableSideInputHandler
for the givenpTransformId
,sideInputId
. The suppliedelementCoder
andwindowCoder
should be used to encode/decode their respective values.- Specified by:
forIterableSideInput
in interfaceStateRequestHandlers.SideInputHandlerFactory
-
forMultimapSideInput
public <K,V, StateRequestHandlers.MultimapSideInputHandler<K,W extends BoundedWindow> V, forMultimapSideInputW> (String transformId, String sideInputId, KvCoder<K, V> elementCoder, Coder<W> windowCoder) Description copied from interface:StateRequestHandlers.SideInputHandlerFactory
Returns aStateRequestHandlers.MultimapSideInputHandler
for the givenpTransformId
,sideInputId
. The suppliedelementCoder
andwindowCoder
should be used to encode/decode their respective values.- Specified by:
forMultimapSideInput
in interfaceStateRequestHandlers.SideInputHandlerFactory
-