cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [2/3] git commit: replace ipv6 colons in jmx object names patch by Michał Michalski; reviewed by jbellis for CASSANDRA-5298
Date Mon, 04 Mar 2013 10:45:30 GMT
replace ipv6 colons in jmx object names
patch by Michał Michalski; reviewed by jbellis for CASSANDRA-5298


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3a3f1d94
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3a3f1d94
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3a3f1d94

Branch: refs/heads/trunk
Commit: 3a3f1d947462c7c5bdefd661f9e5c9738eab5c31
Parents: 8261aa0
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Mon Mar 4 11:45:16 2013 +0100
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Mon Mar 4 11:45:16 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../cassandra/metrics/ConnectionMetrics.java       |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/3a3f1d94/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index fd6547f..a6b2cff 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.3
+ * replace ipv6 colons in jmx object names (CASSANDRA-5298)
  * Avoid allocating SSTableBoundedScanner during repair when the range does 
    not intersect the sstable (CASSANDRA-5249)
  * Don't lowercase property map keys (this breaks NTS) (CASSANDRA-5292)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/3a3f1d94/src/java/org/apache/cassandra/metrics/ConnectionMetrics.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/metrics/ConnectionMetrics.java b/src/java/org/apache/cassandra/metrics/ConnectionMetrics.java
index 1a93022..5493505 100644
--- a/src/java/org/apache/cassandra/metrics/ConnectionMetrics.java
+++ b/src/java/org/apache/cassandra/metrics/ConnectionMetrics.java
@@ -63,7 +63,9 @@ public class ConnectionMetrics
      */
     public ConnectionMetrics(InetAddress ip, final OutboundTcpConnectionPool connectionPool)
     {
-        address = ip.getHostAddress();
+        // ipv6 addresses will contain colons, which are invalid in a JMX ObjectName
+        address = ip.getHostAddress().replaceAll(":", ".");
+
         commandPendingTasks = Metrics.newGauge(new MetricName(GROUP_NAME, TYPE_NAME, "CommandPendingTasks",
address), new Gauge<Integer>()
         {
             public Integer value()


Mime
View raw message