@Internal public class PCollectionViews extends java.lang.Object
Implementations of PCollectionView
shared across the SDK.
Modifier and Type | Class and Description |
---|---|
static interface |
PCollectionViews.HasDefaultValue<T> |
static class |
PCollectionViews.IterableViewFn<T>
Deprecated.
|
static class |
PCollectionViews.IterableViewFn2<T>
Implementation which is able to adapt an iterable materialization to a
Iterable<T> . |
static class |
PCollectionViews.ListViewFn<T>
Deprecated.
|
static class |
PCollectionViews.ListViewFn2<T>
Implementation which is able to adapt a multimap materialization to a
List<T> . |
static class |
PCollectionViews.MapViewFn<K,V>
Deprecated.
|
static class |
PCollectionViews.MapViewFn2<K,V>
Implementation which is able to adapt a multimap materialization to a
Map<K, V> . |
static class |
PCollectionViews.MultimapViewFn<K,V>
Deprecated.
|
static class |
PCollectionViews.MultimapViewFn2<K,V>
Implementation which is able to adapt a multimap materialization to a
Map<K,
Iterable<V>> . |
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.
|
static class |
PCollectionViews.SingletonViewFn2<T>
Implementation which is able to adapt an iterable materialization to a
T . |
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(TupleTag<Materializations.MultimapView<java.lang.Void,T>> tag,
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> |
listView(PCollection<KV<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>> pCollection,
TupleTag<Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>> tag,
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,
TupleTag<Materializations.MultimapView<java.lang.Void,T>> tag,
PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier,
WindowingStrategy<?,W> windowingStrategy)
|
static <T,W extends BoundedWindow> |
listViewUsingVoidKey(TupleTag<Materializations.MultimapView<java.lang.Void,T>> tag,
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(TupleTag<Materializations.MultimapView<java.lang.Void,KV<K,V>>> tag,
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(TupleTag<Materializations.MultimapView<java.lang.Void,KV<K,V>>> tag,
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(TupleTag<Materializations.MultimapView<java.lang.Void,T>> tag,
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, 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(TupleTag<Materializations.MultimapView<java.lang.Void,T>> tag, PCollection<KV<java.lang.Void,T>> pCollection, PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier, WindowingStrategy<?,W> windowingStrategy, boolean hasDefault, 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(TupleTag<Materializations.MultimapView<java.lang.Void,T>> tag, 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
.public static <T,W extends BoundedWindow> PCollectionView<java.util.List<T>> listView(PCollection<KV<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>> pCollection, TupleTag<Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>> tag, 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(TupleTag<Materializations.MultimapView<java.lang.Void,T>> tag, 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
.@Deprecated public static <T,W extends BoundedWindow> PCollectionView<java.util.List<T>> listViewUsingVoidKey(PCollection<KV<java.lang.Void,T>> pCollection, TupleTag<Materializations.MultimapView<java.lang.Void,T>> tag, 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(TupleTag<Materializations.MultimapView<java.lang.Void,KV<K,V>>> tag, 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(TupleTag<Materializations.MultimapView<java.lang.Void,KV<K,V>>> tag, 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()
.