@Experimental(value=OUTPUT_TIME) public class OutputTimeFns extends Object
OutputTimeFn.| Constructor and Description |
|---|
OutputTimeFns() |
| Modifier and Type | Method and Description |
|---|---|
static Instant |
combineOutputTimes(OutputTimeFn<?> outputTimeFn,
Iterable<? extends Instant> outputTimes)
Applies the given
OutputTimeFn to the given output times, obtaining
the output time for a value computed. |
static OutputTimeFn<BoundedWindow> |
outputAtEarliestInputTimestamp()
The policy of outputting at the earliest of the input timestamps for non-late input data
that led to a computed value.
|
static OutputTimeFn<BoundedWindow> |
outputAtEndOfWindow()
The policy of outputting with timestamps at the end of the window.
|
static OutputTimeFn<BoundedWindow> |
outputAtLatestInputTimestamp()
The policy of holding the watermark to the latest of the input timestamps
for non-late input data that led to a computed value.
|
public static OutputTimeFn<BoundedWindow> outputAtEarliestInputTimestamp()
For example, suppose v1 through vn are all on-time
elements being aggregated via some function f into
f(v1, ..., vn. When emitted, the output
timestamp of the result will be the earliest of the event time timestamps
If data arrives late, it has no effect on the output timestamp.
public static OutputTimeFn<BoundedWindow> outputAtLatestInputTimestamp()
For example, suppose v1 through vn are all on-time
elements being aggregated via some function f into
f(v1, ..., vn. When emitted, the output
timestamp of the result will be the latest of the event time timestamps
If data arrives late, it has no effect on the output timestamp.
public static OutputTimeFn<BoundedWindow> outputAtEndOfWindow()
Note that this output timestamp depends only on the window. See {#link dependsOnlyOnWindow()}.
When windows merge, instead of using OutputTimeFn.combine(org.joda.time.Instant, org.joda.time.Instant) to obtain an output
timestamp for the results in the new window, it is mandatory to obtain a new output
timestamp from OutputTimeFn.assignOutputTime(org.joda.time.Instant, W) with the new window and an arbitrary
timestamp (because it is guaranteed that the timestamp is irrelevant).
For non-merging window functions, this OutputTimeFn works transparently.
public static Instant combineOutputTimes(OutputTimeFn<?> outputTimeFn, Iterable<? extends Instant> outputTimes)
OutputTimeFn to the given output times, obtaining
the output time for a value computed. See OutputTimeFn.combine(org.joda.time.Instant, org.joda.time.Instant) for
a full specification.IllegalArgumentException - if outputTimes is empty.