kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jjko...@apache.org
Subject [1/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, 28 May 2015 20:46:47 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk c60f32501 -> d6c45c70f


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/05e8a781
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/05e8a781
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/05e8a781

Branch: refs/heads/trunk
Commit: 05e8a78145fc3db673bb46be8ba1788558c5a26d
Parents: c60f325
Author: Jiangjie Qin <becket.qin@gmail.com>
Authored: Thu May 28 13:22:30 2015 -0700
Committer: Joel Koshy <jjkoshy@gmail.com>
Committed: Thu May 28 13:22:30 2015 -0700

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


http://git-wip-us.apache.org/repos/asf/kafka/blob/05e8a781/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..ca74ca8 100644
--- a/core/src/main/scala/kafka/javaapi/consumer/ConsumerConnector.java
+++ b/core/src/main/scala/kafka/javaapi/consumer/ConsumerConnector.java
@@ -20,6 +20,9 @@ package kafka.javaapi.consumer;
 
 import java.util.List;
 import java.util.Map;
+
+import kafka.common.OffsetAndMetadata;
+import kafka.common.TopicAndPartition;
 import kafka.consumer.KafkaStream;
 import kafka.consumer.TopicFilter;
 import kafka.serializer.Decoder;
@@ -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<TopicAndPartition, OffsetAndMetadata> offsetsToCommit,
boolean retryOnFailure);
+
+  /**
    *  Shut down the connector
    */
   public void shutdown();


Mime
View raw message