From 148a0f332ca5d3801705e0a9eb8be4268104bc9d Mon Sep 17 00:00:00 2001 From: dengzhilong Date: Fri, 17 Nov 2023 15:54:22 +0800 Subject: [PATCH] [FIX]fix no data is available for monitoring indicators of components such as hdfs and yarn on the web page --- .../core/timeline/discovery/TimelineMetricMetadataKey.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/discovery/TimelineMetricMetadataKey.java b/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/discovery/TimelineMetricMetadataKey.java index d308ce1a..235fc723 100644 --- a/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/discovery/TimelineMetricMetadataKey.java +++ b/ambari-metrics-timelineservice/src/main/java/org/apache/ambari/metrics/core/timeline/discovery/TimelineMetricMetadataKey.java @@ -57,14 +57,14 @@ public boolean equals(Object o) { TimelineMetricMetadataKey that = (TimelineMetricMetadataKey) o; if (!metricName.equals(that.metricName)) return false; - if (!appId.equals(that.appId)) return false; + if (!appId.toLowerCase().equals(that.appId.toLowerCase())) return false; return (StringUtils.isNotEmpty(instanceId) ? instanceId.equals(that.instanceId) : StringUtils.isEmpty(that.instanceId)); } @Override public int hashCode() { int result = metricName.hashCode(); - result = 31 * result + (appId != null ? appId.hashCode() : 0); + result = 31 * result + (appId != null ? appId.toLowerCase().hashCode() : 0); result = 31 * result + (instanceId != null ? instanceId.hashCode() : 0); return result; }