kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject svn commit: r1156940 - /incubator/kafka/trunk/core/src/main/scala/kafka/server/KafkaServer.scala
Date Fri, 12 Aug 2011 02:09:57 GMT
Author: junrao
Date: Fri Aug 12 02:09:56 2011
New Revision: 1156940

URL: http://svn.apache.org/viewvc?rev=1156940&view=rev
Log:
KafkaServer can throw a NullPointerException during startup if zookeeper is down; KAFKA-94

Modified:
    incubator/kafka/trunk/core/src/main/scala/kafka/server/KafkaServer.scala

Modified: incubator/kafka/trunk/core/src/main/scala/kafka/server/KafkaServer.scala
URL: http://svn.apache.org/viewvc/incubator/kafka/trunk/core/src/main/scala/kafka/server/KafkaServer.scala?rev=1156940&r1=1156939&r2=1156940&view=diff
==============================================================================
--- incubator/kafka/trunk/core/src/main/scala/kafka/server/KafkaServer.scala (original)
+++ incubator/kafka/trunk/core/src/main/scala/kafka/server/KafkaServer.scala Fri Aug 12 02:09:56
2011
@@ -96,9 +96,11 @@ class KafkaServer(val config: KafkaConfi
       logger.info("Shutting down...")
       try {
         scheduler.shutdown
-        socketServer.shutdown()
+        if (socketServer != null)
+          socketServer.shutdown()
         Utils.swallow(logger.warn, Utils.unregisterMBean(statsMBeanName))
-        logManager.close()
+        if (logManager != null)
+          logManager.close()
 
         val cleanShutDownFile = new File(new File(config.logDir), CLEAN_SHUTDOWN_FILE)
         cleanShutDownFile.createNewFile



Mime
View raw message