Package org.apache.storm.redis.trident
Class WordCountLookupMapper
java.lang.Object
org.apache.storm.redis.trident.WordCountLookupMapper
- All Implemented Interfaces:
- Serializable,- RedisLookupMapper,- RedisMapper,- TupleMapper
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddeclareOutputFields(OutputFieldsDeclarer declarer) declare what are the fields that this code will output.Returns descriptor which defines data type.getKeyFromTuple(ITuple tuple) Extracts key from tuple.getValueFromTuple(ITuple tuple) Extracts value from tuple.Converts return value from Redis to a list of storm values that can be emitted.
- 
Constructor Details- 
WordCountLookupMapperpublic WordCountLookupMapper()
 
- 
- 
Method Details- 
toTupleDescription copied from interface:RedisLookupMapperConverts return value from Redis to a list of storm values that can be emitted.- Specified by:
- toTuplein interface- RedisLookupMapper
- Parameters:
- input- the input tuple.
- value- Redis query response value. Can be String, Boolean, Long regarding of data type.
- Returns:
- a List of storm values that can be emitted. Each item in list is emitted as an output tuple.
 
- 
declareOutputFieldsDescription copied from interface:RedisLookupMapperdeclare what are the fields that this code will output.- Specified by:
- declareOutputFieldsin interface- RedisLookupMapper
- Parameters:
- declarer- OutputFieldsDeclarer
 
- 
getDataTypeDescriptionDescription copied from interface:RedisMapperReturns descriptor which defines data type.- Specified by:
- getDataTypeDescriptionin interface- RedisMapper
- Returns:
- data type descriptor
 
- 
getKeyFromTupleDescription copied from interface:TupleMapperExtracts key from tuple.- Specified by:
- getKeyFromTuplein interface- TupleMapper
- Parameters:
- tuple- source tuple
- Returns:
- key
 
- 
getValueFromTupleDescription copied from interface:TupleMapperExtracts value from tuple.- Specified by:
- getValueFromTuplein interface- TupleMapper
- Parameters:
- tuple- source tuple
- Returns:
- value
 
 
-