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

    https://github.com/apache/storm/pull/1808#discussion_r96763012
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java
 ---
    @@ -447,7 +440,10 @@ private void shutdown() {
     
         @Override
         public void declareOutputFields(OutputFieldsDeclarer declarer) {
    -        kafkaSpoutStreams.declareOutputFields(declarer);
    +        RecordTranslator<K, V> translator = 
kafkaSpoutConfig.getTranslator();
    --- End diff --
    
    I agree with this. I just think that this pattern is used many times in 
many Bolt implementations. I think that it would be useful to have an 
abstraction as part of stomr, similar to what `KafkaSpoutStreams` was doing, 
that would allow Bolts to declare the set of fields per stream in a pluggable 
way. This would make it uniform for every Bolt, and avoid having to do similar 
work for every Bolt that is writing to multiple streams.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to