This is an automated email from the ASF dual-hosted git repository.
payert pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.7 by this push:
new 61dae1d AMBARI-25625 druid.emitter.ambari-metrics.hostname set
improperly (#3290)
61dae1d is described below
commit 61dae1dabd98d92e9d699e5daab91114f8ccd65e
Author: Tamas Payer <[email protected]>
AuthorDate: Wed Mar 3 09:26:50 2021 +0100
AMBARI-25625 druid.emitter.ambari-metrics.hostname set improperly (#3290)
The '/etc/druid/conf/_common/common.runtime.properties' file continas the
line:
'druid.emitter.ambari-metrics.hostname=c'. Here the metrics collector
hostname
is invalid as only the first character of the hostname is set..
Change-Id: I2655418fc71c8fc49b69542aaa53a81c7aa794c5
Co-authored-by: Tamas Payer <[email protected]>
---
.../common-services/DRUID/0.10.1/package/scripts/params.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
a/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/params.py
index 8782a7e..794977d 100644
---
a/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/params.py
+++
b/ambari-server/src/main/resources/common-services/DRUID/0.10.1/package/scripts/params.py
@@ -166,18 +166,19 @@ metric_truststore_path =
default("/configurations/ams-ssl-client/ssl.client.trus
metric_truststore_type =
default("/configurations/ams-ssl-client/ssl.client.truststore.type", "")
metric_truststore_password =
default("/configurations/ams-ssl-client/ssl.client.truststore.password", "")
-ams_collector_hosts = default("/clusterHostInfo/metrics_collector_hosts", [])
+set_instanceId = "false"
if 'cluster-env' in config['configurations'] and \
- 'metrics_collector_external_hosts' in
config['configurations']['cluster-env']:
+ 'metrics_collector_external_hosts' in
config['configurations']['cluster-env']:
ams_collector_hosts =
config['configurations']['cluster-env']['metrics_collector_external_hosts']
set_instanceId = "true"
else:
ams_collector_hosts =
",".join(default("/clusterHostInfo/metrics_collector_hosts", []))
-has_metric_collector = not len(ams_collector_hosts) == 0
+
+has_metric_collector = len(ams_collector_hosts) > 0
if has_metric_collector:
metric_emitter_type = "ambari-metrics"
- metric_collector_host = ams_collector_hosts[0]
+ metric_collector_host = ams_collector_hosts.split(",")[0]
if 'cluster-env' in config['configurations'] and \
'metrics_collector_external_port' in
config['configurations']['cluster-env']:
metric_collector_port =
config['configurations']['cluster-env']['metrics_collector_external_port']