Google Cloud Dataflow SDK for Java, version 1.9.1
Class Window.Unbound
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.windowing.Window.Unbound
-
- Enclosing class:
- Window
public static class Window.Unbound extends Object
An incompleteWindow
transform, with unbound input/output type.Before being applied,
into(com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<? super T, ?>)
must be invoked to specify theWindowFn
to invoke, which will also bind the input/output type of thisPTransform
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description <T> Window.Bound<T>
accumulatingFiredPanes()
Returns a newWindow
PTransform
that uses the registered WindowFn and Triggering behavior, and that accumulates elements in a pane after they are triggered.<T> Window.Bound<T>
discardingFiredPanes()
Returns a newWindow
PTransform
that uses the registered WindowFn and Triggering behavior, and that discards elements in a pane after they are triggered.<T> Window.Bound<T>
into(WindowFn<? super T,?> fn)
Returns a newWindow
PTransform
that's like this transform but that will use the givenWindowFn
, and that has its input and output types bound.Window.Unbound
named(String name)
Returns a newWindow
transform that's like this transform but with the specified name.<T> Window.Bound<T>
triggering(TriggerBuilder<?> trigger)
Sets a non-default trigger for thisWindow
PTransform
.<T> Window.Bound<T>
withAllowedLateness(Duration allowedLateness)
Override the amount of lateness allowed for data elements in the pipeline.<T> Window.Bound<T>
withAllowedLateness(Duration allowedLateness, Window.ClosingBehavior behavior)
Override the amount of lateness allowed for data elements in the pipeline.
-
-
-
Method Detail
-
named
public Window.Unbound named(String name)
Returns a newWindow
transform that's like this transform but with the specified name. Does not modify this transform. The resulting transform is still incomplete.See the discussion of Naming in
ParDo
for more explanation.
-
into
public <T> Window.Bound<T> into(WindowFn<? super T,?> fn)
Returns a newWindow
PTransform
that's like this transform but that will use the givenWindowFn
, and that has its input and output types bound. Does not modify this transform. The resultingPTransform
is sufficiently specified to be applied, but more properties can still be specified.
-
triggering
@Experimental(value=TRIGGER) public <T> Window.Bound<T> triggering(TriggerBuilder<?> trigger)
Sets a non-default trigger for thisWindow
PTransform
. Elements that are assigned to a specific window will be output when the trigger fires.Trigger
has more details on the available triggers.Must also specify allowed lateness using
withAllowedLateness(org.joda.time.Duration)
and accumulation mode using eitherdiscardingFiredPanes()
oraccumulatingFiredPanes()
.
-
discardingFiredPanes
@Experimental(value=TRIGGER) public <T> Window.Bound<T> discardingFiredPanes()
Returns a newWindow
PTransform
that uses the registered WindowFn and Triggering behavior, and that discards elements in a pane after they are triggered.Does not modify this transform. The resulting
PTransform
is sufficiently specified to be applied, but more properties can still be specified.
-
accumulatingFiredPanes
@Experimental(value=TRIGGER) public <T> Window.Bound<T> accumulatingFiredPanes()
Returns a newWindow
PTransform
that uses the registered WindowFn and Triggering behavior, and that accumulates elements in a pane after they are triggered.Does not modify this transform. The resulting
PTransform
is sufficiently specified to be applied, but more properties can still be specified.
-
withAllowedLateness
@Experimental(value=TRIGGER) public <T> Window.Bound<T> withAllowedLateness(Duration allowedLateness)
Override the amount of lateness allowed for data elements in the pipeline. Like the other properties on thisWindow
operation, this will be applied at the nextGroupByKey
. 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.
Depending on the trigger this may not produce a pane with
PaneInfo.isLast
. SeeWindow.ClosingBehavior.FIRE_IF_NON_EMPTY
for more details.
-
withAllowedLateness
@Experimental(value=TRIGGER) public <T> Window.Bound<T> withAllowedLateness(Duration allowedLateness, Window.ClosingBehavior behavior)
Override the amount of lateness allowed for data elements in the pipeline. Like the other properties on thisWindow
operation, this will be applied at the nextGroupByKey
. 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.
-
-