cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Podkowinski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-13103) incorrect jvm metric names
Date Mon, 06 Feb 2017 13:03:41 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-13103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15853952#comment-15853952
] 

Stefan Podkowinski commented on CASSANDRA-13103:
------------------------------------------------

Thanks for the patch, [~arastoul]! This is a little strange. I remember that I had to add
that single dot character while working on CASSANDRA-12312, or else the dot would have been
absent between the two names. But I can't really reproduce this and the code and netcat clearly
indicates otherwise. So I'd suggest to go with the proposed patch (2.2 upwards), as the code
is clearly not working as intended now.

||2.2||3.0||trunk||
|[branch|https://github.com/spodkowinski/cassandra/tree/CASSANDRA-13103-2.2]|[branch|https://github.com/spodkowinski/cassandra/tree/CASSANDRA-13103-3.0]|[branch|https://github.com/spodkowinski/cassandra/tree/CASSANDRA-13103-trunk]|
|[dtest|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-13103-2.2-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-13103-3.0-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-13103-trunk-dtest/]|
|[testall|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-13103-2.2-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-13103-3.0-testall/]|[testall|http://cassci.datastax.com/view/Dev/view/spodkowinski/job/spodkowinski-CASSANDRA-13103-trunk-testall/]|



> incorrect jvm metric names
> --------------------------
>
>                 Key: CASSANDRA-13103
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13103
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Observability
>            Reporter: Alain Rastoul
>            Assignee: Alain Rastoul
>            Priority: Minor
>              Labels: lhf
>             Fix For: 3.9, 3.x
>
>         Attachments: Fix-incorrect-jvm-metric-names-CASSANDRA-13103.patch
>
>
> Some jvm metrics have a double dot in name like:
> jvm.memory..total.max , jvm.memory..total.init (etc).
> it seems that an extra dot is added at the end of the name in CassandraDaemon.java, around
line 367 (in 3.0.10):
> ...
>                 // 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());
> and also added in append method of MetricRegistry.
> Call stack is:
> MetricRegistry>>registerAll(String prefix, MetricSet metrics)
> MetricRegistry>>static String name(String name, String... names)
> MetricRegistry>>static void append(StringBuilder builder, String part)
> and in append the dot is also added:
> ...
>             if(builder.length() > 0) {
>                 builder.append('.');
>             }
>             builder.append(part);
> ...
> The codahale MetricRegistry class seems to have no recent modification of name or append
methods, so it look like a small bug.
> May be the fix could be to simply not to add  the final dot in the metric name, ie  "jvm.buffers"
 instead of "jvm.buffers."



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message