Package org.apache.storm.redis.bolt
Class RedisLookupBolt
- All Implemented Interfaces:
Serializable
,IBolt
,IComponent
,IRichBolt
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, GEO
- See Also:
-
Field Summary
Fields inherited from class org.apache.storm.redis.bolt.AbstractRedisBolt
collector
-
Constructor Summary
ConstructorDescriptionRedisLookupBolt
(JedisClusterConfig config, RedisLookupMapper lookupMapper) Constructor for Redis Cluster environment (JedisCluster).RedisLookupBolt
(JedisPoolConfig config, RedisLookupMapper lookupMapper) Constructor for single Redis environment (JedisPool). -
Method Summary
Modifier and TypeMethodDescriptionvoid
declareOutputFields
(OutputFieldsDeclarer declarer) Declare the output schema for all the streams of this topology.void
Process a single non-tick tuple of input.Methods inherited from class org.apache.storm.redis.bolt.AbstractRedisBolt
cleanup, getInstance, prepare, returnInstance
Methods inherited from class org.apache.storm.topology.base.BaseTickTupleAwareRichBolt
execute, onTickTuple
Methods inherited from class org.apache.storm.topology.base.BaseComponent
getComponentConfiguration
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.storm.topology.IComponent
getComponentConfiguration
-
Constructor Details
-
RedisLookupBolt
Constructor for single Redis environment (JedisPool).- Parameters:
config
- configuration for initializing JedisPoollookupMapper
- mapper containing which datatype, query key, output key that Bolt uses
-
RedisLookupBolt
Constructor for Redis Cluster environment (JedisCluster).- Parameters:
config
- configuration for initializing JedisClusterlookupMapper
- mapper containing which datatype, query key, output key that Bolt uses
-
-
Method Details
-
process
Process a single non-tick tuple of input. Implementation needs to handle ack manually. More details onIBolt.execute(Tuple)
.- Specified by:
process
in classBaseTickTupleAwareRichBolt
- Parameters:
input
- The input tuple to be processed.
-
declareOutputFields
Declare the output schema for all the streams of this topology.- Parameters:
declarer
- this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream
-