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
ATimestampExtractorthat 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 longextractTimestamp(Tuple tuple)Return the tuple timestamp indicating the time when the event happened.static TupleFieldTimestampExtractorof(String fieldName)StringtoString()
-
-
-
Method Detail
-
of
public static TupleFieldTimestampExtractor of(String fieldName)
-
extractTimestamp
public long extractTimestamp(Tuple tuple)
Description copied from interface:TimestampExtractorReturn the tuple timestamp indicating the time when the event happened.- Specified by:
extractTimestampin interfaceTimestampExtractor- Parameters:
tuple- the tuple- Returns:
- the timestamp
-
-