Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/1760#discussion_r86378199
--- Diff:
external/storm-redis/src/main/java/org/apache/storm/redis/bolt/RedisFilterBolt.java
---
@@ -45,18 +48,41 @@
*/
public class RedisFilterBolt extends AbstractRedisBolt {
private final RedisFilterMapper filterMapper;
+ private final StreamMapper streamMapper;
private final RedisDataTypeDescription.RedisDataType dataType;
private final String additionalKey;
/**
- * Constructor for single Redis environment (JedisPool)
+ * Constructor for single Redis environment (JedisPool).
+ * Tuples will be emitted to Storm's default streamId.
* @param config configuration for initializing JedisPool
* @param filterMapper mapper containing which datatype, query key
that Bolt uses
*/
public RedisFilterBolt(JedisPoolConfig config, RedisFilterMapper
filterMapper) {
--- End diff --
This now creates a lot of coupling between the filter mapper and the stream
mapper. Simply because the Filter Mapper is the one that declares the output
fields.
```
public void declareOutputFields(OutputFieldsDeclarer declarer) {
filterMapper.declareOutputFields(declarer);
}
```
So either we need to embrace the coupling and have StreamMapper also be a
FilterMapper. (which would require some documentation) or we find a way to
fake out FilterMapper and have it declare multiple outputs for what the
StreamMapper wants.
I prefer the first one, because it seems like it would be more flexible.
---
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.
---