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 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 a 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.

    • validateMaterializations

      public static void validateMaterializations(Iterable<PCollectionView<?>> views)
    • get

      public <T> @Nullable T get(PCollectionView<T> view, BoundedWindow window)
      Specified by:
      get in interface org.apache.beam.runners.core.SideInputReader
    • contains

      public <T> boolean contains(PCollectionView<T> view)
      Specified by:
      contains in interface org.apache.beam.runners.core.SideInputReader
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.apache.beam.runners.core.SideInputReader