T
- The type of the elements that can be emitted.@Internal public class TimestampedCollector<T> extends Object implements Collector<T>
Output
for user functions that expect a Collector
.
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.
|
void |
collect(T record)
Emits a record.
|
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()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.