T - The type of elements this Window is applied topublic static class Window.Bound<T> extends PTransform<PCollection<T>,PCollection<T>>
PTransform that windows the elements of a PCollection<T>,
into finite windows according to a user-specified WindowFn<T, B>.name| Modifier and Type | Method and Description |
|---|---|
PCollection<T> |
apply(PCollection<T> input)
Applies this
PTransform on the given InputT, and returns its
Output. |
protected Coder<?> |
getDefaultOutputCoder(PCollection<T> input)
Returns the default
Coder to use for the output of this
single-output PTransform when applied to the given input. |
protected String |
getKindString()
Returns the name to use by default for this
PTransform
(not including the names of any enclosing PTransforms). |
com.google.cloud.dataflow.sdk.util.WindowingStrategy<? super T,?> |
getWindowingStrategy() |
Window.Bound<T> |
named(String name)
Returns a new
Window PTransform that's like this
PTransform but with the specified name. |
Window.Triggering<T> |
triggering(Trigger<?> trigger)
Sets a non-default trigger for this
Window PTransform. |
Window.Bound<T> |
withAllowedLateness(org.joda.time.Duration allowedLateness)
Override the amount of lateness allowed for data elements in the pipeline.
|
getDefaultOutputCoder, getDefaultOutputCoder, getName, toString, validatepublic Window.Bound<T> named(String name)
Window PTransform that's like this
PTransform but with the specified name. Does not
modify this PTransform.
See the discussion of Naming in
ParDo for more
explanation.
@Experimental(value=TRIGGER) public Window.Triggering<T> triggering(Trigger<?> trigger)
Window PTransform.
Elements that are assigned to a specific window will be output when
the trigger fires.
Trigger
has more details on the available triggers.
@Experimental(value=TRIGGER) public Window.Bound<T> withAllowedLateness(org.joda.time.Duration allowedLateness)
Window operation, this will be applied at
the next GroupByKey. Any elements that are later than this as decided by
the system-maintained watermark will be dropped.
This value also determines how long state will be kept around for old windows. Once no elements will be added to a window (because this duration has passed) any state associated with the window will be cleaned up.
public PCollection<T> apply(PCollection<T> input)
PTransformPTransform on the given InputT, and returns its
Output.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
The default implementation throws an exception. A derived class must
either implement apply, or else each runner must supply a custom
implementation via
PipelineRunner.apply(com.google.cloud.dataflow.sdk.transforms.PTransform<InputT, OutputT>, InputT).
apply in class PTransform<PCollection<T>,PCollection<T>>protected Coder<?> getDefaultOutputCoder(PCollection<T> input)
PTransformCoder to use for the output of this
single-output PTransform when applied to the given input.getDefaultOutputCoder in class PTransform<PCollection<T>,PCollection<T>>public com.google.cloud.dataflow.sdk.util.WindowingStrategy<? super T,?> getWindowingStrategy()
protected String getKindString()
PTransformPTransform
(not including the names of any enclosing PTransforms).
By default, returns the base name of this PTransform's class.
The caller is responsible for ensuring that names of applied
PTransforms are unique, e.g., by adding a uniquifying
suffix when needed.
getKindString in class PTransform<PCollection<T>,PCollection<T>>