public class SparkSideInputReader
extends java.lang.Object
implements org.apache.beam.runners.core.SideInputReader, java.io.Serializable
SideInputValues
.Modifier and Type | Method and Description |
---|---|
<T> boolean |
contains(PCollectionView<T> view) |
static org.apache.beam.runners.core.SideInputReader |
create(java.util.Map<java.lang.String,org.apache.spark.broadcast.Broadcast<SideInputValues<?>>> sideInputs)
Creates a
SideInputReader for Spark from a map of PCollectionView tag ids and the corresponding broadcasted SideInputValues . |
static org.apache.beam.runners.core.SideInputReader |
empty() |
<T> T |
get(PCollectionView<T> view,
BoundedWindow window) |
boolean |
isEmpty() |
static void |
validateMaterializations(java.lang.Iterable<PCollectionView<?>> views) |
public static org.apache.beam.runners.core.SideInputReader empty()
public static org.apache.beam.runners.core.SideInputReader create(java.util.Map<java.lang.String,org.apache.spark.broadcast.Broadcast<SideInputValues<?>>> sideInputs)
SideInputReader
for Spark from a map of PCollectionView tag ids
and the corresponding broadcasted SideInputValues
.
Note, the materialization of respective PCollectionViews
should be
validated ahead of time before any costly creation and broadcast of SideInputValues
.
public static void validateMaterializations(java.lang.Iterable<PCollectionView<?>> views)
public <T> T get(PCollectionView<T> view, BoundedWindow window)
get
in interface org.apache.beam.runners.core.SideInputReader
public <T> boolean contains(PCollectionView<T> view)
contains
in interface org.apache.beam.runners.core.SideInputReader
public boolean isEmpty()
isEmpty
in interface org.apache.beam.runners.core.SideInputReader