This is an automated email from the ASF dual-hosted git repository.
chaow pushed a commit to branch feature/metric2021
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/feature/metric2021 by this
push:
new f5e5fc1 add metric types
f5e5fc1 is described below
commit f5e5fc1a171bf9a610c51316ca5b7ecb32416630
Author: chaow <[email protected]>
AuthorDate: Wed Feb 10 14:39:54 2021 +0800
add metric types
---
metrics/interface/pom.xml | 27 +++++-------
.../main/java/org/apache/iotdb/metrics/Metric.java | 26 -----------
.../org/apache/iotdb/metrics/MetricFactory.java | 4 +-
.../org/apache/iotdb/metrics/MetricManager.java | 4 +-
.../org/apache/iotdb/metrics/MetricRegistry.java | 40 +++++++++++++++++
.../iotdb/metrics/impl/DoNothingFactory.java | 8 ++--
...ingMetric.java => DoNothingMetricRegistry.java} | 45 ++++++++++++++++---
.../org/apache/iotdb/metrics/type/Counter.java | 28 ++++++++++++
.../java/org/apache/iotdb/metrics/type/Gauge.java | 23 ++++++++++
.../org/apache/iotdb/metrics/type/Histogram.java | 27 ++++++++++++
.../java/org/apache/iotdb/metrics/type/Meter.java | 30 +++++++++++++
.../java/org/apache/iotdb/metrics/type/Metric.java | 22 ++++++++++
.../org/apache/iotdb/metrics/type/Snapshot.java | 51 ++++++++++++++++++++++
.../java/org/apache/iotdb/metrics/type/Timer.java | 41 +++++++++++++++++
metrics/pom.xml | 34 +++++++--------
.../java/org/apache/iotdb/db/service/IoTDB.java | 4 +-
16 files changed, 339 insertions(+), 75 deletions(-)
diff --git a/metrics/interface/pom.xml b/metrics/interface/pom.xml
index c280d16..9eed490 100644
--- a/metrics/interface/pom.xml
+++ b/metrics/interface/pom.xml
@@ -20,19 +20,16 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.iotdb</groupId>
- <artifactId>iotdb-metrics</artifactId>
- <version>0.12.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>metrics-interface</artifactId>
- <name>metric interface</name>
- <description>Metrics interface for IoTDB</description>
- <url>https://github.com/thulab/iotdb/tree/master/tsfile</url>
-
- <dependencies>
- </dependencies>
-
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.iotdb</groupId>
+ <artifactId>iotdb-metrics</artifactId>
+ <version>0.12.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>metrics-interface</artifactId>
+ <name>metric interface</name>
+ <description>Metrics interface for IoTDB</description>
+ <url>https://github.com/thulab/iotdb/tree/master/tsfile</url>
+ <dependencies/>
</project>
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/Metric.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/Metric.java
deleted file mode 100644
index 41c3493..0000000
--- a/metrics/interface/src/main/java/org/apache/iotdb/metrics/Metric.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.apache.iotdb.metrics;
-
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-public interface Metric {
- //metric.counter(5, "insertRecords","interface","insertRecords","sg","sg1");
- void count(int delta, String metric, String... tags);
- void count(long delta, String metric, String... tags);
- void histogram(int value, String metric, String... tags);
- void histogram(long value, String metric, String... tags);
- void gauge(int value, String metric, String... tags);
- void gauge(long value, String metric, String... tags);
- void meter(int value, String metric, String... tags);
- void meter(long value, String metric, String... tags);
- void timer(long delta, TimeUnit timeUnit, String metric, String... tags);
- void timerStart(String metric, String... tags);
- void timerEnd(String metric, String... tags);
-
-
- Map<String, String[]> getAllMetrics();
- Object getMetricValue (String metric, String... tags);
- Object getMetricHistogram (String metric, String... tags);
- Object getMetricTimer (String metric, String... tags);
-
-}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricFactory.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricFactory.java
index dd3ae3b..909afd7 100644
---
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricFactory.java
+++
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricFactory.java
@@ -11,10 +11,10 @@ public interface MetricFactory {
* @param namespace
* @return
*/
- Metric getMetric(String namespace);
+ MetricRegistry getMetric(String namespace);
void enableKnownMetric(KnownMetric metric);
- Map<String, Metric> getAllMetrics();
+ Map<String, MetricRegistry> getAllMetrics();
boolean isEnable();
}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricManager.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricManager.java
index 8b0d1fc..5b3c1b4 100644
---
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricManager.java
+++
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricManager.java
@@ -52,13 +52,13 @@ public class MetricManager {
}
}
- public static Metric getMetric(String namespace) {
+ public static MetricRegistry getMetric(String namespace) {
return factory.getMetric(namespace);
}
public static void enableKnownMetric(KnownMetric metric) {
factory.enableKnownMetric(metric);
}
- public static Map<String, Metric> getAllMetrics() {
+ public static Map<String, MetricRegistry> getAllMetrics() {
return factory.getAllMetrics();
}
public static boolean isEnable() {
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricRegistry.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricRegistry.java
new file mode 100644
index 0000000..b61d5b6
--- /dev/null
+++
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/MetricRegistry.java
@@ -0,0 +1,40 @@
+package org.apache.iotdb.metrics;
+
+import org.apache.iotdb.metrics.type.Counter;
+import org.apache.iotdb.metrics.type.Gauge;
+import org.apache.iotdb.metrics.type.Histogram;
+import org.apache.iotdb.metrics.type.Meter;
+import org.apache.iotdb.metrics.type.Metric;
+import org.apache.iotdb.metrics.type.Timer;
+
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+public interface MetricRegistry {
+ //metric.counter(5, "insertRecords","interface","insertRecords","sg","sg1");
+ void count(int delta, String metric, String... tags);
+ void count(long delta, String metric, String... tags);
+ void histogram(int value, String metric, String... tags);
+ void histogram(long value, String metric, String... tags);
+ void gauge(int value, String metric, String... tags);
+ void gauge(long value, String metric, String... tags);
+ void meter(int value, String metric, String... tags);
+ void meter(long value, String metric, String... tags);
+ void timer(long delta, TimeUnit timeUnit, String metric, String... tags);
+ void timerStart(String metric, String... tags);
+ void timerEnd(String metric, String... tags);
+
+
+ Map<String, String[]> getAllMetricKeys();
+ Metric getMetricValue(String metric, String... tags);
+// Object getMetricValue (String metric, String... tags);
+// Object getMetricHistogram (String metric, String... tags);
+// Object getMetricTimer (String metric, String... tags);
+
+ // key is name + tags
+ Map<String[], Counter> getAllCounters();
+ Map<String[], Gauge> getAllGauges();
+ Map<String[], Meter> getAllMeters();
+ Map<String[], Histogram> getAllHistograms();
+ Map<String[], Timer> getAllTimers();
+}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingFactory.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingFactory.java
index 242dc68..9eb267e 100644
---
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingFactory.java
+++
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingFactory.java
@@ -4,12 +4,12 @@ import java.util.Collections;
import java.util.Map;
import org.apache.iotdb.metrics.MetricFactory;
import org.apache.iotdb.metrics.KnownMetric;
-import org.apache.iotdb.metrics.Metric;
+import org.apache.iotdb.metrics.MetricRegistry;
public class DoNothingFactory implements MetricFactory {
- private DoNothingMetric metric = new DoNothingMetric();
+ private DoNothingMetricRegistry metric = new DoNothingMetricRegistry();
@Override
- public Metric getMetric(String namespace) {
+ public MetricRegistry getMetric(String namespace) {
return metric;
}
@@ -19,7 +19,7 @@ public class DoNothingFactory implements MetricFactory {
}
@Override
- public Map<String, Metric> getAllMetrics() {
+ public Map<String, MetricRegistry> getAllMetrics() {
return Collections.emptyMap();
}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetric.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetricRegistry.java
similarity index 53%
rename from
metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetric.java
rename to
metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetricRegistry.java
index 8b4f583..322e238 100644
---
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetric.java
+++
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/impl/DoNothingMetricRegistry.java
@@ -3,9 +3,15 @@ package org.apache.iotdb.metrics.impl;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.TimeUnit;
-import org.apache.iotdb.metrics.Metric;
+import org.apache.iotdb.metrics.MetricRegistry;
+import org.apache.iotdb.metrics.type.Counter;
+import org.apache.iotdb.metrics.type.Gauge;
+import org.apache.iotdb.metrics.type.Histogram;
+import org.apache.iotdb.metrics.type.Meter;
+import org.apache.iotdb.metrics.type.Metric;
+import org.apache.iotdb.metrics.type.Timer;
-public class DoNothingMetric implements Metric {
+public class DoNothingMetricRegistry implements MetricRegistry {
@Override
public void count(int delta, String metric, String... tags) {
@@ -63,12 +69,39 @@ public class DoNothingMetric implements Metric {
}
@Override
- public Map<String, String[]> getAllMetrics() {
- return Collections.emptyMap();
+ public Map<String, String[]> getAllMetricKeys() {
+ return null;
}
@Override
- public Object getMetricValue(String metric, String... tags) {
- return 0;
+ public Metric getMetricValue(String metric, String... tags) {
+ return null;
}
+
+ @Override
+ public Map<String[], Counter> getAllCounters() {
+ return null;
+ }
+
+ @Override
+ public Map<String[], Gauge> getAllGauges() {
+ return null;
+ }
+
+ @Override
+ public Map<String[], Meter> getAllMeters() {
+ return null;
+ }
+
+ @Override
+ public Map<String[], Histogram> getAllHistograms() {
+ return null;
+ }
+
+ @Override
+ public Map<String[], Timer> getAllTimers() {
+ return null;
+ }
+
+
}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Counter.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Counter.java
new file mode 100644
index 0000000..a75fb2b
--- /dev/null
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Counter.java
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.metrics.type;
+
+public interface Counter extends Metric {
+ void inc();
+ void inc(long n);
+ void dec();
+ void dec(long n);
+
+ long count();
+}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Gauge.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Gauge.java
new file mode 100644
index 0000000..9637ee5
--- /dev/null
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Gauge.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.metrics.type;
+
+public interface Gauge<T> extends Metric {
+ T value();
+}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Histogram.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Histogram.java
new file mode 100644
index 0000000..edc85cf
--- /dev/null
+++
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Histogram.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.metrics.type;
+
+public interface Histogram extends Metric {
+ void update(int value);
+ void update(long value);
+ long count();
+
+ Snapshot takeSnapshot();
+}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Meter.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Meter.java
new file mode 100644
index 0000000..0875dde
--- /dev/null
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Meter.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.metrics.type;
+
+public interface Meter extends Metric {
+ long getCount();
+ double getOneMinuteRate();
+ double getMeanRate();
+ double getFiveMinuteRate();
+ double getFifteenMinuteRate();
+
+ void mark();
+ void mark(long n);
+}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Metric.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Metric.java
new file mode 100644
index 0000000..ff1d9fc
--- /dev/null
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Metric.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.metrics.type;
+
+public interface Metric {
+}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Snapshot.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Snapshot.java
new file mode 100644
index 0000000..3975b24
--- /dev/null
+++
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Snapshot.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.metrics.type;
+
+import java.io.OutputStream;
+
+/**
+ * used by Timer and Histogram
+ */
+public interface Snapshot {
+
+ public abstract double getValue(double quantile);
+
+ public abstract long[] getValues();
+ public abstract int size();
+
+ public double getMedian();
+ public double get75thPercentile();
+ public double get95thPercentile();
+ public double get98thPercentile();
+ public double get99thPercentile();
+ public double get999thPercentile();
+
+ public abstract long getMax();
+ public abstract double getMean();
+ public abstract long getMin();
+ public abstract double getStdDev();
+
+ /**
+ * Writes the values of the snapshot to the given stream.
+ *
+ * @param output an output stream
+ */
+ public abstract void dump(OutputStream output);
+}
diff --git
a/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Timer.java
b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Timer.java
new file mode 100644
index 0000000..52ed45e
--- /dev/null
+++ b/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Timer.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.metrics.type;
+
+import java.util.concurrent.TimeUnit;
+
+public interface Timer extends Metric {
+ void update(long duration, TimeUnit unit);
+
+ default void updateMillis(long durationMillis) {
+ update(durationMillis, TimeUnit.NANOSECONDS);
+ }
+
+ default void updateMicros(long durationMicros) {
+ update(durationMicros, TimeUnit.MICROSECONDS);
+ }
+
+ default void updateNanos(long durationNanos) {
+ update(durationNanos, TimeUnit.NANOSECONDS);
+ }
+
+ Snapshot takeSnapshot();
+
+ Meter getMeter();
+}
diff --git a/metrics/pom.xml b/metrics/pom.xml
index ae49335..7a73162 100644
--- a/metrics/pom.xml
+++ b/metrics/pom.xml
@@ -20,22 +20,20 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.iotdb</groupId>
- <artifactId>iotdb-parent</artifactId>
- <version>0.12.0-SNAPSHOT</version>
- <relativePath>../pom.xml</relativePath>
- </parent>
- <artifactId>iotdb-metrics</artifactId>
- <packaging>pom</packaging>
- <name>metric module</name>
- <description>Metrics interface for IoTDB</description>
- <url>https://github.com/thulab/iotdb/tree/master/tsfile</url>
- <modules>
- <module>interface</module>
- </modules>
- <dependencies>
- </dependencies>
-
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.iotdb</groupId>
+ <artifactId>iotdb-parent</artifactId>
+ <version>0.12.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>iotdb-metrics</artifactId>
+ <packaging>pom</packaging>
+ <name>metric module</name>
+ <description>Metrics interface for IoTDB</description>
+ <url>https://github.com/thulab/iotdb/tree/master/tsfile</url>
+ <modules>
+ <module>interface</module>
+ </modules>
+ <dependencies/>
</project>
diff --git a/server/src/main/java/org/apache/iotdb/db/service/IoTDB.java
b/server/src/main/java/org/apache/iotdb/db/service/IoTDB.java
index cfeb50d..44e4d3c 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/IoTDB.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/IoTDB.java
@@ -41,7 +41,7 @@ import org.apache.iotdb.db.rescon.SystemInfo;
import org.apache.iotdb.db.rescon.TVListAllocator;
import org.apache.iotdb.db.sync.receiver.SyncServerManager;
import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager;
-import org.apache.iotdb.metrics.Metric;
+import org.apache.iotdb.metrics.MetricRegistry;
import org.apache.iotdb.metrics.MetricManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -58,7 +58,7 @@ public class IoTDB implements IoTDBMBean {
return IoTDBHolder.INSTANCE;
}
- public static Metric serverMetric = MetricManager.getMetric("iotdb");
+ public static MetricRegistry serverMetricRegistry =
MetricManager.getMetric("iotdb");
public static void main(String[] args) {
if (args.length > 0) {