public class RedisLookupBolt extends AbstractRedisBolt
Basic bolt for querying from Redis and emits response as tuple.
Various data types are supported: STRING, LIST, HASH, SET, SORTED_SET, HYPER_LOG_LOG, GEOcollector
Constructor and Description |
---|
RedisLookupBolt(JedisClusterConfig config,
RedisLookupMapper lookupMapper)
Constructor for Redis Cluster environment (JedisCluster)
|
RedisLookupBolt(JedisPoolConfig config,
RedisLookupMapper lookupMapper)
Constructor for single Redis environment (JedisPool)
|
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer declarer)
Declare the output schema for all the streams of this topology.
|
void |
process(Tuple input)
Process a single non-tick tuple of input.
|
cleanup, getInstance, prepare, returnInstance
execute, onTickTuple
getComponentConfiguration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentConfiguration
public RedisLookupBolt(JedisPoolConfig config, RedisLookupMapper lookupMapper)
Constructor for single Redis environment (JedisPool)
config
- configuration for initializing JedisPoollookupMapper
- mapper containing which datatype, query key, output key that Bolt usespublic RedisLookupBolt(JedisClusterConfig config, RedisLookupMapper lookupMapper)
Constructor for Redis Cluster environment (JedisCluster)
config
- configuration for initializing JedisClusterlookupMapper
- mapper containing which datatype, query key, output key that Bolt usespublic void process(Tuple input)
Process a single non-tick tuple of input. Implementation needs to handle ack manually. More details on IBolt.execute(Tuple)
.
process
in class BaseTickTupleAwareRichBolt
input
- The input tuple to be processed.public void declareOutputFields(OutputFieldsDeclarer declarer)
Declare the output schema for all the streams of this topology.
declarer
- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct streamCopyright © 2019 The Apache Software Foundation. All rights reserved.