Package org.apache.storm.redis.bolt
Class RedisFilterBolt
- All Implemented Interfaces:
- Serializable,- IBolt,- IComponent,- IRichBolt
Basic bolt for querying from Redis and filters out if key/field doesn't exist.
 If key/field exists on Redis, this bolt just forwards input tuple to default stream.
 
Supported data types: STRING, HASH, SET, SORTED_SET, HYPER_LOG_LOG, GEO.
Note: For STRING it checks such key exists on the key space. For HASH and SORTED_SET and GEO, it checks such field exists on that data structure. For SET and HYPER_LOG_LOG, it check such value exists on that data structure. (Note that it still refers key from tuple via RedisFilterMapper#getKeyFromTuple()) In order to apply checking this to SET, you need to input additional key this case.
Note2: If you want to just query about existence of key regardless of actual data type, specify STRING to data type of RedisFilterMapper.
- See Also:
- 
Field SummaryFields inherited from class org.apache.storm.redis.bolt.AbstractRedisBoltcollector
- 
Constructor SummaryConstructorsConstructorDescriptionRedisFilterBolt(JedisClusterConfig config, RedisFilterMapper filterMapper) Constructor for Redis Cluster environment (JedisCluster).RedisFilterBolt(JedisPoolConfig config, RedisFilterMapper filterMapper) Constructor for single Redis environment (JedisPool).
- 
Method SummaryModifier and TypeMethodDescriptionvoiddeclareOutputFields(OutputFieldsDeclarer declarer) Declare the output schema for all the streams of this topology.voidProcess a single non-tick tuple of input.Methods inherited from class org.apache.storm.redis.bolt.AbstractRedisBoltcleanup, getInstance, prepareMethods inherited from class org.apache.storm.topology.base.BaseTickTupleAwareRichBoltexecute, onTickTupleMethods inherited from class org.apache.storm.topology.base.BaseComponentgetComponentConfigurationMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.topology.IComponentgetComponentConfiguration
- 
Constructor Details- 
RedisFilterBoltConstructor for single Redis environment (JedisPool).- Parameters:
- config- configuration for initializing JedisPool
- filterMapper- mapper containing which datatype, query key that Bolt uses
 
- 
RedisFilterBoltConstructor for Redis Cluster environment (JedisCluster).- Parameters:
- config- configuration for initializing JedisCluster
- filterMapper- mapper containing which datatype, query key that Bolt uses
 
 
- 
- 
Method Details- 
processProcess a single non-tick tuple of input. Implementation needs to handle ack manually. More details onIBolt.execute(Tuple).- Specified by:
- processin class- BaseTickTupleAwareRichBolt
- Parameters:
- input- The input tuple to be processed.
 
- 
declareOutputFieldsDeclare 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
 
 
-