kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jun...@apache.org
Subject git commit: kafka-1091; full topic list can be read from metadata cache in the broker instead of ZK; patched by Jun Rao; reviewed by Joel Koshy, Guozhang Wang, Swapnil Ghike, and Neha Narkhede
Date Thu, 17 Oct 2013 16:37:09 GMT
Updated Branches:
  refs/heads/trunk b448d4e07 -> c66e4d586


kafka-1091; full topic list can be read from metadata cache in the broker instead of ZK; patched
by Jun Rao; reviewed by Joel Koshy, Guozhang Wang, Swapnil Ghike, and Neha Narkhede


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

Branch: refs/heads/trunk
Commit: c66e4d58687bee54bae6a31e976d4b9b63c36de1
Parents: b448d4e
Author: Jun Rao <junrao@gmail.com>
Authored: Thu Oct 17 09:37:06 2013 -0700
Committer: Jun Rao <junrao@gmail.com>
Committed: Thu Oct 17 09:37:06 2013 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/server/KafkaApis.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/c66e4d58/core/src/main/scala/kafka/server/KafkaApis.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/KafkaApis.scala b/core/src/main/scala/kafka/server/KafkaApis.scala
index 338d1cc..80a70f1 100644
--- a/core/src/main/scala/kafka/server/KafkaApis.scala
+++ b/core/src/main/scala/kafka/server/KafkaApis.scala
@@ -520,7 +520,7 @@ class KafkaApis(val requestChannel: RequestChannel,
       if(metadataRequest.topics.size > 0)
         metadataRequest.topics.toSet
       else
-        ZkUtils.getAllTopics(zkClient).toSet
+        leaderCache.keySet.map(_.topic)
     }
     val topicMetadataList =
       partitionMetadataLock synchronized {


Mime
View raw message