kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nehanarkh...@apache.org
Subject git commit: KAFKA-935: Fix shutdown tool to work with new controlled shutdown API; reviewed by Neha Narkhede
Date Thu, 06 Jun 2013 16:30:42 GMT
Updated Branches:
  refs/heads/0.8 9bd2a1148 -> 9b30aceea


KAFKA-935: Fix shutdown tool to work with new controlled shutdown API; reviewed by Neha Narkhede


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

Branch: refs/heads/0.8
Commit: 9b30aceea3996853b95464d29a2582dbc173d2ac
Parents: 9bd2a11
Author: Sriram Subramanian <sriram@gmail.com>
Authored: Thu Jun 6 09:30:22 2013 -0700
Committer: Neha Narkhede <nehanarkhede@apache.org>
Committed: Thu Jun 6 09:30:33 2013 -0700

----------------------------------------------------------------------
 .../main/scala/kafka/admin/ShutdownBroker.scala    |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/9b30acee/core/src/main/scala/kafka/admin/ShutdownBroker.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/admin/ShutdownBroker.scala b/core/src/main/scala/kafka/admin/ShutdownBroker.scala
index bb20edb..2dd47e7 100644
--- a/core/src/main/scala/kafka/admin/ShutdownBroker.scala
+++ b/core/src/main/scala/kafka/admin/ShutdownBroker.scala
@@ -25,7 +25,7 @@ import javax.management.remote.{JMXServiceURL, JMXConnectorFactory}
 import javax.management.ObjectName
 import kafka.controller.KafkaController
 import scala.Some
-import kafka.common.BrokerNotAvailableException
+import kafka.common.{TopicAndPartition, BrokerNotAvailableException}
 
 
 object ShutdownBroker extends Logging {
@@ -58,8 +58,8 @@ object ShutdownBroker extends Logging {
           val leaderPartitionsRemaining = mbsc.invoke(new ObjectName(KafkaController.MBeanName),
                                                       "shutdownBroker",
                                                       Array(params.brokerId),
-                                                      Array(classOf[Int].getName)).asInstanceOf[Int]
-          val shutdownComplete = (leaderPartitionsRemaining == 0)
+                                                      Array(classOf[Int].getName)).asInstanceOf[Set[TopicAndPartition]]
+          val shutdownComplete = (leaderPartitionsRemaining.size == 0)
           info("Shutdown status: " +
             (if (shutdownComplete) "complete" else "incomplete (broker still leads %d partitions)".format(leaderPartitionsRemaining)))
           shutdownComplete


Mime
View raw message