You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2015/02/19 02:53:57 UTC
kafka git commit: KAFKA-1729;
(followup patch)Add constructor to javaapi to allow constructing
explicitly versioned offset commit requests; patched by Joel Koshy;
reviewed by Jun Rao
Repository: kafka
Updated Branches:
refs/heads/0.8.2 375b15511 -> 45b9e1580
KAFKA-1729; (followup patch)Add constructor to javaapi to allow constructing explicitly versioned offset commit requests; patched by Joel Koshy; reviewed by Jun Rao
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/45b9e158
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/45b9e158
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/45b9e158
Branch: refs/heads/0.8.2
Commit: 45b9e1580c656867c5c81e2ad8f6645c64b83f90
Parents: 375b155
Author: Joel Koshy <jj...@gmail.com>
Authored: Wed Feb 18 17:53:45 2015 -0800
Committer: Jun Rao <ju...@gmail.com>
Committed: Wed Feb 18 17:53:45 2015 -0800
----------------------------------------------------------------------
.../src/main/scala/kafka/javaapi/OffsetFetchRequest.scala | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/45b9e158/core/src/main/scala/kafka/javaapi/OffsetFetchRequest.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/javaapi/OffsetFetchRequest.scala b/core/src/main/scala/kafka/javaapi/OffsetFetchRequest.scala
index 1c25aa3..818ae33 100644
--- a/core/src/main/scala/kafka/javaapi/OffsetFetchRequest.scala
+++ b/core/src/main/scala/kafka/javaapi/OffsetFetchRequest.scala
@@ -28,6 +28,14 @@ class OffsetFetchRequest(groupId: String,
correlationId: Int,
clientId: String) {
+ def this(groupId: String,
+ requestInfo: java.util.List[TopicAndPartition],
+ correlationId: Int,
+ clientId: String) {
+ // by default bind to version 0 so that it fetches from ZooKeeper
+ this(groupId, requestInfo, 0, correlationId, clientId)
+ }
+
val underlying = {
val scalaSeq = {
import JavaConversions._
@@ -36,7 +44,7 @@ class OffsetFetchRequest(groupId: String,
kafka.api.OffsetFetchRequest(
groupId = groupId,
requestInfo = scalaSeq,
- versionId = 0, // binds to version 0 so that it commits to Zookeeper
+ versionId = versionId,
correlationId = correlationId,
clientId = clientId
)