You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by wu...@apache.org on 2023/02/16 07:48:47 UTC

[ambari] branch trunk updated: AMBARI-25852: Change Kafka metrics_reporters param setup logic (#3640)

This is an automated email from the ASF dual-hosted git repository.

wuzhiguo pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 0a672bfdc0 AMBARI-25852: Change Kafka metrics_reporters param setup logic (#3640)
0a672bfdc0 is described below

commit 0a672bfdc061bce566b33e48601fdfd0ffdaed00
Author: Zhiguo Wu <wu...@apache.org>
AuthorDate: Thu Feb 16 15:48:40 2023 +0800

    AMBARI-25852: Change Kafka metrics_reporters param setup logic (#3640)
---
 .../stacks/BIGTOP/3.2.0/services/KAFKA/configuration/kafka-broker.xml | 2 +-
 .../stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/params.py      | 3 +++
 .../resources/stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py   | 4 ----
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/configuration/kafka-broker.xml b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/configuration/kafka-broker.xml
index 59458ad214..d886d7218d 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/configuration/kafka-broker.xml
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/configuration/kafka-broker.xml
@@ -305,7 +305,7 @@
   </property>
   <property>
     <name>kafka.metrics.reporters</name>
-    <value />
+    <value>{{metrics_reporters}}</value>
     <description>
       kafka ganglia metrics reporter and kafka timeline metrics reporter
     </description>
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/params.py
index f68442ef6e..2ee2d572ca 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/package/scripts/params.py
@@ -153,6 +153,9 @@ if has_metric_collector:
   else:
     metric_collector_protocol = 'http'
 
+  # If AMS is part of Services, use the KafkaTimelineMetricsReporter for metric reporting. Default is ''.
+  metrics_reporters = "org.apache.hadoop.metrics2.sink.kafka.KafkaTimelineMetricsReporter"
+
   host_in_memory_aggregation = str(default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation", True)).lower()
   host_in_memory_aggregation_port = default("/configurations/ams-site/timeline.metrics.host.inmemory.aggregation.port", 61888)
   is_aggregation_https_enabled = False
diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py
index 33df7ac2ca..43e426b9b7 100644
--- a/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py
+++ b/ambari-server/src/main/resources/stacks/BIGTOP/3.2.0/services/KAFKA/service_advisor.py
@@ -263,10 +263,6 @@ class KafkaRecommender(service_advisor.ServiceAdvisor):
     else:
       putKafkaBrokerAttributes('authorizer.class.name', 'delete', 'true')
 
-    #If AMS is part of Services, use the KafkaTimelineMetricsReporter for metric reporting. Default is ''.
-    if "AMBARI_METRICS" in servicesList:
-      putKafkaBrokerProperty('kafka.metrics.reporters', 'org.apache.hadoop.metrics2.sink.kafka.KafkaTimelineMetricsReporter')
-
     if ranger_plugin_enabled:
       kafkaLog4jRangerLines = [{
                                  "name": "log4j.appender.rangerAppender",


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ambari.apache.org
For additional commands, e-mail: commits-help@ambari.apache.org