This is an automated email from the ASF dual-hosted git repository. nic pushed a commit to branch 3.0.x in repository https://gitbox.apache.org/repos/asf/kylin.git
commit abd29e4310dec1d2a812358f475d530b5a4a185a Author: nichunen <[email protected]> AuthorDate: Sun Jan 12 19:46:53 2020 +0800 Remove container never accessed --- .../apache/kylin/common/metrics/metrics2/CodahaleMetrics.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/core-common/src/main/java/org/apache/kylin/common/metrics/metrics2/CodahaleMetrics.java b/core-common/src/main/java/org/apache/kylin/common/metrics/metrics2/CodahaleMetrics.java index 7487930..1217558 100644 --- a/core-common/src/main/java/org/apache/kylin/common/metrics/metrics2/CodahaleMetrics.java +++ b/core-common/src/main/java/org/apache/kylin/common/metrics/metrics2/CodahaleMetrics.java @@ -27,7 +27,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Lock; @@ -85,7 +84,6 @@ public class CodahaleMetrics implements Metrics { private LoadingCache<String, Counter> counters; private LoadingCache<String, Meter> meters; private LoadingCache<String, Histogram> histograms; - private ConcurrentHashMap<String, Gauge> gauges; private KylinConfig conf; public CodahaleMetrics() { @@ -123,13 +121,6 @@ public class CodahaleMetrics implements Metrics { return histogram; } }); - gauges = new ConcurrentHashMap<String, Gauge>(); - //register JVM metrics - // registerAll("gc", new GarbageCollectorMetricSet()); - // registerAll("buffers", new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer())); - // registerAll("memory", new MemoryUsageGaugeSet()); - // registerAll("threads", new ThreadStatesGaugeSet()); - // registerAll("classLoadingz", new ClassLoadingGaugeSet()); //initialize reporters initReporting(); @@ -262,7 +253,6 @@ public class CodahaleMetrics implements Metrics { private void addGaugeInternal(String name, Gauge gauge) { try { gaugesLock.lock(); - gauges.put(name, gauge); // Metrics throws an Exception if we don't do this when the key already exists if (metricRegistry.getGauges().containsKey(name)) { LOGGER.warn("A Gauge with name [" + name + "] already exists. "
