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

    https://github.com/apache/metron/pull/584#discussion_r116567399
  
    --- Diff: 
metron-platform/metron-storm-kafka/src/main/java/org/apache/metron/storm/kafka/flux/SimpleStormKafkaBuilder.java
 ---
    @@ -165,13 +177,39 @@ public SimpleStormKafkaBuilder( Map<String, Object> 
kafkaProps
                                     , List<String> fieldsConfiguration
                                     )
       {
    -    super( modifyKafkaProps(kafkaProps, zkQuorum)
    -         , createStreams(fieldsConfiguration, topic)
    -         , createTuplesBuilder(fieldsConfiguration, topic)
    -         );
    +    super( getBootstrapServers(zkQuorum, kafkaProps)
    +         , 
createDeserializer(Optional.ofNullable((String)kafkaProps.get(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG)),
 DEFAULT_DESERIALIZER)
    +         , 
createDeserializer(Optional.ofNullable((String)kafkaProps.get(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG)),
 DEFAULT_DESERIALIZER)
    +         , topic
    +    );
    +    setProp(kafkaProps);
    +    setRecordTranslator(new 
SpoutRecordTranslator<>(FieldsConfiguration.toList(fieldsConfiguration)));
         this.topic = topic;
       }
     
    +  private static <T> Class<Deserializer<T>> createDeserializer( 
Optional<String> deserializerClass
    --- End diff --
    
    This is nitpicky, so don't feel obligated to fix it, but couldn't this 
method just take a (possibly null) String, and wrap it in the Optional itself?  
It seems pointless to make the caller wrap it when it's just as easy for the 
function itself to handle null.


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