You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2015/11/18 22:41:01 UTC

ambari git commit: AMBARI-13829. Kafka listeners property should be configurable (sriharsha via swagle)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 65fd34702 -> f4fa15fef


AMBARI-13829. Kafka listeners property should be configurable (sriharsha via swagle)


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

Branch: refs/heads/branch-2.1
Commit: f4fa15fef8d8b7a916f379cacd82788d6974cff9
Parents: 65fd347
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Wed Nov 18 13:40:52 2015 -0800
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Wed Nov 18 13:40:52 2015 -0800

----------------------------------------------------------------------
 .../common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4fa15fe/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
index e445763..2bd93d2 100644
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
+++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
@@ -44,7 +44,9 @@ def kafka():
     #listeners and advertised.listeners are only added in 2.3.0.0 onwards.
     if params.hdp_stack_version != "" and compare_versions(params.hdp_stack_version, '2.3.0.0') >= 0:
         if params.security_enabled and params.kafka_kerberos_enabled:
-            listeners = kafka_server_config['listeners'].replace("localhost", params.hostname).replace("PLAINTEXT", "PLAINTEXTSASL")
+            listeners = kafka_server_config['listeners'].replace("localhost", params.hostname)
+            if "SASL" not in listeners:
+                listeners = listeners.replace("PLAINTEXT", "PLAINTEXTSASL")
             kafka_server_config['listeners'] = listeners
             kafka_server_config['advertised.listeners'] = listeners
         else: