Class TimestampedCollector<T>
java.lang.Object
org.apache.flink.streaming.api.operators.TimestampedCollector<T>
- Type Parameters:
T- The type of the elements that can be emitted.
- All Implemented Interfaces:
Output<T>,org.apache.flink.util.Collector<T>
Wrapper around an
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 Summary
ConstructorsConstructorDescriptionTimestampedCollector(Output<StreamRecord<T>> output) Creates a newTimestampedCollectorthat wraps the givenOutput. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()<X> voidcollect(org.apache.flink.util.OutputTag<X> outputTag, StreamRecord<X> record) Emits a record to the side output identified by the givenOutputTag.voidvoidemitLatencyMarker(LatencyMarker latencyMarker) voidemitRecordAttributes(RecordAttributes recordAttributes) Emits aRecordAttributesfrom an operator.voidemitWatermark(WatermarkEvent watermark) Emits aWatermarkfrom an operator, wrapped in aWatermarkEvent.voidemitWatermark(Watermark mark) Emits aWatermarkfrom an operator.voidemitWatermarkStatus(WatermarkStatus watermarkStatus) voidvoidsetAbsoluteTimestamp(long timestamp) voidsetTimestamp(StreamRecord<?> timestampBase)
-
Constructor Details
-
TimestampedCollector
Creates a newTimestampedCollectorthat wraps the givenOutput.
-
-
Method Details
-
collect
- Specified by:
collectin interfaceorg.apache.flink.util.Collector<T>
-
setTimestamp
-
setAbsoluteTimestamp
public void setAbsoluteTimestamp(long timestamp) -
eraseTimestamp
public void eraseTimestamp() -
close
public void close()- Specified by:
closein interfaceorg.apache.flink.util.Collector<T>
-
emitWatermark
Description copied from interface:OutputEmits aWatermarkfrom 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.
- Specified by:
emitWatermarkin interfaceOutput<T>
-
emitWatermarkStatus
- Specified by:
emitWatermarkStatusin interfaceOutput<T>
-
collect
Description copied from interface:OutputEmits a record to the side output identified by the givenOutputTag. -
emitLatencyMarker
- Specified by:
emitLatencyMarkerin interfaceOutput<T>
-
emitRecordAttributes
Description copied from interface:OutputEmits aRecordAttributesfrom an operator. This element is broadcast to all downstream operators.- Specified by:
emitRecordAttributesin interfaceOutput<T>
-
emitWatermark
Description copied from interface:OutputEmits aWatermarkfrom an operator, wrapped in aWatermarkEvent.- Specified by:
emitWatermarkin interfaceOutput<T>
-