You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by prokopowicz <gi...@git.apache.org> on 2015/10/01 23:49:24 UTC

[GitHub] storm pull request: advance kafka offset when deserializer yields ...

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

    https://github.com/apache/storm/pull/758#discussion_r40970682
  
    --- Diff: external/storm-kafka/src/jvm/storm/kafka/PartitionManager.java ---
    @@ -136,15 +136,15 @@ public EmitState next(SpoutOutputCollector collector) {
                     return EmitState.NO_EMITTED;
                 }
                 Iterable<List<Object>> tups = KafkaUtils.generateTuples(_spoutConfig, toEmit.msg);
    -            if (tups != null) {
    -		if(_spoutConfig.topicAsStreamId) {
    -	            for (List<Object> tup : tups) {
    -			collector.emit(_spoutConfig.topic, tup, new KafkaMessageId(_partition, toEmit.offset));
    -		    }
    -		} else {
    -		    for (List<Object> tup : tups) {
    -			collector.emit(tup, new KafkaMessageId(_partition, toEmit.offset));
    -		    }
    +            if ((tups != null) && tups.iterator.hasNext()) {
    --- End diff --
    
    sorry :(   I am pushing another commit now


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