Review Board 1.7.22


Patch for KAFKA-1091

Review Request #14676 - Created Oct. 16, 2013 and updated

Jun Rao
KAFKA-1091
Reviewers
kafka
kafka
kafka-1091

 

Diff revision 1 (Latest)

  1. core/src/main/scala/kafka/server/KafkaApis.scala: Loading...
core/src/main/scala/kafka/server/KafkaApis.scala
Revision 338d1cc6533fd219941f2afb9bc0ea122b368bbe New Change
[20] 517 lines
[+20]
518
    var uniqueTopics = Set.empty[String]
518
    var uniqueTopics = Set.empty[String]
519
    uniqueTopics = {
519
    uniqueTopics = {
520
      if(metadataRequest.topics.size > 0)
520
      if(metadataRequest.topics.size > 0)
521
        metadataRequest.topics.toSet
521
        metadataRequest.topics.toSet
522
      else
522
      else
523
        ZkUtils.getAllTopics(zkClient).toSet
523
        leaderCache.keySet.map(_.topic)
524
    }
524
    }
525
    val topicMetadataList =
525
    val topicMetadataList =
526
      partitionMetadataLock synchronized {
526
      partitionMetadataLock synchronized {
527
        uniqueTopics.map { topic =>
527
        uniqueTopics.map { topic =>
528
          if(leaderCache.keySet.map(_.topic).contains(topic)) {
528
          if(leaderCache.keySet.map(_.topic).contains(topic)) {
[+20] [20] 347 lines
  1. core/src/main/scala/kafka/server/KafkaApis.scala: Loading...