kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjko...@apache.org
Subject [2/2] kafka git commit: KAFKA-2186; Follow-up to KAFKA-1650 - add selective offset commit to consumer connector API; reviewed by Joel Koshy
Date Thu, 21 May 2015 18:55:52 GMT
KAFKA-2186; Follow-up to KAFKA-1650 - add selective offset commit to
consumer connector API; reviewed by Joel Koshy


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/23ff851f
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/23ff851f
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/23ff851f

Branch: refs/heads/trunk
Commit: 23ff851f30bb55e794aefd2fae5367845d9230ee
Parents: b4f2391
Author: Jiangjie Qin <becket.qin@gmail.com>
Authored: Wed May 20 18:20:37 2015 -0700
Committer: Joel Koshy <jjkoshy@gmail.com>
Committed: Thu May 21 11:55:40 2015 -0700

----------------------------------------------------------------------
 .../scala/kafka/javaapi/consumer/ConsumerConnector.java  | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/23ff851f/core/src/main/scala/kafka/javaapi/consumer/ConsumerConnector.java
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/javaapi/consumer/ConsumerConnector.java b/core/src/main/scala/kafka/javaapi/consumer/ConsumerConnector.java
index cc3400f..f340065 100644
--- a/core/src/main/scala/kafka/javaapi/consumer/ConsumerConnector.java
+++ b/core/src/main/scala/kafka/javaapi/consumer/ConsumerConnector.java
@@ -20,9 +20,12 @@ package kafka.javaapi.consumer;
 
 import java.util.List;
 import java.util.Map;
+
+import kafka.common.OffsetAndMetadata;
 import kafka.consumer.KafkaStream;
 import kafka.consumer.TopicFilter;
 import kafka.serializer.Decoder;
+import org.apache.kafka.common.TopicPartition;
 
 public interface ConsumerConnector {
   /**
@@ -65,6 +68,14 @@ public interface ConsumerConnector {
   public void commitOffsets(boolean retryOnFailure);
 
   /**
+   * Commit offsets using the provided offsets map
+   *
+   * @param offsetsToCommit a map containing the offset to commit for each partition.
+   * @param retryOnFailure enable retries on the offset commit if it fails.
+   */
+  public void commitOffsets(Map<TopicPartition, OffsetAndMetadata> offsetsToCommit,
boolean retryOnFailure);
+
+  /**
    *  Shut down the connector
    */
   public void shutdown();


Mime
View raw message