Class StreamingSideInputHandlerFactory
java.lang.Object
org.apache.beam.runners.fnexecution.translation.StreamingSideInputHandlerFactory
- All Implemented Interfaces:
StateRequestHandlers.SideInputHandlerFactory
public class StreamingSideInputHandlerFactory
extends Object
implements StateRequestHandlers.SideInputHandlerFactory
StateRequestHandler
that uses SideInputHandler
to
access the broadcast state that represents side inputs.-
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) forStage
(org.apache.beam.sdk.util.construction.graph.ExecutableStage stage, Map<org.apache.beam.model.pipeline.v1.RunnerApi.ExecutableStagePayload.SideInputId, PCollectionView<?>> viewMapping, org.apache.beam.runners.core.SideInputHandler runnerHandler) Creates a new state handler for the given stage.
-
Method Details
-
forStage
public static StreamingSideInputHandlerFactory forStage(org.apache.beam.sdk.util.construction.graph.ExecutableStage stage, Map<org.apache.beam.model.pipeline.v1.RunnerApi.ExecutableStagePayload.SideInputId, PCollectionView<?>> viewMapping, org.apache.beam.runners.core.SideInputHandler runnerHandler) 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
-