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