mirror of https://github.com/apache/cassandra
Fix malformed JMX ObjectName containing IPv6 addresses
Patch by Erik Forsberg; Reviewed by Robert Stupp for CASSANDRA-9027
This commit is contained in:
parent
f5f97d8153
commit
495ae9c7e7
|
|
@ -1,4 +1,5 @@
|
|||
2.0.14:
|
||||
* Fix malformed JMX ObjectName containing IPv6 addresses (CASSANDRA-9027)
|
||||
* Fix potential data loss in CompressedSequentialWriter (CASSANDRA-8949)
|
||||
* (cqlsh) Allow increasing CSV field size limit through
|
||||
cqlshrc config option (CASSANDRA-8934)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class ConnectionMetrics
|
|||
public ConnectionMetrics(InetAddress ip, final OutboundTcpConnectionPool connectionPool)
|
||||
{
|
||||
// ipv6 addresses will contain colons, which are invalid in a JMX ObjectName
|
||||
address = ip.getHostAddress().replaceAll(":", ".");
|
||||
address = ip.getHostAddress().replace(':', '.');
|
||||
|
||||
factory = new DefaultNameFactory("Connection", address);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class HintedHandoffMetrics
|
|||
{
|
||||
public Counter load(InetAddress address)
|
||||
{
|
||||
return Metrics.newCounter(factory.createMetricName("Hints_created-" + address.getHostAddress()));
|
||||
return Metrics.newCounter(factory.createMetricName("Hints_created-" + address.getHostAddress().replace(':', '.')));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ public class HintedHandoffMetrics
|
|||
|
||||
public DifferencingCounter(InetAddress address)
|
||||
{
|
||||
this.meter = Metrics.newCounter(factory.createMetricName("Hints_not_stored-" + address.getHostAddress()));
|
||||
this.meter = Metrics.newCounter(factory.createMetricName("Hints_not_stored-" + address.getHostAddress().replace(':', '.')));
|
||||
}
|
||||
|
||||
public long difference()
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class StreamingMetrics
|
|||
|
||||
public StreamingMetrics(final InetAddress peer)
|
||||
{
|
||||
MetricNameFactory factory = new DefaultNameFactory("Streaming", peer.getHostAddress().replaceAll(":", "."));
|
||||
MetricNameFactory factory = new DefaultNameFactory("Streaming", peer.getHostAddress().replace(':', '.'));
|
||||
incomingBytes = Metrics.newCounter(factory.createMetricName("IncomingBytes"));
|
||||
outgoingBytes= Metrics.newCounter(factory.createMetricName("OutgoingBytes"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue