Skip to content

Commit

Permalink
[Chore] Code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangWeike2000 authored Aug 25, 2024
1 parent c1a4e0c commit 5bb86f7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static SeaTunnelEngineMetricsExtractor getInstance() {

@Override
public List<JobMetrics> getMetricsByJobEngineId(@NonNull String jobEngineId) {
LinkedHashMap<Integer, JobMetrics> metricsMap = new LinkedHashMap();
LinkedHashMap<Integer, JobMetrics> metricsMap = new LinkedHashMap<>();

LinkedHashMap<Integer, String> jobPipelineStatus = getJobPipelineStatus(jobEngineId);
try {
Expand Down Expand Up @@ -258,7 +258,7 @@ public List<Map<String, String>> getClusterHealthMetrics() {
value = value.replace(" ", "");
Map<String, String> otherMetrics = JsonUtils.toMap(value);
for (String key : clusterHealthMetricsKeys) {
hostMetrics.put(key, otherMetrics.get(key).toString());
hostMetrics.put(key, otherMetrics.get(key));
}
zetaClusterMetrics.add(hostMetrics);
}
Expand All @@ -267,7 +267,7 @@ public List<Map<String, String>> getClusterHealthMetrics() {

@Override
public Map<Integer, JobMetrics> getMetricsByJobEngineIdRTMap(@NonNull String jobEngineId) {
LinkedHashMap<Integer, JobMetrics> metricsMap = new LinkedHashMap();
LinkedHashMap<Integer, JobMetrics> metricsMap = new LinkedHashMap<>();

LinkedHashMap<Integer, String> jobPipelineStatus = getJobPipelineStatus(jobEngineId);
try {
Expand Down Expand Up @@ -370,7 +370,7 @@ public Map<Long, HashMap<Integer, JobMetrics>> getAllRunningJobMetrics() {
JsonNode jsonNode = JsonUtils.stringToJsonNode(allJobMetricsContent);
Iterator<JsonNode> iterator = jsonNode.iterator();
while (iterator.hasNext()) {
LinkedHashMap<Integer, JobMetrics> metricsMap = new LinkedHashMap();
LinkedHashMap<Integer, JobMetrics> metricsMap = new LinkedHashMap<>();
JsonNode next = iterator.next();

JsonNode sourceReceivedCount = next.get("metrics").get("SourceReceivedCount");
Expand Down

0 comments on commit 5bb86f7

Please sign in to comment.