public static class Window.Unbound extends Object
Window transform, with unbound input/output type.
Before being applied, into(org.apache.beam.sdk.transforms.windowing.WindowFn<? super T, ?>) must be
invoked to specify the WindowFn to invoke, which will also
bind the input/output type of this PTransform.
| Modifier and Type | Method and Description |
|---|---|
<T> Window.Bound<T> |
accumulatingFiredPanes()
Returns a new
Window 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 new
Window 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 new
Window PTransform that's like this
transform but that will use the given WindowFn, and that has
its input and output types bound. |
<T> Window.Bound<T> |
triggering(Trigger trigger)
Sets a non-default trigger for this
Window 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.
|
public <T> Window.Bound<T> into(WindowFn<? super T,?> fn)
Window PTransform that's like this
transform but that will use the given WindowFn, and that has
its input and output types bound. Does not modify this transform. The
resulting PTransform is sufficiently specified to be applied,
but more properties can still be specified.@Experimental(value=TRIGGER) public <T> Window.Bound<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.
Must also specify allowed lateness using withAllowedLateness(org.joda.time.Duration) and accumulation
mode using either discardingFiredPanes() or accumulatingFiredPanes().
@Experimental(value=TRIGGER) public <T> Window.Bound<T> discardingFiredPanes()
Window 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.
@Experimental(value=TRIGGER) public <T> Window.Bound<T> accumulatingFiredPanes()
Window 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.
@Experimental(value=TRIGGER) public <T> Window.Bound<T> withAllowedLateness(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.
Depending on the trigger this may not produce a pane with PaneInfo.isLast. See
Window.ClosingBehavior.FIRE_IF_NON_EMPTY for more details.
@Experimental(value=TRIGGER) public <T> Window.Bound<T> withAllowedLateness(Duration allowedLateness, Window.ClosingBehavior behavior)
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.