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-1959; Rename group to groupId in TestOffsetManager due to collision with Thread.group in IBM's JDK; reviewed by Joel Koshy and Gwen Shapira
Date Wed, 18 Feb 2015 07:51:12 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk cb40ec2e7 -> d5fbba633


KAFKA-1959; Rename group to groupId in TestOffsetManager due to collision with Thread.group
in IBM's JDK; reviewed by Joel Koshy and Gwen Shapira


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

Branch: refs/heads/trunk
Commit: cdf06564458ac384119d21ac8b25a3a7ebe27014
Parents: cb40ec2
Author: Tong Li <litong01@us.ibm.com>
Authored: Tue Feb 17 23:48:21 2015 -0800
Committer: Joel Koshy <jjkoshy@gmail.com>
Committed: Tue Feb 17 23:48:21 2015 -0800

----------------------------------------------------------------------
 core/src/test/scala/other/kafka/TestOffsetManager.scala | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/cdf06564/core/src/test/scala/other/kafka/TestOffsetManager.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/other/kafka/TestOffsetManager.scala b/core/src/test/scala/other/kafka/TestOffsetManager.scala
index 41f334d..a106379 100644
--- a/core/src/test/scala/other/kafka/TestOffsetManager.scala
+++ b/core/src/test/scala/other/kafka/TestOffsetManager.scala
@@ -50,9 +50,9 @@ object TestOffsetManager {
         extends ShutdownableThread("commit-thread")
         with KafkaMetricsGroup {
 
-    private val group = "group-" + id
+    private val groupId = "group-" + id
     private val metadata = "Metadata from commit thread " + id
-    private var offsetsChannel = ClientUtils.channelToOffsetManager(group, zkClient, SocketTimeoutMs)
+    private var offsetsChannel = ClientUtils.channelToOffsetManager(groupId, zkClient, SocketTimeoutMs)
     private var offset = 0L
     val numErrors = new AtomicInteger(0)
     val numCommits = new AtomicInteger(0)
@@ -62,11 +62,11 @@ object TestOffsetManager {
 
     private def ensureConnected() {
       if (!offsetsChannel.isConnected)
-        offsetsChannel = ClientUtils.channelToOffsetManager(group, zkClient, SocketTimeoutMs)
+        offsetsChannel = ClientUtils.channelToOffsetManager(groupId, zkClient, SocketTimeoutMs)
     }
 
     override def doWork() {
-      val commitRequest = OffsetCommitRequest(group, immutable.Map((1 to partitionCount).map(TopicAndPartition("topic-"
+ id, _) -> OffsetAndMetadata(offset, metadata)):_*))
+      val commitRequest = OffsetCommitRequest(groupId, immutable.Map((1 to partitionCount).map(TopicAndPartition("topic-"
+ id, _) -> OffsetAndMetadata(offset, metadata)):_*))
       try {
         ensureConnected()
         offsetsChannel.send(commitRequest)
@@ -81,7 +81,7 @@ object TestOffsetManager {
         case e1: ClosedByInterruptException =>
           offsetsChannel.disconnect()
         case e2: IOException =>
-          println("Commit thread %d: Error while committing offsets to %s:%d for group %s
due to %s.".format(id, offsetsChannel.host, offsetsChannel.port, group, e2))
+          println("Commit thread %d: Error while committing offsets to %s:%d for group %s
due to %s.".format(id, offsetsChannel.host, offsetsChannel.port, groupId, e2))
           offsetsChannel.disconnect()
       }
       finally {


Mime
View raw message