Class ViewFn<PrimitiveViewT,ViewT>

java.lang.Object
org.apache.beam.sdk.transforms.ViewFn<PrimitiveViewT,ViewT>
Type Parameters:
PrimitiveViewT - the type of the underlying primitive view required
ViewT - the type of the value(s) accessible via this PCollectionView
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PCollectionViews.InMemoryListFromMultimapViewFn, PCollectionViews.InMemoryListViewFn, PCollectionViews.InMemoryMapFromVoidKeyViewFn, PCollectionViews.InMemoryMapViewFn, PCollectionViews.InMemoryMultimapFromVoidKeyViewFn, PCollectionViews.InMemoryMultimapViewFn, PCollectionViews.IterableBackedListViewFn, PCollectionViews.IterableViewFn, PCollectionViews.IterableViewFn2, PCollectionViews.ListViewFn, PCollectionViews.ListViewFn2, PCollectionViews.MapViewFn, PCollectionViews.MapViewFn2, PCollectionViews.MultimapViewFn, PCollectionViews.MultimapViewFn2, PCollectionViews.SingletonViewFn, PCollectionViews.SingletonViewFn2

@Internal public abstract class ViewFn<PrimitiveViewT,ViewT> extends Object implements Serializable
For internal use only; no backwards-compatibility guarantees.

A function to adapt a primitive "view" of a PCollection - some materialization specified in the Beam model and implemented by the runner - to a user-facing view type for side input.

Both the underlying primitive view and the user-facing view are immutable.

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.

See Also:
  • Constructor Details

    • ViewFn

      public ViewFn()
  • Method Details