T - The type of the elments that can be emitted.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() |
void |
collect(T record) |
void |
setTimestamp(long timestamp)
Sets the
timestamp that is attached to elements that get emitted using
collect(T) |
public TimestampedCollector(Output<StreamRecord<T>> output)
TimestampedCollector that wraps the given Output.public void setTimestamp(long timestamp)
timestamp that is attached to elements that get emitted using
collect(T)timestamp - The timestamp in millisecondsCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.