Class SparkSideInputReader
- java.lang.Object
-
- org.apache.beam.runners.spark.structuredstreaming.translation.batch.functions.SparkSideInputReader
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.runners.core.SideInputReader
public class SparkSideInputReader extends java.lang.Object implements org.apache.beam.runners.core.SideInputReader, java.io.SerializableSideInputReader using broadcastedSideInputValues.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> booleancontains(org.apache.beam.sdk.values.PCollectionView<T> view)static org.apache.beam.runners.core.SideInputReadercreate(java.util.Map<java.lang.String,org.apache.spark.broadcast.Broadcast<SideInputValues<?>>> sideInputs)Creates aSideInputReaderfor Spark from a map of PCollectionViewtag idsand the corresponding broadcastedSideInputValues.static org.apache.beam.runners.core.SideInputReaderempty()<T> @Nullable Tget(org.apache.beam.sdk.values.PCollectionView<T> view, org.apache.beam.sdk.transforms.windowing.BoundedWindow window)booleanisEmpty()static voidvalidateMaterializations(java.lang.Iterable<org.apache.beam.sdk.values.PCollectionView<?>> views)
-
-
-
Method Detail
-
empty
public static org.apache.beam.runners.core.SideInputReader empty()
-
create
public static org.apache.beam.runners.core.SideInputReader create(java.util.Map<java.lang.String,org.apache.spark.broadcast.Broadcast<SideInputValues<?>>> sideInputs)
Creates aSideInputReaderfor Spark from a map of PCollectionViewtag idsand the corresponding broadcastedSideInputValues.Note, the materialization of respective
PCollectionViewsshould be validated ahead of time before any costly creation and broadcast ofSideInputValues.
-
validateMaterializations
public static void validateMaterializations(java.lang.Iterable<org.apache.beam.sdk.values.PCollectionView<?>> views)
-
get
public <T> @Nullable T get(org.apache.beam.sdk.values.PCollectionView<T> view, org.apache.beam.sdk.transforms.windowing.BoundedWindow window)- Specified by:
getin interfaceorg.apache.beam.runners.core.SideInputReader
-
contains
public <T> boolean contains(org.apache.beam.sdk.values.PCollectionView<T> view)
- Specified by:
containsin interfaceorg.apache.beam.runners.core.SideInputReader
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.apache.beam.runners.core.SideInputReader
-
-