diff --git a/data-node/src/main/java/org/graylog/datanode/metrics/ClusterStatMetrics.java b/data-node/src/main/java/org/graylog/datanode/metrics/ClusterStatMetrics.java index 3788507d5205..0ee8e633cf8f 100644 --- a/data-node/src/main/java/org/graylog/datanode/metrics/ClusterStatMetrics.java +++ b/data-node/src/main/java/org/graylog/datanode/metrics/ClusterStatMetrics.java @@ -16,7 +16,7 @@ */ package org.graylog.datanode.metrics; -import org.graylog.storage.opensearch2.ism.policy.actions.RollupAction; +import org.graylog2.indexer.datastream.policy.actions.RollupAction; import java.util.Locale; diff --git a/data-node/src/main/java/org/graylog/datanode/metrics/ConfigureMetricsIndexSettings.java b/data-node/src/main/java/org/graylog/datanode/metrics/ConfigureMetricsIndexSettings.java index 720259e92407..406179293f55 100644 --- a/data-node/src/main/java/org/graylog/datanode/metrics/ConfigureMetricsIndexSettings.java +++ b/data-node/src/main/java/org/graylog/datanode/metrics/ConfigureMetricsIndexSettings.java @@ -28,14 +28,14 @@ import org.graylog.datanode.process.StateMachineTracer; import org.graylog.storage.opensearch2.DataStreamAdapterOS2; import org.graylog.storage.opensearch2.ism.IsmApi; -import org.graylog.storage.opensearch2.ism.policy.IsmPolicy; -import org.graylog.storage.opensearch2.ism.policy.Policy; -import org.graylog.storage.opensearch2.ism.policy.actions.Action; -import org.graylog.storage.opensearch2.ism.policy.actions.DeleteAction; -import org.graylog.storage.opensearch2.ism.policy.actions.RolloverAction; -import org.graylog.storage.opensearch2.ism.policy.actions.RollupAction; import org.graylog2.indexer.datastream.DataStreamService; import org.graylog2.indexer.datastream.DataStreamServiceImpl; +import org.graylog2.indexer.datastream.policy.IsmPolicy; +import org.graylog2.indexer.datastream.policy.Policy; +import org.graylog2.indexer.datastream.policy.actions.Action; +import org.graylog2.indexer.datastream.policy.actions.DeleteAction; +import org.graylog2.indexer.datastream.policy.actions.RolloverAction; +import org.graylog2.indexer.datastream.policy.actions.RollupAction; import org.graylog2.indexer.fieldtypes.IndexFieldTypesService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/data-node/src/main/java/org/graylog/datanode/metrics/NodeStatMetrics.java b/data-node/src/main/java/org/graylog/datanode/metrics/NodeStatMetrics.java index 9a880611a360..4abc6d3f65e0 100644 --- a/data-node/src/main/java/org/graylog/datanode/metrics/NodeStatMetrics.java +++ b/data-node/src/main/java/org/graylog/datanode/metrics/NodeStatMetrics.java @@ -16,7 +16,7 @@ */ package org.graylog.datanode.metrics; -import org.graylog.storage.opensearch2.ism.policy.actions.RollupAction; +import org.graylog2.indexer.datastream.policy.actions.RollupAction; import java.util.Locale; import java.util.Objects; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/DataStreamAdapterOS2.java b/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/DataStreamAdapterOS2.java index 1c46f8e2ed07..dbead78befdd 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/DataStreamAdapterOS2.java +++ b/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/DataStreamAdapterOS2.java @@ -17,6 +17,7 @@ package org.graylog.storage.opensearch2; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.inject.Inject; import org.graylog.shaded.opensearch2.org.opensearch.action.support.master.AcknowledgedResponse; import org.graylog.shaded.opensearch2.org.opensearch.client.indices.CreateDataStreamRequest; import org.graylog.shaded.opensearch2.org.opensearch.client.indices.DeleteComposableIndexTemplateRequest; @@ -28,16 +29,15 @@ import org.graylog.shaded.opensearch2.org.opensearch.cluster.metadata.DataStream; import org.graylog.shaded.opensearch2.org.opensearch.common.compress.CompressedXContent; import org.graylog.storage.opensearch2.ism.IsmApi; -import org.graylog.storage.opensearch2.ism.policy.IsmPolicy; import org.graylog2.indexer.IndexNotFoundException; import org.graylog2.indexer.datastream.DataStreamAdapter; import org.graylog2.indexer.datastream.Policy; +import org.graylog2.indexer.datastream.policy.IsmPolicy; import org.graylog2.indexer.indices.Template; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Nonnull; -import jakarta.inject.Inject; import java.io.IOException; import java.util.List; import java.util.Objects; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/IsmApi.java b/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/IsmApi.java index fd4ef2c8979b..9b286ac05581 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/IsmApi.java +++ b/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/IsmApi.java @@ -25,7 +25,7 @@ import org.graylog.shaded.opensearch2.org.opensearch.client.Response; import org.graylog.shaded.opensearch2.org.opensearch.client.ResponseException; import org.graylog.storage.opensearch2.OpenSearchClient; -import org.graylog.storage.opensearch2.ism.policy.IsmPolicy; +import org.graylog2.indexer.datastream.policy.IsmPolicy; import java.io.IOException; import java.util.Objects; diff --git a/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/DataStreamAdapterOS2IT.java b/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/DataStreamAdapterOS2IT.java index 868125a3ac58..d633702a2951 100644 --- a/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/DataStreamAdapterOS2IT.java +++ b/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/DataStreamAdapterOS2IT.java @@ -19,9 +19,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import org.graylog.shaded.opensearch2.org.opensearch.client.indices.DataStream; import org.graylog.storage.opensearch2.ism.IsmApi; -import org.graylog.storage.opensearch2.ism.policy.IsmPolicy; -import org.graylog.storage.opensearch2.ism.policy.IsmPolicyTest; import org.graylog.storage.opensearch2.testing.OpenSearchInstance; +import org.graylog2.indexer.datastream.policy.IsmPolicy; +import org.graylog2.indexer.datastream.policy.IsmPolicyTest; import org.graylog2.indexer.indices.Template; import org.graylog2.shared.bindings.providers.ObjectMapperProvider; import org.junit.Rule; diff --git a/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/ism/IsmApiIT.java b/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/ism/IsmApiIT.java index b06ca8d74ea4..6764931a478e 100644 --- a/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/ism/IsmApiIT.java +++ b/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/ism/IsmApiIT.java @@ -16,9 +16,9 @@ */ package org.graylog.storage.opensearch2.ism; -import org.graylog.storage.opensearch2.ism.policy.IsmPolicy; -import org.graylog.storage.opensearch2.ism.policy.IsmPolicyTest; import org.graylog.storage.opensearch2.testing.OpenSearchInstance; +import org.graylog2.indexer.datastream.policy.IsmPolicy; +import org.graylog2.indexer.datastream.policy.IsmPolicyTest; import org.graylog2.shared.bindings.providers.ObjectMapperProvider; import org.junit.Rule; import org.junit.Test; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/IsmPolicy.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/IsmPolicy.java similarity index 96% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/IsmPolicy.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/IsmPolicy.java index 7025cbd49d55..94de8b9dc2c2 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/IsmPolicy.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/IsmPolicy.java @@ -14,7 +14,7 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy; +package org.graylog2.indexer.datastream.policy; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/Policy.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/Policy.java similarity index 93% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/Policy.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/Policy.java index 0ebc2af4af6c..d8a88fee0502 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/Policy.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/Policy.java @@ -14,11 +14,11 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy; +package org.graylog2.indexer.datastream.policy; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import org.graylog.storage.opensearch2.ism.policy.actions.Action; +import org.graylog2.indexer.datastream.policy.actions.Action; import javax.annotation.Nonnull; import javax.annotation.Nullable; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/Action.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/Action.java similarity index 94% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/Action.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/Action.java index 2b5478aee874..121d35b1826c 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/Action.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/Action.java @@ -14,7 +14,7 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy.actions; +package org.graylog2.indexer.datastream.policy.actions; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/ActionDeserializer.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/ActionDeserializer.java similarity index 97% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/ActionDeserializer.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/ActionDeserializer.java index 578ee7014151..5e508c8a708d 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/ActionDeserializer.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/ActionDeserializer.java @@ -14,7 +14,7 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy.actions; +package org.graylog2.indexer.datastream.policy.actions; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/ActionSerializer.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/ActionSerializer.java similarity index 96% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/ActionSerializer.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/ActionSerializer.java index dc383306487c..7a863ae8724b 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/ActionSerializer.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/ActionSerializer.java @@ -14,7 +14,7 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy.actions; +package org.graylog2.indexer.datastream.policy.actions; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/DeleteAction.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/DeleteAction.java similarity index 92% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/DeleteAction.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/DeleteAction.java index ef82e5f3db3c..e59b2041683d 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/DeleteAction.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/DeleteAction.java @@ -14,7 +14,7 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy.actions; +package org.graylog2.indexer.datastream.policy.actions; public record DeleteAction() implements WrappedAction { diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/Retry.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/Retry.java similarity index 92% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/Retry.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/Retry.java index ad0c0e475006..a1f2d52c89a5 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/Retry.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/Retry.java @@ -14,7 +14,7 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy.actions; +package org.graylog2.indexer.datastream.policy.actions; public record Retry(int count, String backoff, String delay) { } diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/RolloverAction.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/RolloverAction.java similarity index 94% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/RolloverAction.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/RolloverAction.java index 426c150033f2..944a6ed57f7b 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/RolloverAction.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/RolloverAction.java @@ -14,7 +14,7 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy.actions; +package org.graylog2.indexer.datastream.policy.actions; import javax.annotation.Nonnull; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/RollupAction.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/RollupAction.java similarity index 97% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/RollupAction.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/RollupAction.java index 1338c73b7803..6e0d77fb9c57 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/RollupAction.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/RollupAction.java @@ -14,7 +14,7 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy.actions; +package org.graylog2.indexer.datastream.policy.actions; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; diff --git a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/WrappedAction.java b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/WrappedAction.java similarity index 95% rename from graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/WrappedAction.java rename to graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/WrappedAction.java index 02e935251022..4e86e28cf1ac 100644 --- a/graylog-storage-opensearch2/src/main/java/org/graylog/storage/opensearch2/ism/policy/actions/WrappedAction.java +++ b/graylog2-server/src/main/java/org/graylog2/indexer/datastream/policy/actions/WrappedAction.java @@ -14,7 +14,7 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy.actions; +package org.graylog2.indexer.datastream.policy.actions; import com.fasterxml.jackson.annotation.JsonIgnore; diff --git a/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/ism/policy/IsmPolicyTest.java b/graylog2-server/src/test/java/org/graylog2/indexer/datastream/policy/IsmPolicyTest.java similarity index 93% rename from graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/ism/policy/IsmPolicyTest.java rename to graylog2-server/src/test/java/org/graylog2/indexer/datastream/policy/IsmPolicyTest.java index 96228e46c382..5bc13093c6ce 100644 --- a/graylog-storage-opensearch2/src/test/java/org/graylog/storage/opensearch2/ism/policy/IsmPolicyTest.java +++ b/graylog2-server/src/test/java/org/graylog2/indexer/datastream/policy/IsmPolicyTest.java @@ -14,14 +14,14 @@ * along with this program. If not, see * . */ -package org.graylog.storage.opensearch2.ism.policy; +package org.graylog2.indexer.datastream.policy; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; -import org.graylog.storage.opensearch2.ism.policy.actions.Action; -import org.graylog.storage.opensearch2.ism.policy.actions.DeleteAction; -import org.graylog.storage.opensearch2.ism.policy.actions.Retry; +import org.graylog2.indexer.datastream.policy.actions.Action; +import org.graylog2.indexer.datastream.policy.actions.DeleteAction; +import org.graylog2.indexer.datastream.policy.actions.Retry; import org.graylog2.shared.bindings.providers.ObjectMapperProvider; import org.junit.Test;