maedhroz commented on a change in pull request #728:
URL: https://github.com/apache/cassandra/pull/728#discussion_r480242173
##########
File path: src/java/org/apache/cassandra/metrics/ClientMetrics.java
##########
@@ -136,16 +140,19 @@ private int countConnectedClients()
for (Server server : servers)
for (ClientStat stat : server.recentClientStats())
- stats.add(new HashMap(stat.asMap())); // asMap returns guava,
so need to convert to java for jmx
+ stats.add(new HashMap<>(stat.asMap())); // asMap returns
guava, so need to convert to java for jmx
stats.sort(Comparator.comparing(map ->
map.get(ClientStat.PROTOCOL_VERSION)));
return stats;
}
- private <T> Gauge<T> registerGauge(String name, Gauge<T> gauge)
+ private <T> Gauge<T> registerGauge(String name, String deprecated,
Gauge<T> gauge)
Review comment:
Did something similar, but in the direction of avoiding having the same
metric name creation code in both methods.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]