From a2dc663f0271ccfad338ae876a3317fceb707d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Vl=C4=8Dek?= Date: Wed, 27 Sep 2023 15:48:03 +0200 Subject: [PATCH] Upgrade to OpenSearch 2.10.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lukáš Vlček --- gradle.properties | 2 +- .../metrics/prometheus/PrometheusMetricsCollector.java | 4 ++-- src/main/java/org/opensearch/action/ClusterStatsData.java | 5 +++-- .../org/opensearch/action/NodePrometheusMetricsRequest.java | 2 +- .../org/opensearch/action/NodePrometheusMetricsResponse.java | 5 +++-- .../action/TransportNodePrometheusMetricsAction.java | 1 + .../action/admin/indices/stats/PackageAccessHelper.java | 2 +- .../plugin/prometheus/PrometheusExporterPlugin.java | 2 +- .../rest/prometheus/RestPrometheusMetricsAction.java | 1 + 9 files changed, 14 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2265ddd..fe1ab84 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ #group = org.opensearch.plugin.prometheus -version = 2.9.0.0 +version = 2.10.0.0 pluginName = prometheus-exporter pluginClassname = org.opensearch.plugin.prometheus.PrometheusExporterPlugin diff --git a/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java b/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java index 9c14d54..a5adbc7 100644 --- a/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java +++ b/src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java @@ -29,8 +29,8 @@ import org.opensearch.common.collect.Tuple; import org.opensearch.http.HttpStats; import org.opensearch.indices.NodeIndicesStats; -import org.opensearch.indices.breaker.AllCircuitBreakerStats; -import org.opensearch.indices.breaker.CircuitBreakerStats; +import org.opensearch.core.indices.breaker.AllCircuitBreakerStats; +import org.opensearch.core.indices.breaker.CircuitBreakerStats; import org.opensearch.ingest.IngestStats; import org.opensearch.monitor.fs.FsInfo; import org.opensearch.monitor.jvm.JvmStats; diff --git a/src/main/java/org/opensearch/action/ClusterStatsData.java b/src/main/java/org/opensearch/action/ClusterStatsData.java index cbc042f..4f3328e 100644 --- a/src/main/java/org/opensearch/action/ClusterStatsData.java +++ b/src/main/java/org/opensearch/action/ClusterStatsData.java @@ -22,8 +22,9 @@ import org.opensearch.action.admin.cluster.state.ClusterStateResponse; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.common.Nullable; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.action.ActionResponse; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.SettingsException; diff --git a/src/main/java/org/opensearch/action/NodePrometheusMetricsRequest.java b/src/main/java/org/opensearch/action/NodePrometheusMetricsRequest.java index 6f8ac16..9feef4d 100644 --- a/src/main/java/org/opensearch/action/NodePrometheusMetricsRequest.java +++ b/src/main/java/org/opensearch/action/NodePrometheusMetricsRequest.java @@ -18,7 +18,7 @@ package org.opensearch.action; import org.opensearch.action.support.clustermanager.ClusterManagerNodeReadRequest; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import java.io.IOException; diff --git a/src/main/java/org/opensearch/action/NodePrometheusMetricsResponse.java b/src/main/java/org/opensearch/action/NodePrometheusMetricsResponse.java index de6852a..d84de13 100644 --- a/src/main/java/org/opensearch/action/NodePrometheusMetricsResponse.java +++ b/src/main/java/org/opensearch/action/NodePrometheusMetricsResponse.java @@ -24,8 +24,9 @@ import org.opensearch.action.admin.indices.stats.IndicesStatsResponse; import org.opensearch.action.admin.indices.stats.PackageAccessHelper; import org.opensearch.common.Nullable; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.action.ActionResponse; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; diff --git a/src/main/java/org/opensearch/action/TransportNodePrometheusMetricsAction.java b/src/main/java/org/opensearch/action/TransportNodePrometheusMetricsAction.java index dc23458..3f07b65 100644 --- a/src/main/java/org/opensearch/action/TransportNodePrometheusMetricsAction.java +++ b/src/main/java/org/opensearch/action/TransportNodePrometheusMetricsAction.java @@ -40,6 +40,7 @@ import org.opensearch.common.inject.Inject; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.tasks.Task; import org.opensearch.transport.TransportService; diff --git a/src/main/java/org/opensearch/action/admin/indices/stats/PackageAccessHelper.java b/src/main/java/org/opensearch/action/admin/indices/stats/PackageAccessHelper.java index 8edb16a..8dfbb40 100644 --- a/src/main/java/org/opensearch/action/admin/indices/stats/PackageAccessHelper.java +++ b/src/main/java/org/opensearch/action/admin/indices/stats/PackageAccessHelper.java @@ -16,7 +16,7 @@ */ package org.opensearch.action.admin.indices.stats; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import java.io.IOException; diff --git a/src/main/java/org/opensearch/plugin/prometheus/PrometheusExporterPlugin.java b/src/main/java/org/opensearch/plugin/prometheus/PrometheusExporterPlugin.java index 5c62f71..a05c8e0 100644 --- a/src/main/java/org/opensearch/plugin/prometheus/PrometheusExporterPlugin.java +++ b/src/main/java/org/opensearch/plugin/prometheus/PrometheusExporterPlugin.java @@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger; import org.compuscene.metrics.prometheus.PrometheusSettings; import org.opensearch.action.ActionRequest; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.NodePrometheusMetricsAction; import org.opensearch.action.TransportNodePrometheusMetricsAction; import org.opensearch.cluster.metadata.IndexNameExpressionResolver; diff --git a/src/main/java/org/opensearch/rest/prometheus/RestPrometheusMetricsAction.java b/src/main/java/org/opensearch/rest/prometheus/RestPrometheusMetricsAction.java index 55247de..ed5c9fd 100644 --- a/src/main/java/org/opensearch/rest/prometheus/RestPrometheusMetricsAction.java +++ b/src/main/java/org/opensearch/rest/prometheus/RestPrometheusMetricsAction.java @@ -32,6 +32,7 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Setting; import org.opensearch.common.settings.Settings; +import org.opensearch.core.rest.RestStatus; import org.opensearch.rest.*; import org.opensearch.rest.action.RestResponseListener;