From 610e50f4033caefbcff414661ff5123a716f0940 Mon Sep 17 00:00:00 2001 From: Soufin Rahimeen Date: Fri, 20 Oct 2023 13:31:15 -0700 Subject: [PATCH 1/3] Upgrade kafka version to 3.3.2 --- pom.xml | 25 +++++++++++++------ .../mirus/metrics/ConnectorJmxReporter.java | 6 ++--- .../mirus/metrics/TaskJmxReporter.java | 4 +-- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index b2f3ceb..7ad48d3 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.salesforce.mirus mirus - 0.6.10-SNAPSHOT + 0.6.12-SNAPSHOT Mirus Apache Kafka data replication tool based on Kafka Connect @@ -13,8 +13,9 @@ ${project.build.directory}/dist 2.14.0 11 - 2.6.2 + 3.3.2 UTF-8 + 2.0.9 @@ -57,6 +58,16 @@ + + org.eclipse.jetty + io + 8.1.10.v20130312 + + + org.slf4j + slf4j-reload4j + ${slf4j.version} + junit junit @@ -285,7 +296,7 @@ - + @@ -385,7 +396,7 @@ - + @@ -398,7 +409,7 @@ - + @@ -452,10 +463,10 @@ package - + - + diff --git a/src/main/java/com/salesforce/mirus/metrics/ConnectorJmxReporter.java b/src/main/java/com/salesforce/mirus/metrics/ConnectorJmxReporter.java index 8706909..83fd58e 100644 --- a/src/main/java/com/salesforce/mirus/metrics/ConnectorJmxReporter.java +++ b/src/main/java/com/salesforce/mirus/metrics/ConnectorJmxReporter.java @@ -17,7 +17,7 @@ import java.util.stream.Collectors; import org.apache.kafka.common.MetricName; import org.apache.kafka.common.metrics.Metrics; -import org.apache.kafka.common.metrics.stats.Total; +import org.apache.kafka.common.metrics.stats.CumulativeSum; import org.apache.kafka.common.metrics.stats.Value; import org.apache.kafka.common.utils.Time; import org.apache.kafka.connect.runtime.Herder; @@ -165,13 +165,13 @@ private void ensureMetricsCreated(String connectorName) { if (!metrics.metrics().containsKey(totalAttemptsPerConnectorMetric)) { metrics .sensor(FAILED_TASK_ATTEMPTS_METRIC_NAME + connectorName) - .add(totalAttemptsPerConnectorMetric, new Total()); + .add(totalAttemptsPerConnectorMetric, new CumulativeSum()); } if (!metrics.metrics().containsKey(restartAttemptsPerConnectorMetric)) { metrics .sensor(FAILED_CONNECTOR_ATTEMPTS_METRIC_NAME + connectorName) - .add(restartAttemptsPerConnectorMetric, new Total()); + .add(restartAttemptsPerConnectorMetric, new CumulativeSum()); } } diff --git a/src/main/java/com/salesforce/mirus/metrics/TaskJmxReporter.java b/src/main/java/com/salesforce/mirus/metrics/TaskJmxReporter.java index 5950235..e061fd6 100644 --- a/src/main/java/com/salesforce/mirus/metrics/TaskJmxReporter.java +++ b/src/main/java/com/salesforce/mirus/metrics/TaskJmxReporter.java @@ -15,7 +15,7 @@ import org.apache.kafka.common.MetricName; import org.apache.kafka.common.metrics.Metrics; import org.apache.kafka.common.metrics.Sensor; -import org.apache.kafka.common.metrics.stats.Total; +import org.apache.kafka.common.metrics.stats.CumulativeSum; import org.apache.kafka.common.utils.Time; import org.apache.kafka.connect.runtime.TaskStatus; import org.apache.kafka.connect.runtime.rest.entities.ConnectorStateInfo.TaskState; @@ -64,7 +64,7 @@ private void ensureMetricsCreated(ConnectorTaskId taskId) { if (!metrics.metrics().containsKey(taskMetric)) { Sensor sensor = getSensor(taskId.toString()); - sensor.add(taskMetric, new Total()); + sensor.add(taskMetric, new CumulativeSum()); logger.info("Added the task {} to the list of JMX metrics", taskId); logger.debug("Updated set of JMX metrics is {}", metrics.metrics()); } From cd7a9597f3f7190dbffa8b44c36d4515da5a77e6 Mon Sep 17 00:00:00 2001 From: Soufin Rahimeen Date: Mon, 23 Oct 2023 09:49:36 -0700 Subject: [PATCH 2/3] change jetty artifact --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 7ad48d3..a78508d 100644 --- a/pom.xml +++ b/pom.xml @@ -60,8 +60,8 @@ org.eclipse.jetty - io - 8.1.10.v20130312 + jetty-io + 12.0.2 org.slf4j From 7511b487c0eeac2c585e492886fb42342c22c512 Mon Sep 17 00:00:00 2001 From: Soufin Rahimeen Date: Mon, 23 Oct 2023 09:52:28 -0700 Subject: [PATCH 3/3] fix jetty version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a78508d..901d4fd 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ org.eclipse.jetty jetty-io - 12.0.2 + 11.0.17 org.slf4j