Package org.apache.storm.topology
Class TupleFieldTimestampExtractor
- java.lang.Object
-
- org.apache.storm.topology.TupleFieldTimestampExtractor
-
- All Implemented Interfaces:
Serializable
,TimestampExtractor
public final class TupleFieldTimestampExtractor extends Object implements TimestampExtractor
ATimestampExtractor
that extracts timestamp from a specific field in the tuple.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
extractTimestamp(Tuple tuple)
Return the tuple timestamp indicating the time when the event happened.static TupleFieldTimestampExtractor
of(String fieldName)
String
toString()
-
-
-
Method Detail
-
of
public static TupleFieldTimestampExtractor of(String fieldName)
-
extractTimestamp
public long extractTimestamp(Tuple tuple)
Description copied from interface:TimestampExtractor
Return the tuple timestamp indicating the time when the event happened.- Specified by:
extractTimestamp
in interfaceTimestampExtractor
- Parameters:
tuple
- the tuple- Returns:
- the timestamp
-
-