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: Add `fetchTopicMetadataFromZk` overload that takes `SecurityProtocol` parameter
Date Tue, 09 Aug 2016 00:52:32 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 6b2564811 -> 7b7f57df6


MINOR: Add `fetchTopicMetadataFromZk` overload that takes `SecurityProtocol` parameter

ijuma

Author: dan norwood <norwood@confluent.io>

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

Closes #1713 from norwood/add-security-protocol-option-for-fetch


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

Branch: refs/heads/trunk
Commit: 7b7f57df6229c02482e5176f2f265e7a890de2a3
Parents: 6b25648
Author: dan norwood <norwood@confluent.io>
Authored: Tue Aug 9 01:34:04 2016 +0100
Committer: Ismael Juma <ismael@juma.me.uk>
Committed: Tue Aug 9 01:34:04 2016 +0100

----------------------------------------------------------------------
 core/src/main/scala/kafka/admin/AdminUtils.scala | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/7b7f57df/core/src/main/scala/kafka/admin/AdminUtils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/admin/AdminUtils.scala b/core/src/main/scala/kafka/admin/AdminUtils.scala
index 83c2f6c..aa6ebe2 100644
--- a/core/src/main/scala/kafka/admin/AdminUtils.scala
+++ b/core/src/main/scala/kafka/admin/AdminUtils.scala
@@ -559,9 +559,12 @@ object AdminUtils extends Logging {
   def fetchTopicMetadataFromZk(topic: String, zkUtils: ZkUtils): MetadataResponse.TopicMetadata
=
     fetchTopicMetadataFromZk(topic, zkUtils, new mutable.HashMap[Int, Broker])
 
-  def fetchTopicMetadataFromZk(topics: Set[String], zkUtils: ZkUtils): Set[MetadataResponse.TopicMetadata]
= {
+  def fetchTopicMetadataFromZk(topics: Set[String], zkUtils: ZkUtils): Set[MetadataResponse.TopicMetadata]
=
+    fetchTopicMetadataFromZk(topics, zkUtils, SecurityProtocol.PLAINTEXT)
+
+  def fetchTopicMetadataFromZk(topics: Set[String], zkUtils: ZkUtils, protocol: SecurityProtocol):
Set[MetadataResponse.TopicMetadata] = {
     val cachedBrokerInfo = new mutable.HashMap[Int, Broker]()
-    topics.map(topic => fetchTopicMetadataFromZk(topic, zkUtils, cachedBrokerInfo))
+    topics.map(topic => fetchTopicMetadataFromZk(topic, zkUtils, cachedBrokerInfo, protocol))
   }
 
   private def fetchTopicMetadataFromZk(topic: String,


Mime
View raw message