You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apex.apache.org by PramodSSImmaneni <gi...@git.apache.org> on 2016/08/01 14:51:26 UTC

[GitHub] apex-malhar pull request #347: APEXMALHAR-2156 changes

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

    https://github.com/apache/apex-malhar/pull/347#discussion_r72991276
  
    --- Diff: contrib/src/main/java/com/datatorrent/contrib/kafka/AbstractKafkaInputOperator.java ---
    @@ -250,12 +250,7 @@ public void setup(OperatorContext context)
         consumer.create();
         // reset the offsets to checkpointed one
         if (consumer instanceof SimpleKafkaConsumer && !offsetStats.isEmpty()) {
    -      Map<KafkaPartition, Long> currentOffsets = new HashMap<>();
    -      // Increment the offsets and set it to consumer
    -      for (Map.Entry<KafkaPartition, Long> e: offsetStats.entrySet()) {
    -        currentOffsets.put(e.getKey(), e.getValue() + 1);
    -      }
    -      ((SimpleKafkaConsumer)consumer).resetOffset(currentOffsets);
    +      ((SimpleKafkaConsumer)consumer).resetOffset(offsetStats);
    --- End diff --
    
    Why are kafka changes in this pull request?


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