@Internal public class PCollectionViews extends java.lang.Object
Implementations of PCollectionView
shared across the SDK.
Modifier and Type | Class and Description |
---|---|
static class |
PCollectionViews.IterableViewFn<T>
Deprecated.
See
IterableViewFn2 . |
static class |
PCollectionViews.ListViewFn<T>
Deprecated.
See
ListViewFn2 . |
static class |
PCollectionViews.MapViewFn<K,V>
Deprecated.
See
MapViewFn2 . |
static class |
PCollectionViews.MultimapViewFn<K,V>
Deprecated.
See
MultimapViewFn2 . |
static class |
PCollectionViews.SimplePCollectionView<ElemT,PrimitiveViewT,ViewT,W extends BoundedWindow>
A class for
PCollectionView implementations, with additional type parameters that are
not visible at pipeline assembly time when the view is used as a side input. |
static class |
PCollectionViews.SingletonViewFn<T>
Deprecated.
See
SingletonViewFn2 . |
static interface |
PCollectionViews.TypeDescriptorSupplier<T> |
static class |
PCollectionViews.ValueOrMetadata<T,MetaT>
Stores values or metadata about values.
|
static class |
PCollectionViews.ValueOrMetadataCoder<T,MetaT>
A coder for
PCollectionViews.ValueOrMetadata . |
Constructor and Description |
---|
PCollectionViews() |
Modifier and Type | Method and Description |
---|---|
static <T,W extends BoundedWindow> |
iterableView(PCollection<T> pCollection,
PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy)
Returns a
PCollectionView<Iterable<T>> capable of processing elements windowed using
the provided WindowingStrategy . |
static <T,W extends BoundedWindow> |
iterableViewUsingVoidKey(PCollection<KV<java.lang.Void,T>> pCollection,
PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy)
|
static <T,W extends BoundedWindow> |
listView(PCollection<KV<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>> pCollection,
PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy)
Returns a
PCollectionView<List<T>> capable of processing elements windowed using the
provided WindowingStrategy . |
static <T,W extends BoundedWindow> |
listViewUsingVoidKey(PCollection<KV<java.lang.Void,T>> pCollection,
PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy)
|
static <K,V,W extends BoundedWindow> |
mapView(PCollection<KV<K,V>> pCollection,
PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier,
PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy)
Returns a
PCollectionView<Map<K, V>> capable of processing elements windowed using the
provided WindowingStrategy . |
static <K,V,W extends BoundedWindow> |
mapViewUsingVoidKey(PCollection<KV<java.lang.Void,KV<K,V>>> pCollection,
PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier,
PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy)
|
static <K,V,W extends BoundedWindow> |
multimapView(PCollection<KV<K,V>> pCollection,
PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier,
PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy)
Returns a
PCollectionView<Map<K, Iterable<V>>> capable of processing elements windowed
using the provided WindowingStrategy . |
static <K,V,W extends BoundedWindow> |
multimapViewUsingVoidKey(PCollection<KV<java.lang.Void,KV<K,V>>> pCollection,
PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier,
PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy)
|
static <T,W extends BoundedWindow> |
singletonView(PCollection<T> pCollection,
PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy,
boolean hasDefault,
T defaultValue,
Coder<T> defaultValueCoder)
Returns a
PCollectionView<T> capable of processing elements windowed using the provided
WindowingStrategy . |
static <T,W extends BoundedWindow> |
singletonViewUsingVoidKey(PCollection<KV<java.lang.Void,T>> pCollection,
PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy,
boolean hasDefault,
T defaultValue,
Coder<T> defaultValueCoder)
|
static java.util.Map<TupleTag<?>,PValue> |
toAdditionalInputs(java.lang.Iterable<PCollectionView<?>> views)
Expands a list of
PCollectionView into the form needed for PTransform.getAdditionalInputs() . |
public static <T,W extends BoundedWindow> PCollectionView<T> singletonView(PCollection<T> pCollection, PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy, boolean hasDefault, @Nullable T defaultValue, Coder<T> defaultValueCoder)
PCollectionView<T>
capable of processing elements windowed using the provided
WindowingStrategy
.
If hasDefault
is true
, then the view will take on the value defaultValue
for any empty windows.
@Deprecated public static <T,W extends BoundedWindow> PCollectionView<T> singletonViewUsingVoidKey(PCollection<KV<java.lang.Void,T>> pCollection, PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy, boolean hasDefault, @Nullable T defaultValue, Coder<T> defaultValueCoder)
PCollectionView<T>
capable of processing elements windowed using the provided
WindowingStrategy
.
If hasDefault
is true
, then the view will take on the value defaultValue
for any empty windows.
public static <T,W extends BoundedWindow> PCollectionView<java.lang.Iterable<T>> iterableView(PCollection<T> pCollection, PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy)
PCollectionView<Iterable<T>>
capable of processing elements windowed using
the provided WindowingStrategy
.@Deprecated public static <T,W extends BoundedWindow> PCollectionView<java.lang.Iterable<T>> iterableViewUsingVoidKey(PCollection<KV<java.lang.Void,T>> pCollection, PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy)
PCollectionView<Iterable<T>>
capable of processing elements windowed using
the provided WindowingStrategy
.public static <T,W extends BoundedWindow> PCollectionView<java.util.List<T>> listView(PCollection<KV<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>> pCollection, PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy)
PCollectionView<List<T>>
capable of processing elements windowed using the
provided WindowingStrategy
.@Deprecated public static <T,W extends BoundedWindow> PCollectionView<java.util.List<T>> listViewUsingVoidKey(PCollection<KV<java.lang.Void,T>> pCollection, PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy)
PCollectionView<List<T>>
capable of processing elements windowed using the
provided WindowingStrategy
.public static <K,V,W extends BoundedWindow> PCollectionView<java.util.Map<K,V>> mapView(PCollection<KV<K,V>> pCollection, PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier, PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy)
PCollectionView<Map<K, V>>
capable of processing elements windowed using the
provided WindowingStrategy
.@Deprecated public static <K,V,W extends BoundedWindow> PCollectionView<java.util.Map<K,V>> mapViewUsingVoidKey(PCollection<KV<java.lang.Void,KV<K,V>>> pCollection, PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier, PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy)
PCollectionView<Map<K, V>>
capable of processing elements windowed using the
provided WindowingStrategy
.public static <K,V,W extends BoundedWindow> PCollectionView<java.util.Map<K,java.lang.Iterable<V>>> multimapView(PCollection<KV<K,V>> pCollection, PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier, PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy)
PCollectionView<Map<K, Iterable<V>>>
capable of processing elements windowed
using the provided WindowingStrategy
.@Deprecated public static <K,V,W extends BoundedWindow> PCollectionView<java.util.Map<K,java.lang.Iterable<V>>> multimapViewUsingVoidKey(PCollection<KV<java.lang.Void,KV<K,V>>> pCollection, PCollectionViews.TypeDescriptorSupplier<K> keyTypeDescriptorSupplier, PCollectionViews.TypeDescriptorSupplier<V> valueTypeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy)
PCollectionView<Map<K, Iterable<V>>>
capable of processing elements windowed
using the provided WindowingStrategy
.public static java.util.Map<TupleTag<?>,PValue> toAdditionalInputs(java.lang.Iterable<PCollectionView<?>> views)
PCollectionView
into the form needed for PTransform.getAdditionalInputs()
.