Class 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.
    • Method Detail

      • collect

        public void collect​(T record)
        Specified by:
        collect in interface org.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:
        close in interface org.apache.flink.util.Collector<T>
      • emitWatermark

        public void emitWatermark​(Watermark mark)
        Description copied from interface: Output
        Emits a 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.

        Specified by:
        emitWatermark in interface Output<T>
      • collect

        public <X> void collect​(org.apache.flink.util.OutputTag<X> outputTag,
                                StreamRecord<X> record)
        Description copied from interface: Output
        Emits a record to the side output identified by the given OutputTag.
        Specified by:
        collect in interface Output<T>
        record - The record to collect.