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

    https://github.com/apache/storm/pull/1808#discussion_r96764322
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaTuple.java
 ---
    @@ -15,22 +15,33 @@
      *   See the License for the specific language governing permissions and
      *   limitations under the License.
      */
    -
     package org.apache.storm.kafka.spout;
     
    -import org.apache.kafka.clients.consumer.ConsumerRecord;
    -
    -import java.util.List;
    -
    -public class KafkaSpoutTuplesBuilderWildcardTopics<K,V> implements 
KafkaSpoutTuplesBuilder<K,V> {
    -    private KafkaSpoutTupleBuilder<K, V> tupleBuilder;
    +import org.apache.storm.tuple.Values;
     
    -    public KafkaSpoutTuplesBuilderWildcardTopics(KafkaSpoutTupleBuilder<K, 
V> tupleBuilder) {
    -        this.tupleBuilder = tupleBuilder;
    +/**
    + * A list of Values in a tuple that can be routed 
    + * to a given stream.
    + */
    +public class KafkaTuple extends Values {
    +    private static final long serialVersionUID = 4803794470450587992L;
    +    private String stream = null;
    +    
    +    public KafkaTuple() {
    +        super();
    +    }
    +    
    +    public KafkaTuple(Object... vals) {
    +        super(vals);
    +    }
    +    
    +    public KafkaTuple routedTo(String stream) {
    --- End diff --
    
    Why not make this object immutable and use two constructors one with and 
one without stream ?


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