Github user darionyaphet commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1517#discussion_r68543199
  
    --- Diff: external/storm-redis/README.md ---
    @@ -21,13 +21,16 @@ use it as a maven dependency:
     
     ### For normal Bolt
     
    -Storm-redis provides basic Bolt implementations, ```RedisLookupBolt``` and 
```RedisStoreBolt```.
    +Storm-redis provides basic Bolt implementations, ```RedisLookupBolt``` and 
```RedisStoreBolt```, and ```RedisFilterBolt```.
     
    -As name represents its usage, ```RedisLookupBolt``` retrieves value from 
Redis using key, and ```RedisStoreBolt``` stores key / value to Redis. One 
tuple will be matched to one key / value pair, and you can define match pattern 
to ```TupleMapper```.
    +As name represents its usage, ```RedisLookupBolt``` retrieves value from 
Redis using key, and ```RedisStoreBolt``` stores key / value to Redis, and 
```RedisFilterBolt``` filters out tuple which key or field doesn't exist on 
Redis.
     
    -You can also choose data type from ```RedisDataTypeDescription``` to use. 
Please refer ```RedisDataTypeDescription.RedisDataType``` to see what data 
types are supported. In some data types (hash and sorted set), it requires 
additional key and converted key from tuple becomes element.
    +One tuple will be matched to one key / value pair, and you can define 
match pattern to ```TupleMapper```.
     
    -These interfaces are combined with ```RedisLookupMapper``` and 
```RedisStoreMapper``` which fit ```RedisLookupBolt``` and ```RedisStoreBolt``` 
respectively.
    +You can also choose data type from ```RedisDataTypeDescription``` to use. 
Please refer ```RedisDataTypeDescription.RedisDataType``` to see what data 
types are supported. In some data types (hash and sorted set, and set if only 
RedisFilterBolt), it requires additional key and converted key from tuple 
becomes element.
    +
    +These interfaces are combined with ```RedisLookupMapper``` and 
```RedisStoreMapper``` and ```RedisFilterMapper``` which fit 
```RedisLookupBolt``` and ```RedisStoreBolt```, and ```RedisFilterBolt``` 
respectively.
    +(When you want to implement RedisFilterMapper, be sure to set 
declareOutputFields() to declare same fields to input stream, since FilterBolt 
forwards input tuples when they exist on Redis.)   
    --- End diff --
    
    Actually  `RedisFilterMapper` and `RedisLookupMapper` are the same . It get 
a key from tuple then use to query from `Redis` . The difference is 
`RedisFilterBolt` use `RedisFilterMapper` and `RedisLookupBolt` use 
`RedisLookupMapper` . Should the tow mappers could extends from one basic 
abstract class ? 
    
    `RedisFilterMapper` and `RedisLookupBolt` will not use getValueFromTuple() 
, this method will always return `null`. So maybe I will open another ticket to 
discuss Mapper  Structure .


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to