From 25a44ff8784b0937157e245880ffcffd34b233fd Mon Sep 17 00:00:00 2001 From: mrz <17674724620@163.com> Date: Fri, 23 Aug 2024 16:26:06 +0800 Subject: [PATCH] retouch --- .../engine/SeaTunnelEngineMetricsExtractor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/thirdparty/engine/SeaTunnelEngineMetricsExtractor.java b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/thirdparty/engine/SeaTunnelEngineMetricsExtractor.java index 91607e077..c8426293c 100644 --- a/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/thirdparty/engine/SeaTunnelEngineMetricsExtractor.java +++ b/seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/thirdparty/engine/SeaTunnelEngineMetricsExtractor.java @@ -92,7 +92,7 @@ public static SeaTunnelEngineMetricsExtractor getInstance() { @Override public List getMetricsByJobEngineId(@NonNull String jobEngineId) { - LinkedHashMap metricsMap = new LinkedHashMap(); + LinkedHashMap metricsMap = new LinkedHashMap<>(); LinkedHashMap jobPipelineStatus = getJobPipelineStatus(jobEngineId); try { @@ -258,7 +258,7 @@ public List> getClusterHealthMetrics() { value = value.replace(" ", ""); Map otherMetrics = JsonUtils.toMap(value); for (String key : clusterHealthMetricsKeys) { - hostMetrics.put(key, otherMetrics.get(key).toString()); + hostMetrics.put(key, otherMetrics.get(key)); } zetaClusterMetrics.add(hostMetrics); } @@ -267,7 +267,7 @@ public List> getClusterHealthMetrics() { @Override public Map getMetricsByJobEngineIdRTMap(@NonNull String jobEngineId) { - LinkedHashMap metricsMap = new LinkedHashMap(); + LinkedHashMap metricsMap = new LinkedHashMap<>(); LinkedHashMap jobPipelineStatus = getJobPipelineStatus(jobEngineId); try { @@ -370,7 +370,7 @@ public Map> getAllRunningJobMetrics() { JsonNode jsonNode = JsonUtils.stringToJsonNode(allJobMetricsContent); Iterator iterator = jsonNode.iterator(); while (iterator.hasNext()) { - LinkedHashMap metricsMap = new LinkedHashMap(); + LinkedHashMap metricsMap = new LinkedHashMap<>(); JsonNode next = iterator.next(); JsonNode sourceReceivedCount = next.get("metrics").get("SourceReceivedCount");