From 5fd085d73fa7516236bce9432b94893aceabd8d6 Mon Sep 17 00:00:00 2001 From: itskarlsson Date: Fri, 15 Sep 2023 13:28:53 +0200 Subject: [PATCH] Make work for 4.0 --- .../zegelin/cassandra/exporter/InternalMetadataFactory.java | 2 +- .../collector/InternalGossiperMBeanMetricFamilyCollector.java | 3 +-- pom.xml | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/agent/src/main/java/com/zegelin/cassandra/exporter/InternalMetadataFactory.java b/agent/src/main/java/com/zegelin/cassandra/exporter/InternalMetadataFactory.java index ceb4094..93a95e7 100644 --- a/agent/src/main/java/com/zegelin/cassandra/exporter/InternalMetadataFactory.java +++ b/agent/src/main/java/com/zegelin/cassandra/exporter/InternalMetadataFactory.java @@ -88,6 +88,6 @@ public String clusterName() { @Override public InetAddress localBroadcastAddress() { - return FBUtilities.getBroadcastAddressAndPort().getAddress(); + return FBUtilities.getBroadcastAddressAndPort().address; } } diff --git a/agent/src/main/java/com/zegelin/cassandra/exporter/collector/InternalGossiperMBeanMetricFamilyCollector.java b/agent/src/main/java/com/zegelin/cassandra/exporter/collector/InternalGossiperMBeanMetricFamilyCollector.java index 9b378a6..48bb165 100644 --- a/agent/src/main/java/com/zegelin/cassandra/exporter/collector/InternalGossiperMBeanMetricFamilyCollector.java +++ b/agent/src/main/java/com/zegelin/cassandra/exporter/collector/InternalGossiperMBeanMetricFamilyCollector.java @@ -37,10 +37,9 @@ private InternalGossiperMBeanMetricFamilyCollector(final Gossiper gossiper, fina @Override protected void collect(final Stream.Builder generationNumberMetrics, final Stream.Builder downtimeMetrics, final Stream.Builder activeMetrics) { for (InetAddressAndPort endpoint : gossiper.getEndpoints()) { - final InetAddress endpointAddress = endpoint.getAddress(); final EndpointState state = gossiper.getEndpointStateForEndpoint(endpoint); - final Labels labels = metadataFactory.endpointLabels(endpointAddress); + final Labels labels = metadataFactory.endpointLabels(endpoint.address); generationNumberMetrics.add(new NumericMetric(labels, gossiper.getCurrentGenerationNumber(endpoint))); downtimeMetrics.add(new NumericMetric(labels, millisecondsToSeconds(gossiper.getEndpointDowntime(endpoint)))); diff --git a/pom.xml b/pom.xml index 584aaa0..4c313c9 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,7 @@ - 4.1.0 + 4.0.11 2.5.3 3.1.1