Class TimestampedCollectorWithDeclaredVariable<T>
- java.lang.Object
-
- org.apache.flink.runtime.asyncprocessing.operators.TimestampedCollectorWithDeclaredVariable<T>
-
- Type Parameters:
T- The type of the elements that can be emitted.
- All Implemented Interfaces:
Output<T>,org.apache.flink.util.Collector<T>
@Internal public final class TimestampedCollectorWithDeclaredVariable<T> extends Object implements Output<T>
Wrapper around anOutputfor user functions that expect aOutput. This collector is mostly like theTimestampedCollectorbut it keeps the timestamp inDeclaredVariableand give it to output finally. Most operators would set the timestamp of the incomingStreamRecordhere.
-
-
Constructor Summary
Constructors Constructor Description TimestampedCollectorWithDeclaredVariable(Output<StreamRecord<T>> output, DeclarationContext declarationContext)Creates a newTimestampedCollectorWithDeclaredVariablethat wraps the givenOutput.TimestampedCollectorWithDeclaredVariable(Output<StreamRecord<T>> output, DeclaredVariable<Long> timestamp)Creates a newTimestampedCollectorWithDeclaredVariablethat wraps the givenOutputand givenDeclaredVariablethat holds the timestamp.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()<X> voidcollect(org.apache.flink.util.OutputTag<X> outputTag, StreamRecord<X> record)Emits a record to the side output identified by the givenOutputTag.voidcollect(T record)voidemitLatencyMarker(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)voideraseTimestamp()voidsetAbsoluteTimestamp(long time)voidsetTimestamp(StreamRecord<?> timestampBase)
-
-
-
Constructor Detail
-
TimestampedCollectorWithDeclaredVariable
public TimestampedCollectorWithDeclaredVariable(Output<StreamRecord<T>> output, DeclarationContext declarationContext)
Creates a newTimestampedCollectorWithDeclaredVariablethat wraps the givenOutput.
-
TimestampedCollectorWithDeclaredVariable
public TimestampedCollectorWithDeclaredVariable(Output<StreamRecord<T>> output, DeclaredVariable<Long> timestamp)
Creates a newTimestampedCollectorWithDeclaredVariablethat wraps the givenOutputand givenDeclaredVariablethat holds the timestamp.
-
-
Method Detail
-
collect
public void collect(T record)
- Specified by:
collectin interfaceorg.apache.flink.util.Collector<T>
-
setTimestamp
public void setTimestamp(StreamRecord<?> timestampBase)
-
setAbsoluteTimestamp
public void setAbsoluteTimestamp(long time)
-
eraseTimestamp
public void eraseTimestamp()
-
close
public void close()
- Specified by:
closein interfaceorg.apache.flink.util.Collector<T>
-
emitWatermark
public void emitWatermark(Watermark mark)
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
public void emitWatermarkStatus(WatermarkStatus watermarkStatus)
- Specified by:
emitWatermarkStatusin interfaceOutput<T>
-
collect
public <X> void collect(org.apache.flink.util.OutputTag<X> outputTag, StreamRecord<X> record)Description copied from interface:OutputEmits a record to the side output identified by the givenOutputTag.
-
emitLatencyMarker
public void emitLatencyMarker(LatencyMarker latencyMarker)
- Specified by:
emitLatencyMarkerin interfaceOutput<T>
-
emitRecordAttributes
public void emitRecordAttributes(RecordAttributes recordAttributes)
Description copied from interface:OutputEmits aRecordAttributesfrom an operator. This element is broadcast to all downstream operators.- Specified by:
emitRecordAttributesin interfaceOutput<T>
-
emitWatermark
public void emitWatermark(WatermarkEvent watermark)
Description copied from interface:OutputEmits aWatermarkfrom an operator, wrapped in aWatermarkEvent.- Specified by:
emitWatermarkin interfaceOutput<T>
-
-