Package org.apache.beam.sdk.transforms
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 requiredViewT- the type of the value(s) accessible via thisPCollectionView
- 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
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ViewTapply(PrimitiveViewT primitiveViewT) A function to adapt a primitive view type to a desired view type.abstract Materialization<PrimitiveViewT> Gets the materialization of thisViewFn.abstract TypeDescriptor<ViewT> Return theTypeDescriptordescribing the output of this fn.
-
Constructor Details
-
ViewFn
public ViewFn()
-
-
Method Details
-
getMaterialization
Gets the materialization of thisViewFn. -
apply
A function to adapt a primitive view type to a desired view type. -
getTypeDescriptor
Return theTypeDescriptordescribing the output of this fn.
-