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
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
declareOutputFields
in interface RedisLookupMapper
declarer
- OutputFieldsDeclarerpublic RedisDataTypeDescription getDataTypeDescription()
RedisMapper
getDataTypeDescription
in interface RedisMapper
public String getKeyFromTuple(ITuple tuple)
TupleMapper
getKeyFromTuple
in interface TupleMapper
tuple
- source tuplepublic String getValueFromTuple(ITuple tuple)
TupleMapper
getValueFromTuple
in interface TupleMapper
tuple
- source tupleCopyright © 2023 The Apache Software Foundation. All rights reserved.