Package org.apache.beam.sdk.transforms
Class Reify
- java.lang.Object
-
- org.apache.beam.sdk.transforms.Reify
-
public class Reify extends java.lang.Object
PTransforms
for converting between explicit and implicit form of various Beam values.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
PTransform<PCollection<KV<K,TimestampedValue<V>>>,PCollection<KV<K,V>>>extractTimestampsFromValues()
Extracts the timestamps from each value in aKV
.static <T> PTransform<PCollection<T>,PCollection<TimestampedValue<T>>>
timestamps()
Create aPTransform
that will output all inputs wrapped in aTimestampedValue
.static <K,V>
PTransform<PCollection<KV<K,V>>,PCollection<KV<K,TimestampedValue<V>>>>timestampsInValue()
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>>>>windowsInValue()
Create aPTransform
that will output all inputKVs
with the window pane info inside the value.
-
-
-
Method Detail
-
timestamps
public static <T> PTransform<PCollection<T>,PCollection<TimestampedValue<T>>> timestamps()
Create aPTransform
that will output all inputs wrapped in aTimestampedValue
.
-
timestampsInValue
public static <K,V> PTransform<PCollection<KV<K,V>>,PCollection<KV<K,TimestampedValue<V>>>> timestampsInValue()
Create aPTransform
that will output all inputKVs
with the timestamp inside the value.
-
windows
public static <T> PTransform<PCollection<T>,PCollection<ValueInSingleWindow<T>>> 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>>,PCollection<KV<K,ValueInSingleWindow<V>>>> windowsInValue()
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>>>,PCollection<KV<K,V>>> extractTimestampsFromValues()
Extracts the timestamps from each value in aKV
.
-
viewAsValues
public 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.
-
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.
-
-