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

    https://github.com/apache/storm/pull/2282#discussion_r135539518
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/EmptyKafkaTupleListener.java
 ---
    @@ -0,0 +1,33 @@
    +package org.apache.storm.kafka.spout;
    +
    +import java.util.List;
    +import java.util.Map;
    +
    +import org.apache.storm.spout.SpoutOutputCollector;
    +import org.apache.storm.task.TopologyContext;
    +
    +public class EmptyKafkaTupleListener implements KafkaTupleListener {
    +
    +    @Override
    +    public void open(Map<String, Object> conf, TopologyContext context, 
SpoutOutputCollector collector) { }
    +
    +    @Override
    +    public void onEmit(List<Object> tuple, KafkaSpoutMessageId msgId) { }
    +
    +    @Override
    +    public void onAck(KafkaSpoutMessageId msgId) { }
    +
    +    @Override
    +    public void onPartitionsReassigned(KafkaSpoutMessageId msgId) { }
    +
    +    @Override
    +    public void onRetry(KafkaSpoutMessageId msgId) { }
    +
    +    @Override
    +    public void onMaxRetryReached(KafkaSpoutMessageId msgId) { }
    +
    +    @Override
    +    public String toString() {
    +        return "EmptyKafkaTupleListener";
    --- End diff --
    
    @hmcl At the risk of getting into bikeshedding territory, I think it makes 
sense to leave it this way, since the listener is being printed in the toString 
of KafkaSpoutConfig. As it is now, the print will show 
"tupleListener=EmptyKafkaTupleListener", so at least it is obvious what's in 
the field. Leaving it empty would show "tupleListener=".
    
    I'm happy to merge this either way though.


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