Package cz.o2.proxima.beam.core
Class PCollectionTools
- java.lang.Object
-
- cz.o2.proxima.beam.core.PCollectionTools
-
public class PCollectionTools extends java.lang.ObjectVarious tools related to manipulation withPCollections.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.beam.sdk.values.PCollection<StreamElement>reduceAsSnapshot(java.lang.String name, org.apache.beam.sdk.values.PCollection<StreamElement> input)Reduce givenPCollectionfrom updates to snapshot.
-
-
-
Method Detail
-
reduceAsSnapshot
public static org.apache.beam.sdk.values.PCollection<StreamElement> reduceAsSnapshot(@Nullable java.lang.String name, org.apache.beam.sdk.values.PCollection<StreamElement> input)
Reduce givenPCollectionfrom updates to snapshot.The output element's Beam timestamp is set to the maximum input element timestamp (i.e. the
StreamElement.getStamp()of the winning element) viaTimestampCombiner.LATEST. Without this,Combine.perKeyover the global window would assignBoundedWindow.TIMESTAMP_MAX_VALUEto every output element, which would corrupt any downstream logic that stores the Beam element timestamp as a business-logic stamp.- Parameters:
name- name of the operationinput- the otherPCollectioncontaining updates- Returns:
- snapshot
-
-