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 theTypeDescriptor
describing 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:ViewFn
Gets the materialization of thisViewFn
.- Specified by:
getMaterialization
in classViewFn<Materializations.MultimapView<K,
V>, Map<K, V>>
-
apply
Description copied from class:ViewFn
A function to adapt a primitive view type to a desired view type. -
getTypeDescriptor
Description copied from class:ViewFn
Return theTypeDescriptor
describing the output of this fn.- Specified by:
getTypeDescriptor
in classViewFn<Materializations.MultimapView<K,
V>, Map<K, V>>
-