cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michał Michalski (JIRA) <j...@apache.org>
Subject [jira] [Created] (CASSANDRA-5298) MalformedObjectNameException in ConnectionMetrics for IPv6 nodes because of ":" characters
Date Thu, 28 Feb 2013 10:01:14 GMT
Michał Michalski created CASSANDRA-5298:
-------------------------------------------

             Summary: MalformedObjectNameException in ConnectionMetrics for IPv6 nodes because
of ":" characters
                 Key: CASSANDRA-5298
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5298
             Project: Cassandra
          Issue Type: Bug
    Affects Versions: 1.2.1
            Reporter: Michał Michalski
            Assignee: Michał Michalski
         Attachments: ipv6-connection-metrics-replaceAll.patch, ipv6-connection-metrics-URLEncoder.patch

After upgrading node to 1.2.1, during C* startup, for all ConnectionMetrics I get exception
like this one:

{noformat} WARN [GossipStage:1] 2013-02-27 12:14:55,431 JmxReporter.java (line 388) Error
processing org.apache.cassandra.metrics:type=Connection,scope=2001:4c28:20:177:0:1:2:4,name=Timeouts
javax.management.MalformedObjectNameException: Invalid character ':' in value part of property
	at javax.management.ObjectName.construct(ObjectName.java:602)
	at javax.management.ObjectName.<init>(ObjectName.java:1403)
	at com.yammer.metrics.reporting.JmxReporter.onMetricAdded(JmxReporter.java:386)
	at com.yammer.metrics.core.MetricsRegistry.notifyMetricAdded(MetricsRegistry.java:516)
	at com.yammer.metrics.core.MetricsRegistry.getOrAdd(MetricsRegistry.java:491)
	at com.yammer.metrics.core.MetricsRegistry.newMeter(MetricsRegistry.java:240)
	at com.yammer.metrics.Metrics.newMeter(Metrics.java:245)
	at org.apache.cassandra.metrics.ConnectionMetrics.<init>(ConnectionMetrics.java:102)
	at org.apache.cassandra.net.OutboundTcpConnectionPool.<init>(OutboundTcpConnectionPool.java:53)
	at org.apache.cassandra.net.MessagingService.getConnectionPool(MessagingService.java:481)
	at org.apache.cassandra.net.MessagingService.getConnection(MessagingService.java:489)
	at org.apache.cassandra.net.MessagingService.sendOneWay(MessagingService.java:612)
	at org.apache.cassandra.net.MessagingService.sendOneWay(MessagingService.java:581)
	at org.apache.cassandra.gms.GossipDigestSynVerbHandler.doVerb(GossipDigestSynVerbHandler.java:85)
	at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:56)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)

(...){noformat}

Looking at ObjectName source code (e.g. http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/javax/management/ObjectName.java
) I can see that ":" is not a valid character, so my idea for solving this problem is to use:

1) URLEncode.encode() - seems to be more "proper" solution, but produces a bit unreadable
metric scrope like: MBean org.apache.cassandra.metrics:type=Connection,scope=2001%3A4c27%3A10%3A167%3A0%3A1%3A2%3A5,name=CommandCompletedTasks

2) <String>.replaceAll() - we can simply replace ":" with "." which wouldn't give us
valid IPv6 address, but will be much more readable. 

Second one seems to be a better choice for me, but I attach two patches.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message