Fix incorrect jvm metric names patch by Alain Rastoul; reviewed by Stefan Podkowinski for CASSANDRA-13103
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/a79cc984 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a79cc984 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a79cc984 Branch: refs/heads/cassandra-3.0 Commit: a79cc9840d8c5a400e9838e0a366bb371ff5d918 Parents: e5a5fb9 Author: Alain Rastoul <alain.rast...@free.fr> Authored: Sun Jan 8 00:46:39 2017 +0100 Committer: Stefan Podkowinski <s.podkowin...@gmail.com> Committed: Mon Apr 3 19:57:21 2017 +0200 ---------------------------------------------------------------------- CHANGES.txt | 1 + src/java/org/apache/cassandra/service/CassandraDaemon.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/a79cc984/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index a415395..c77576b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.2.10 + * Fix JVM metric paths (CASSANDRA-13103) * Honor truststore-password parameter in cassandra-stress (CASSANDRA-12773) * Discard in-flight shadow round responses (CASSANDRA-12653) * Don't anti-compact repaired data to avoid inconsistencies (CASSANDRA-13153) http://git-wip-us.apache.org/repos/asf/cassandra/blob/a79cc984/src/java/org/apache/cassandra/service/CassandraDaemon.java ---------------------------------------------------------------------- diff --git a/src/java/org/apache/cassandra/service/CassandraDaemon.java b/src/java/org/apache/cassandra/service/CassandraDaemon.java index e342389..18b568d 100644 --- a/src/java/org/apache/cassandra/service/CassandraDaemon.java +++ b/src/java/org/apache/cassandra/service/CassandraDaemon.java @@ -325,9 +325,9 @@ public class CassandraDaemon try { // enable metrics provided by metrics-jvm.jar - CassandraMetricsRegistry.Metrics.register("jvm.buffers.", new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer())); - CassandraMetricsRegistry.Metrics.register("jvm.gc.", new GarbageCollectorMetricSet()); - CassandraMetricsRegistry.Metrics.register("jvm.memory.", new MemoryUsageGaugeSet()); + CassandraMetricsRegistry.Metrics.register("jvm.buffers", new BufferPoolMetricSet(ManagementFactory.getPlatformMBeanServer())); + CassandraMetricsRegistry.Metrics.register("jvm.gc", new GarbageCollectorMetricSet()); + CassandraMetricsRegistry.Metrics.register("jvm.memory", new MemoryUsageGaugeSet()); CassandraMetricsRegistry.Metrics.register("jvm.fd.usage", new FileDescriptorRatioGauge()); // initialize metrics-reporter-config from yaml file String reportFileLocation = CassandraDaemon.class.getClassLoader().getResource(metricsReporterConfigFile).getFile();