You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@metron.apache.org by justinleet <gi...@git.apache.org> on 2017/05/15 18:40:00 UTC

[GitHub] metron pull request #584: METRON-950: Migrate storm-kafka-client to 1.1

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

    https://github.com/apache/metron/pull/584#discussion_r116566613
  
    --- Diff: metron-platform/metron-storm-kafka/src/main/java/org/apache/metron/storm/kafka/flux/SimpleStormKafkaBuilder.java ---
    @@ -202,31 +240,4 @@ public String getTopic() {
         return new StormKafkaSpout<>(builder);
       }
     
    -  private static Map<String, Object> modifyKafkaProps(Map<String, Object> props, String zkQuorum) {
    -    try {
    -      if(!props.containsKey(KafkaSpoutConfig.Consumer.BOOTSTRAP_SERVERS)) {
    -        //this isn't a putIfAbsent because I only want to pull the brokers from zk if it's absent.
    -        List<String> brokers = KafkaUtils.INSTANCE.getBrokersFromZookeeper(zkQuorum);
    -        props.put(KafkaSpoutConfig.Consumer.BOOTSTRAP_SERVERS, Joiner.on(",").join(brokers));
    -      }
    -      props.putIfAbsent(KafkaSpoutConfig.Consumer.KEY_DESERIALIZER, ByteArrayDeserializer.class.getName());
    -      props.putIfAbsent(KafkaSpoutConfig.Consumer.VALUE_DESERIALIZER, ByteArrayDeserializer.class.getName());
    -
    -    } catch (Exception e) {
    -      throw new IllegalStateException("Unable to retrieve brokers from zookeeper: " + e.getMessage(), e);
    -    }
    -    return props;
    -  }
    -
    -  private static <K,V> KafkaSpoutTuplesBuilder<K, V> createTuplesBuilder(List<String> config, String topic) {
    -    TupleBuilder<K, V> tb =  new TupleBuilder<K, V>(topic, FieldsConfiguration.toList(config));
    -    return new KafkaSpoutTuplesBuilderNamedTopics.Builder<>(tb).build();
    -  }
    -
    -
    -  private static KafkaSpoutStreams createStreams(List<String> config, String topic) {
    -    final Fields fields = FieldsConfiguration.getFields(FieldsConfiguration.toList(config));
    -    return new KafkaSpoutStreamsNamedTopics.Builder(fields, STREAM, new String[] { topic} ).build();
    --- End diff --
    
    STREAM isn't used anymore, right? Can we kill the field (and no, I can't comment on the field because it's not technically part of the diff, sigh).


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