Package org.apache.beam.sdk.transforms
Class Reify
java.lang.Object
org.apache.beam.sdk.transforms.Reify
PTransforms
for converting between explicit and implicit form of various Beam
values.-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,
V> PTransform <PCollection<KV<K, TimestampedValue<V>>>, PCollection<KV<K, V>>> Extracts the timestamps from each value in aKV
.static <T> PTransform
<PCollection<T>, PCollection<TimestampedValue<T>>> Create aPTransform
that will output all inputs wrapped in aTimestampedValue
.static <K,
V> PTransform <PCollection<KV<K, V>>, PCollection<KV<K, TimestampedValue<V>>>> Create aPTransform
that will output all inputKVs
with the timestamp inside the value.static <K,
V> PTransform <PCollection<K>, PCollection<KV<K, V>>> viewAsValues
(PCollectionView<V> view, Coder<V> coder) Pairs each element in a collection with the value of a side input associated with the element's window.static <K,
V> PTransform <PBegin, PCollection<V>> viewInGlobalWindow
(PCollectionView<V> view, Coder<V> coder) Returns aPCollection
consisting of a single element, containing the value of the given view in the global window.static <T> PTransform
<PCollection<T>, PCollection<ValueInSingleWindow<T>>> windows()
Create aPTransform
that will reify information from the processing context into instances ofValueInSingleWindow
.static <K,
V> PTransform <PCollection<KV<K, V>>, PCollection<KV<K, ValueInSingleWindow<V>>>> Create aPTransform
that will output all inputKVs
with the window pane info inside the value.
-
Method Details
-
timestamps
Create aPTransform
that will output all inputs wrapped in aTimestampedValue
. -
timestampsInValue
public static <K,V> PTransform<PCollection<KV<K,V>>, timestampsInValue()PCollection<KV<K, TimestampedValue<V>>>> Create aPTransform
that will output all inputKVs
with the timestamp inside the value. -
windows
Create aPTransform
that will reify information from the processing context into instances ofValueInSingleWindow
.- Type Parameters:
T
- element type
-
windowsInValue
public static <K,V> PTransform<PCollection<KV<K,V>>, windowsInValue()PCollection<KV<K, ValueInSingleWindow<V>>>> Create aPTransform
that will output all inputKVs
with the window pane info inside the value. -
extractTimestampsFromValues
public static <K,V> PTransform<PCollection<KV<K,TimestampedValue<V>>>, extractTimestampsFromValues()PCollection<KV<K, V>>> Extracts the timestamps from each value in aKV
. -
viewAsValues
public static <K,V> PTransform<PCollection<K>,PCollection<KV<K, viewAsValuesV>>> (PCollectionView<V> view, Coder<V> coder) Pairs each element in a collection with the value of a side input associated with the element's window. -
viewInGlobalWindow
public static <K,V> PTransform<PBegin,PCollection<V>> viewInGlobalWindow(PCollectionView<V> view, Coder<V> coder) Returns aPCollection
consisting of a single element, containing the value of the given view in the global window.
-