You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ni...@apache.org on 2020/02/07 08:04:29 UTC
[kylin] 02/15: Remove container never accessed
This is an automated email from the ASF dual-hosted git repository.
nic pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/kylin.git
commit fb924fa4410270c003399b4a7942922138b465c4
Author: nichunen <ni...@apache.org>
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. "