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

    https://github.com/apache/storm/pull/1808#discussion_r96761049
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java
 ---
    @@ -325,15 +310,19 @@ private boolean 
emitTupleIfNotEmitted(ConsumerRecord<K, V> record) {
             } else {
                 boolean isScheduled = retryService.isScheduled(msgId);
                 if (!isScheduled || retryService.isReady(msgId)) {   // not 
scheduled <=> never failed (i.e. never emitted) or ready to be retried
    -                final List<Object> tuple = 
tuplesBuilder.buildTuple(record);
    -                kafkaSpoutStreams.emit(collector, tuple, msgId);
    +                final List<Object> tuple = 
kafkaSpoutConfig.getTranslator().apply(record);
    +                if (tuple instanceof KafkaTuple) {
    --- End diff --
    
    Doesn't this require that for a tuple to go to a specific stream, that 
tuple has to necessarily be a `KafkaTuple`? If that is the case, it is not 
obvious for an implementer of `RecordTranslator` that he has to do so. If I 
understand it correctly, currently this code only works as intended with 
`SimpleRecordTranslator`.
    
    The reasoning behind the `KafkaSpoutStreams` abstraction was to allow the 
user to clearly define the stream and associated fields without ambiguity.


---
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