Interface PCollectionView<T>

Type Parameters:
T - the type of the value(s) accessible via this PCollectionView
All Superinterfaces:
PInput, POutput, PValue, Serializable
All Known Implementing Classes:
PCollectionViews.SimplePCollectionView

public interface PCollectionView<T> extends PValue, Serializable
A PCollectionView<T> is an immutable view of a PCollection as a value of type T that can be accessed as a side input to a ParDo transform.

A PCollectionView should always be the output of a PTransform. It is the joint responsibility of this transform and each PipelineRunner to implement the view in a runner-specific manner.

The most common case is using the View transforms to prepare a PCollection for use as a side input to ParDo. See View.asSingleton(), View.asIterable(), and View.asMap() for more detail on specific views available in the SDK.

NOTE: View methods should not be considered to be user-accessible. They are implementation details of how a Runner obtains information required to construct a view, and are subject to change at any time.

  • Method Details

    • getPCollection

      @Internal @Nullable PCollection<?> getPCollection()
      For internal use only.

      Gets the PCollection this PCollectionView was created from.

      The PCollection may not be available in all contexts.

    • getTagInternal

      @Deprecated @Internal TupleTag<?> getTagInternal()
      Deprecated.
      this method will be removed entirely. The PCollection underlying a side input, is part of the side input's specification with a ParDo transform, which will obtain that information via a package-private channel.
      For internal use only.
    • getViewFn

      @Deprecated @Internal ViewFn<?,T> getViewFn()
      Deprecated.
      this method will be removed entirely. The ViewFn for a side input is an attribute of the side input's specification with a ParDo transform, which will obtain this specification via a package-private channel.
      For internal use only.
    • getWindowMappingFn

      @Internal WindowMappingFn<?> getWindowMappingFn()
      For internal use only.

      Returns the WindowMappingFn used to map windows from a main input to the side input of this PCollectionView.

    • getWindowingStrategyInternal

      @Deprecated @Internal WindowingStrategy<?,?> getWindowingStrategyInternal()
      Deprecated.
      this method will be removed entirely. The PCollection underlying a side input, including its WindowingStrategy, is part of the side input's specification with a ParDo transform, which will obtain that information via a package-private channel.
      For internal use only.
    • getCoderInternal

      @Deprecated @Internal Coder<?> getCoderInternal()
      Deprecated.
      this method will be removed entirely. The PCollection underlying a side input, including its Coder, is part of the side input's specification with a ParDo transform, which will obtain that information via a package-private channel.
      For internal use only.