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 an
Output for user functions that expect a Output. This collector
is mostly like the TimestampedCollector but it
keeps the timestamp in DeclaredVariable and give it to output finally. Most operators
would set the timestamp of the incoming StreamRecord here.-
Constructor Summary
ConstructorsConstructorDescriptionTimestampedCollectorWithDeclaredVariable(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
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 time) voidsetTimestamp(StreamRecord<?> timestampBase)
-
Constructor Details
-
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 Details
-
collect
- Specified by:
collectin interfaceorg.apache.flink.util.Collector<T>
-
setTimestamp
-
setAbsoluteTimestamp
public void setAbsoluteTimestamp(long time) -
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>
-