public class RedisFilterBolt extends AbstractRedisBolt
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.
collector| Constructor and Description |
|---|
RedisFilterBolt(JedisClusterConfig config,
RedisFilterMapper filterMapper)
Constructor for Redis Cluster environment (JedisCluster).
|
RedisFilterBolt(JedisPoolConfig config,
RedisFilterMapper filterMapper)
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, returnInstanceexecute, onTickTuplegetComponentConfigurationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComponentConfigurationpublic RedisFilterBolt(JedisPoolConfig config, RedisFilterMapper filterMapper)
config - configuration for initializing JedisPoolfilterMapper - mapper containing which datatype, query key that Bolt usespublic RedisFilterBolt(JedisClusterConfig config, RedisFilterMapper filterMapper)
config - configuration for initializing JedisClusterfilterMapper - mapper containing which datatype, query key that Bolt usespublic void process(Tuple input)
IBolt.execute(Tuple).process in class BaseTickTupleAwareRichBoltinput - The input tuple to be processed.public void declareOutputFields(OutputFieldsDeclarer declarer)
declarer - this is used to declare output stream ids, output fields, and whether or not each output stream is a direct streamCopyright © 2023 The Apache Software Foundation. All rights reserved.