public class WordCountLookupMapper extends Object implements RedisLookupMapper
Constructor and Description |
---|
WordCountLookupMapper() |
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer declarer)
declare what are the fields that this code will output.
|
RedisDataTypeDescription |
getDataTypeDescription()
Returns descriptor which defines data type.
|
String |
getKeyFromTuple(ITuple tuple)
Extracts key from tuple.
|
String |
getValueFromTuple(ITuple tuple)
Extracts value from tuple.
|
List<Values> |
toTuple(ITuple input,
Object value)
Converts return value from Redis to a list of storm values that can be emitted.
|
public List<Values> toTuple(ITuple input, Object value)
RedisLookupMapper
Converts return value from Redis to a list of storm values that can be emitted.
toTuple
in interface RedisLookupMapper
input
- the input tuple.value
- Redis query response value. Can be String, Boolean, Long regarding of data type.public void declareOutputFields(OutputFieldsDeclarer declarer)
RedisLookupMapper
declare what are the fields that this code will output.
declareOutputFields
in interface RedisLookupMapper
declarer
- OutputFieldsDeclarerpublic RedisDataTypeDescription getDataTypeDescription()
RedisMapper
Returns descriptor which defines data type.
getDataTypeDescription
in interface RedisMapper
public String getKeyFromTuple(ITuple tuple)
TupleMapper
Extracts key from tuple.
getKeyFromTuple
in interface TupleMapper
tuple
- source tuplepublic String getValueFromTuple(ITuple tuple)
TupleMapper
Extracts value from tuple.
getValueFromTuple
in interface TupleMapper
tuple
- source tupleCopyright © 2022 The Apache Software Foundation. All Rights Reserved.