@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.
Beam views are migrating off of
Iterable<WindowedValue<T>> as a primitive
view type. |
static class |
PCollectionViews.ListViewFn<T>
Deprecated.
Beam views are migrating off of
Iterable<WindowedValue<T>> as a primitive
view type. |
static class |
PCollectionViews.MapViewFn<K,V>
Deprecated.
Beam views are migrating off of
Iterable<WindowedValue<T>> as a primitive
view type. |
static class |
PCollectionViews.MultimapViewFn<K,V>
Deprecated.
Beam views are migrating off of
Iterable<WindowedValue<T>> as a primitive
view type. |
static class |
PCollectionViews.SimplePCollectionView<ElemT,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.
Beam views are migrating off of
Iterable<WindowedValue<T>> as a primitive
view type. |
Constructor and Description |
---|
PCollectionViews() |
Modifier and Type | Method and Description |
---|---|
static <T,W extends BoundedWindow> |
iterableView(PCollection<T> pCollection,
WindowingStrategy<?,W> windowingStrategy,
Coder<T> valueCoder)
Returns a
PCollectionView<Iterable<T>> capable of processing elements encoded using the
provided Coder and windowed using the provided WindowingStrategy . |
static <T,W extends BoundedWindow> |
listView(PCollection<T> pCollection,
WindowingStrategy<?,W> windowingStrategy,
Coder<T> valueCoder)
Returns a
PCollectionView<List<T>> capable of processing elements encoded using the
provided Coder and windowed using the provided WindowingStrategy . |
static <K,V,W extends BoundedWindow> |
mapView(PCollection<KV<K,V>> pCollection,
WindowingStrategy<?,W> windowingStrategy,
Coder<KV<K,V>> valueCoder)
Returns a
PCollectionView<Map<K, V>> capable of processing elements encoded using the
provided Coder and windowed using the provided WindowingStrategy . |
static <K,V,W extends BoundedWindow> |
multimapView(PCollection<KV<K,V>> pCollection,
WindowingStrategy<?,W> windowingStrategy,
Coder<KV<K,V>> valueCoder)
Returns a
PCollectionView<Map<K, Iterable<V>>> capable of processing elements encoded
using the provided Coder and windowed using the provided WindowingStrategy . |
static <T,W extends BoundedWindow> |
singletonView(PCollection<T> pCollection,
WindowingStrategy<?,W> windowingStrategy,
boolean hasDefault,
T defaultValue,
Coder<T> valueCoder)
Returns a
PCollectionView<T> capable of processing elements encoded using the provided
Coder and windowed using the provided * WindowingStrategy . |
public static <T,W extends BoundedWindow> PCollectionView<T> singletonView(PCollection<T> pCollection, WindowingStrategy<?,W> windowingStrategy, boolean hasDefault, @Nullable T defaultValue, Coder<T> valueCoder)
PCollectionView<T>
capable of processing elements encoded using the provided
Coder
and 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, WindowingStrategy<?,W> windowingStrategy, Coder<T> valueCoder)
PCollectionView<Iterable<T>>
capable of processing elements encoded using the
provided Coder
and windowed using the provided WindowingStrategy
.public static <T,W extends BoundedWindow> PCollectionView<java.util.List<T>> listView(PCollection<T> pCollection, WindowingStrategy<?,W> windowingStrategy, Coder<T> valueCoder)
PCollectionView<List<T>>
capable of processing elements encoded using the
provided Coder
and windowed using the provided WindowingStrategy
.public static <K,V,W extends BoundedWindow> PCollectionView<java.util.Map<K,V>> mapView(PCollection<KV<K,V>> pCollection, WindowingStrategy<?,W> windowingStrategy, Coder<KV<K,V>> valueCoder)
PCollectionView<Map<K, V>>
capable of processing elements encoded using the
provided Coder
and 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, WindowingStrategy<?,W> windowingStrategy, Coder<KV<K,V>> valueCoder)
PCollectionView<Map<K, Iterable<V>>>
capable of processing elements encoded
using the provided Coder
and windowed using the provided WindowingStrategy
.