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:56 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.0 5852bb0e4 -> aef20e835


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

(cherry picked from commit 7b7f57df6229c02482e5176f2f265e7a890de2a3)
Signed-off-by: Ismael Juma <ismael@juma.me.uk>


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

Branch: refs/heads/0.10.0
Commit: aef20e8353df22894bb43474cb8e31d1afd5ce6b
Parents: 5852bb0
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:52:50 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/aef20e83/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 a8a282e..963d769 100644
--- a/core/src/main/scala/kafka/admin/AdminUtils.scala
+++ b/core/src/main/scala/kafka/admin/AdminUtils.scala
@@ -554,9 +554,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