kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-1948; Fix ConsumerTest.testPartitionReassignmentCallback handling issue; reviewed by Gwen Shapira
Date Fri, 13 Feb 2015 01:10:36 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 9fe9913e9 -> a3d6dcaf1


KAFKA-1948; Fix ConsumerTest.testPartitionReassignmentCallback handling issue; reviewed by
Gwen Shapira


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

Branch: refs/heads/trunk
Commit: a3d6dcaf1bcc6189c3ef17b63719ae4d12dcb789
Parents: 9fe9913
Author: Guozhang Wang <wangguoz@gmail.com>
Authored: Thu Feb 12 17:09:42 2015 -0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Thu Feb 12 17:09:42 2015 -0800

----------------------------------------------------------------------
 core/src/main/scala/kafka/controller/KafkaController.scala   | 2 ++
 core/src/test/scala/integration/kafka/api/ConsumerTest.scala | 5 ++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/a3d6dcaf/core/src/main/scala/kafka/controller/KafkaController.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/controller/KafkaController.scala b/core/src/main/scala/kafka/controller/KafkaController.scala
index 66df6d2..e9b4dc6 100644
--- a/core/src/main/scala/kafka/controller/KafkaController.scala
+++ b/core/src/main/scala/kafka/controller/KafkaController.scala
@@ -365,6 +365,8 @@ class KafkaController(val config : KafkaConfig, zkClient: ZkClient, val
brokerSt
       controllerContext.epoch=0
       controllerContext.epochZkVersion=0
       brokerState.newState(RunningAsBroker)
+
+      info("Broker %d resigned as the controller".format(config.brokerId))
     }
   }
 

http://git-wip-us.apache.org/repos/asf/kafka/blob/a3d6dcaf/core/src/test/scala/integration/kafka/api/ConsumerTest.scala
----------------------------------------------------------------------
diff --git a/core/src/test/scala/integration/kafka/api/ConsumerTest.scala b/core/src/test/scala/integration/kafka/api/ConsumerTest.scala
index 798f035..2802a39 100644
--- a/core/src/test/scala/integration/kafka/api/ConsumerTest.scala
+++ b/core/src/test/scala/integration/kafka/api/ConsumerTest.scala
@@ -230,7 +230,7 @@ class ConsumerTest extends IntegrationTestHarness with Logging {
     assertEquals(1, parts.size)
     assertNotNull(parts(0).leader())
     
-    // shutdown the co-ordinator
+    // shutdown the coordinator
     val coordinator = parts(0).leader().id()
     this.servers(coordinator).shutdown()
     
@@ -239,6 +239,9 @@ class ConsumerTest extends IntegrationTestHarness with Logging {
       consumer0.poll(50)
     assertEquals(2, callback.callsToAssigned)
     assertEquals(2, callback.callsToRevoked)
+
+    // restart the coordinator since it may also be hosting "test" topic
+    this.servers(coordinator).startup()
     
     consumer0.close()
   }


Mime
View raw message