public class SideInputReaderFactory
extends java.lang.Object
This class provides factory methods to create appropriate SideInputReader
implementations based on the execution mode (streaming or batch) to optimize side input access
patterns.
| Constructor and Description |
|---|
SideInputReaderFactory() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.beam.runners.core.SideInputReader |
create(boolean useStreamingSideInput,
java.util.Map<TupleTag<?>,KV<WindowingStrategy<?,?>,SideInputBroadcast<?>>> sideInputs)
Creates and returns a
SideInputReader based on the configuration. |
public static org.apache.beam.runners.core.SideInputReader create(boolean useStreamingSideInput,
java.util.Map<TupleTag<?>,KV<WindowingStrategy<?,?>,SideInputBroadcast<?>>> sideInputs)
SideInputReader based on the configuration.
If streaming side inputs are enabled, returns a direct SparkSideInputReader.
Otherwise, returns a cached version of the side input reader using CachedSideInputReader for better performance in batch processing.
useStreamingSideInput - Whether to use streaming side inputssideInputs - A map of side inputs with their windowing strategies and broadcastsSideInputReader instance appropriate for the current configuration