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()
Closes the collector.
|
<X> void |
collect(OutputTag<X> outputTag,
StreamRecord<X> record)
Emits a record to the side output identified by the given
OutputTag . |
void |
collect(T record)
Emits a record.
|
void |
emitLatencyMarker(LatencyMarker latencyMarker) |
void |
emitRecordAttributes(RecordAttributes recordAttributes)
Emits a
RecordAttributes from an operator. |
void |
emitWatermark(Watermark mark)
Emits a
Watermark from an operator. |
void |
emitWatermarkStatus(WatermarkStatus watermarkStatus) |
void |
eraseTimestamp() |
void |
setAbsoluteTimestamp(long timestamp) |
void |
setTimestamp(StreamRecord<?> timestampBase) |
public TimestampedCollector(Output<StreamRecord<T>> output)
TimestampedCollector
that wraps the given Output
.public void setTimestamp(StreamRecord<?> timestampBase)
public void setAbsoluteTimestamp(long timestamp)
public void eraseTimestamp()
public void close()
Collector
public void emitWatermark(Watermark mark)
Output
Watermark
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 void emitWatermarkStatus(WatermarkStatus watermarkStatus)
emitWatermarkStatus
in interface Output<T>
public <X> void collect(OutputTag<X> outputTag, StreamRecord<X> record)
Output
OutputTag
.public void emitLatencyMarker(LatencyMarker latencyMarker)
emitLatencyMarker
in interface Output<T>
public void emitRecordAttributes(RecordAttributes recordAttributes)
Output
RecordAttributes
from an operator. This element is broadcast to all
downstream operators.emitRecordAttributes
in interface Output<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.