Package org.apache.beam.sdk.values
Class PCollectionViews.MapViewFn2<K,V>
java.lang.Object
org.apache.beam.sdk.transforms.ViewFn<Materializations.MultimapView<K,V>,Map<K,V>>
org.apache.beam.sdk.values.PCollectionViews.MapViewFn2<K,V>
- All Implemented Interfaces:
Serializable
- Enclosing class:
PCollectionViews
@Internal
public static class PCollectionViews.MapViewFn2<K,V>
extends ViewFn<Materializations.MultimapView<K,V>,Map<K,V>>
Implementation which is able to adapt a multimap materialization to a
Map<K, V>.
For internal use only.
PCollectionViews.MapViewFn is meant to be removed in the future and replaced with this class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMapViewFn2(PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier, PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier) -
Method Summary
Modifier and TypeMethodDescriptionapply(Materializations.MultimapView<K, V> primitiveViewT) A function to adapt a primitive view type to a desired view type.Gets the materialization of thisViewFn.TypeDescriptor<Map<K, V>> Return theTypeDescriptordescribing the output of this fn.
-
Constructor Details
-
MapViewFn2
public MapViewFn2(PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier, PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier)
-
-
Method Details
-
getMaterialization
Description copied from class:ViewFnGets the materialization of thisViewFn.- Specified by:
getMaterializationin classViewFn<Materializations.MultimapView<K,V>, Map<K, V>>
-
apply
Description copied from class:ViewFnA function to adapt a primitive view type to a desired view type. -
getTypeDescriptor
Description copied from class:ViewFnReturn theTypeDescriptordescribing the output of this fn.- Specified by:
getTypeDescriptorin classViewFn<Materializations.MultimapView<K,V>, Map<K, V>>
-