kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ij...@apache.org
Subject kafka git commit: MINOR: Improve shutdown sequence
Date Sat, 13 May 2017 07:15:46 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 6a5026b23 -> c5aeaa7d8


MINOR: Improve shutdown sequence

Author: Ismael Juma <ismael@juma.me.uk>

Reviewers: Jun Rao <junrao@gmail.com>

Closes #3030 from ijuma/improve-shutdown-sequence


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

Branch: refs/heads/trunk
Commit: c5aeaa7d898ce4b21e3204cd805d0b2c508e24eb
Parents: 6a5026b
Author: Ismael Juma <ismael@juma.me.uk>
Authored: Sat May 13 08:15:30 2017 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Sat May 13 08:15:30 2017 +0100

----------------------------------------------------------------------
 core/src/main/scala/kafka/server/KafkaServer.scala | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/c5aeaa7d/core/src/main/scala/kafka/server/KafkaServer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/KafkaServer.scala b/core/src/main/scala/kafka/server/KafkaServer.scala
index 431d192..fdf837c 100755
--- a/core/src/main/scala/kafka/server/KafkaServer.scala
+++ b/core/src/main/scala/kafka/server/KafkaServer.scala
@@ -589,28 +589,35 @@ class KafkaServer(val config: KafkaConfig, time: Time = Time.SYSTEM,
threadNameP
       if (shutdownLatch.getCount > 0 && isShuttingDown.compareAndSet(false, true))
{
         CoreUtils.swallow(controlledShutdown())
         brokerState.newState(BrokerShuttingDown)
+        
         if (socketServer != null)
           CoreUtils.swallow(socketServer.shutdown())
         if (requestHandlerPool != null)
           CoreUtils.swallow(requestHandlerPool.shutdown())
+
         CoreUtils.swallow(kafkaScheduler.shutdown())
+
         if (apis != null)
           CoreUtils.swallow(apis.close())
         CoreUtils.swallow(authorizer.foreach(_.close()))
-        if (replicaManager != null)
-          CoreUtils.swallow(replicaManager.shutdown())
         if (adminManager != null)
           CoreUtils.swallow(adminManager.shutdown())
+
         if (transactionCoordinator != null)
           CoreUtils.swallow(transactionCoordinator.shutdown())
         if (groupCoordinator != null)
           CoreUtils.swallow(groupCoordinator.shutdown())
+
+        if (replicaManager != null)
+          CoreUtils.swallow(replicaManager.shutdown())
         if (logManager != null)
           CoreUtils.swallow(logManager.shutdown())
+
         if (kafkaController != null)
           CoreUtils.swallow(kafkaController.shutdown())
         if (zkUtils != null)
           CoreUtils.swallow(zkUtils.close())
+
         if (metrics != null)
           CoreUtils.swallow(metrics.close())
 


Mime
View raw message