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

    https://github.com/apache/storm/pull/2155#discussion_r124580202
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpoutConfig.java
 ---
    @@ -116,217 +141,57 @@
             private boolean emitNullTuples = false;
     
             public Builder(String bootstrapServers, String ... topics) {
    -            this(bootstrapServers, (SerializableDeserializer) null, 
(SerializableDeserializer) null, new NamedSubscription(topics));
    -        }
    -
    -        public Builder(String bootstrapServers, 
SerializableDeserializer<K> keyDes, SerializableDeserializer<V> valDes, String 
... topics) {
    -            this(bootstrapServers, keyDes, valDes, new 
NamedSubscription(topics));
    -        }
    -        
    -        public Builder(String bootstrapServers, 
SerializableDeserializer<K> keyDes,
    -            SerializableDeserializer<V> valDes, Collection<String> topics) 
{
    -            this(bootstrapServers, keyDes, valDes, new 
NamedSubscription(topics));
    -        }
    -        
    -        public Builder(String bootstrapServers, 
SerializableDeserializer<K> keyDes,
    -            SerializableDeserializer<V> valDes, Pattern topics) {
    -            this(bootstrapServers, keyDes, valDes, new 
PatternSubscription(topics));
    +            this(bootstrapServers, new NamedSubscription(topics));
             }
             
    -        public Builder(String bootstrapServers, 
SerializableDeserializer<K> keyDes,
    -            SerializableDeserializer<V> valDes, Subscription subscription) 
{
    -            this(bootstrapServers, keyDes, null, valDes, null, 
subscription);
    +        public Builder(String bootstrapServers, Collection<String> topics) 
{
    +            this(bootstrapServers, new NamedSubscription(topics));
             }
             
    -        public Builder(String bootstrapServers, Class<? extends 
Deserializer<K>> keyDes,
    -                Class<? extends Deserializer<V>> valDes, String ... 
topics) {
    -            this(bootstrapServers, keyDes, valDes, new 
NamedSubscription(topics));
    +        public Builder(String bootstrapServers, Pattern topics) {
    +            this(bootstrapServers, new PatternSubscription(topics));
             }
             
    -        public Builder(String bootstrapServers, Class<? extends 
Deserializer<K>> keyDes,
    -                Class<? extends Deserializer<V>> valDes, 
Collection<String> topics) {
    -            this(bootstrapServers, keyDes, valDes, new 
NamedSubscription(topics));
    -        }
    -        
    -        public Builder(String bootstrapServers, Class<? extends 
Deserializer<K>> keyDes,
    -                Class<? extends Deserializer<V>> valDes, Pattern topics) {
    -            this(bootstrapServers, keyDes, valDes, new 
PatternSubscription(topics));
    -        }
    -        
    -        public Builder(String bootstrapServers, Class<? extends 
Deserializer<K>> keyDes,
    -                Class<? extends Deserializer<V>> valDes, Subscription 
subscription) {
    -            this(bootstrapServers, null, keyDes, null, valDes, 
subscription);
    -        }
    -        
    -        private Builder(String bootstrapServers, 
SerializableDeserializer<K> keyDes,
    -                Class<? extends Deserializer<K>> keyDesClazz,
    -                SerializableDeserializer<V> valDes, Class<? extends 
Deserializer<V>> valDesClazz, Subscription subscription) {
    +        /**
    +         * Create a KafkaSpoutConfig builder.
    --- End diff --
    
    Create a KafkaSpoutConfig builder with default property values. Properties 
can be overridden with the respective builder set methods.


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