T - The type of the elements that can be emitted.@Internal public final class TimestampedCollector<T> extends Object implements Output<T>
Output for user functions that expect a Output.
Before giving the TimestampedCollector to a user function you must set
the timestamp that should be attached to emitted elements. Most operators
would set the timestamp of the incoming
StreamRecord here.| Constructor and Description |
|---|
TimestampedCollector(Output<StreamRecord<T>> output)
Creates a new
TimestampedCollector that wraps the given Output. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
<X> void |
collect(org.apache.flink.util.OutputTag<X> outputTag,
StreamRecord<X> record)
Emits a record the side output identified by the given
OutputTag. |
void |
collect(T record) |
void |
emitLatencyMarker(LatencyMarker latencyMarker) |
void |
emitWatermark(Watermark mark)
Emits a
Watermark from an operator. |
void |
eraseTimestamp() |
void |
setAbsoluteTimestamp(long timestamp) |
void |
setTimestamp(StreamRecord<?> timestampBase) |
public TimestampedCollector(Output<StreamRecord<T>> output)
TimestampedCollector that wraps the given Output.public void collect(T record)
collect in interface org.apache.flink.util.Collector<T>public void setTimestamp(StreamRecord<?> timestampBase)
public void setAbsoluteTimestamp(long timestamp)
public void eraseTimestamp()
public void close()
close in interface org.apache.flink.util.Collector<T>public void emitWatermark(Watermark mark)
OutputWatermark from an operator. This watermark is broadcast to all downstream
operators.
A watermark specifies that no element with a timestamp lower or equal to the watermark timestamp will be emitted in the future.
emitWatermark in interface Output<T>public <X> void collect(org.apache.flink.util.OutputTag<X> outputTag,
StreamRecord<X> record)
OutputOutputTag.public void emitLatencyMarker(LatencyMarker latencyMarker)
emitLatencyMarker in interface Output<T>Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.