Class SparkSideInputReader
java.lang.Object
org.apache.beam.runners.spark.structuredstreaming.translation.batch.functions.SparkSideInputReader
- All Implemented Interfaces:
Serializable
,org.apache.beam.runners.core.SideInputReader
public class SparkSideInputReader
extends Object
implements org.apache.beam.runners.core.SideInputReader, Serializable
SideInputReader using broadcasted
SideInputValues
.- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> boolean
contains
(PCollectionView<T> view) static org.apache.beam.runners.core.SideInputReader
create
(Map<String, org.apache.spark.broadcast.Broadcast<SideInputValues<?>>> sideInputs) Creates aSideInputReader
for Spark from a map of PCollectionViewtag ids
and the corresponding broadcastedSideInputValues
.static org.apache.beam.runners.core.SideInputReader
empty()
<T> @Nullable T
get
(PCollectionView<T> view, BoundedWindow window) boolean
isEmpty()
static void
validateMaterializations
(Iterable<PCollectionView<?>> views)
-
Method Details
-
empty
public static org.apache.beam.runners.core.SideInputReader empty() -
create
public static org.apache.beam.runners.core.SideInputReader create(Map<String, org.apache.spark.broadcast.Broadcast<SideInputValues<?>>> sideInputs) Creates aSideInputReader
for Spark from a map of PCollectionViewtag ids
and the corresponding broadcastedSideInputValues
.Note, the materialization of respective
PCollectionViews
should be validated ahead of time before any costly creation and broadcast ofSideInputValues
. -
validateMaterializations
-
get
- Specified by:
get
in interfaceorg.apache.beam.runners.core.SideInputReader
-
contains
- Specified by:
contains
in interfaceorg.apache.beam.runners.core.SideInputReader
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceorg.apache.beam.runners.core.SideInputReader
-