From 0a104496179e2fda2cad1cdfb887b72149ad9a25 Mon Sep 17 00:00:00 2001 From: Chun-Hung Tseng Date: Wed, 14 Feb 2024 22:18:30 +0100 Subject: [PATCH] Fix #2163 Replace LinkedList with ArrayList --- .../java/com/datastrato/gravitino/metrics/MetricsSystem.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/datastrato/gravitino/metrics/MetricsSystem.java b/core/src/main/java/com/datastrato/gravitino/metrics/MetricsSystem.java index 014c854bb5b..7b699716b95 100644 --- a/core/src/main/java/com/datastrato/gravitino/metrics/MetricsSystem.java +++ b/core/src/main/java/com/datastrato/gravitino/metrics/MetricsSystem.java @@ -19,9 +19,9 @@ import io.prometheus.client.exporter.MetricsServlet; import java.io.Closeable; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; -import java.util.LinkedList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,7 +35,7 @@ public class MetricsSystem implements Closeable { private final String name; private final MetricRegistry metricRegistry; private HashMap metricSources = new HashMap<>(); - private List metricsReporters = new LinkedList<>(); + private List metricsReporters = new ArrayList<>(); private CollectorRegistry prometheusRegistry; public MetricsSystem() {