Class CreateViewTransform<I,​O>

  • Type Parameters:
    I - input type
    O - materialized output type
    All Implemented Interfaces:
    Serializable, Transform<org.apache.beam.sdk.util.WindowedValue<org.apache.beam.sdk.values.KV<?,​I>>,​org.apache.beam.sdk.util.WindowedValue<O>>

    public final class CreateViewTransform<I,​O>
    extends Object
    implements Transform<org.apache.beam.sdk.util.WindowedValue<org.apache.beam.sdk.values.KV<?,​I>>,​org.apache.beam.sdk.util.WindowedValue<O>>
    This transforms emits materialized data for each window.
    See Also:
    Serialized Form
    • Constructor Detail

      • CreateViewTransform

        public CreateViewTransform​(org.apache.beam.sdk.transforms.ViewFn<org.apache.beam.sdk.transforms.Materializations.MultimapView<Void,​?>,​O> viewFn)
        Constructor of CreateViewTransform.
        Parameters:
        viewFn - the viewFn that materializes data.
    • Method Detail

      • prepare

        public void prepare​(Transform.Context context,
                            OutputCollector<org.apache.beam.sdk.util.WindowedValue<O>> oc)
        Description copied from interface: Transform
        Prepare the transform.
        Specified by:
        prepare in interface Transform<I,​O>
        Parameters:
        context - of the transform.
        oc - that collects outputs.
      • onData

        public void onData​(org.apache.beam.sdk.util.WindowedValue<org.apache.beam.sdk.values.KV<?,​I>> element)
        Description copied from interface: Transform
        On data received.
        Specified by:
        onData in interface Transform<I,​O>
        Parameters:
        element - data received.
      • onWatermark

        public void onWatermark​(Watermark inputWatermark)
        Description copied from interface: Transform
        On watermark received. This method should be called for the minimum watermark among input streams (input watermark). Transform may emit collected data after receiving watermarks.
        Specified by:
        onWatermark in interface Transform<I,​O>
        Parameters:
        inputWatermark - watermark
      • close

        public void close()
        Description copied from interface: Transform
        Close the transform.
        Specified by:
        close in interface Transform<I,​O>