Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/1808#discussion_r96923481
--- Diff:
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/trident/KafkaTridentSpoutManager.java
---
@@ -44,29 +43,30 @@
// Bookkeeping
private final KafkaSpoutConfig<K, V> kafkaSpoutConfig;
// Declare some KafkaSpoutConfig references for convenience
- private KafkaSpoutStreams kafkaSpoutStreams; // Object
that wraps all the logic to declare output fields and emit tuples
- private KafkaSpoutTuplesBuilder<K, V> tuplesBuilder; // Object
that contains the logic to build tuples for each ConsumerRecord
+ private final Fields fields;
public KafkaTridentSpoutManager(KafkaSpoutConfig<K, V>
kafkaSpoutConfig) {
this.kafkaSpoutConfig = kafkaSpoutConfig;
- kafkaSpoutStreams = kafkaSpoutConfig.getKafkaSpoutStreams();
- tuplesBuilder = kafkaSpoutConfig.getTuplesBuilder();
+ RecordTranslator<K, V> translator =
kafkaSpoutConfig.getTranslator();
+ Fields fields = null;
--- End diff --
I'm a bit confused about what benefit that would give. The Fields come
from the SpoutConfig, by way of the RecordTranslator. Why would you want to
override the Fields but not the RecordTranslator that must conform to those
fields? I just don't see value it separating two things that are highly
coupled together.
---
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.
---