From 98b62183c878cc0334453ebc6947cb9424991658 Mon Sep 17 00:00:00 2001 From: Navneet Verma Date: Thu, 13 Jul 2023 09:07:12 -0700 Subject: [PATCH] Fixing main branch build due to backward incompatible changes added in OpenSearch core via PR: https://github.com/opensearch-project/OpenSearch/pull/8157 (#981) --- .../src/test/java/org/opensearch/knn/bwc/ModelIT.java | 2 +- .../test/java/org/opensearch/knn/bwc/ScriptScoringIT.java | 2 +- .../exception/DeleteModelWhenInTrainStateException.java | 2 +- .../java/org/opensearch/knn/index/KNNMethodContext.java | 6 +++--- .../org/opensearch/knn/index/MethodComponentContext.java | 6 +++--- .../org/opensearch/knn/index/query/KNNQueryBuilder.java | 6 +++--- src/main/java/org/opensearch/knn/indices/Model.java | 6 +++--- .../java/org/opensearch/knn/indices/ModelGraveyard.java | 4 ++-- .../java/org/opensearch/knn/indices/ModelMetadata.java | 6 +++--- src/main/java/org/opensearch/knn/indices/ModelState.java | 6 +++--- src/main/java/org/opensearch/knn/plugin/KNNPlugin.java | 2 +- .../opensearch/knn/plugin/rest/RestKNNWarmupHandler.java | 2 +- .../opensearch/knn/plugin/rest/RestTrainModelHandler.java | 2 +- .../knn/plugin/transport/DeleteModelAction.java | 2 +- .../knn/plugin/transport/DeleteModelRequest.java | 4 ++-- .../knn/plugin/transport/DeleteModelResponse.java | 4 ++-- .../opensearch/knn/plugin/transport/GetModelAction.java | 2 +- .../opensearch/knn/plugin/transport/GetModelRequest.java | 4 ++-- .../opensearch/knn/plugin/transport/GetModelResponse.java | 4 ++-- .../opensearch/knn/plugin/transport/KNNStatsAction.java | 2 +- .../knn/plugin/transport/KNNStatsNodeRequest.java | 4 ++-- .../knn/plugin/transport/KNNStatsNodeResponse.java | 4 ++-- .../opensearch/knn/plugin/transport/KNNStatsRequest.java | 4 ++-- .../opensearch/knn/plugin/transport/KNNStatsResponse.java | 4 ++-- .../knn/plugin/transport/KNNStatsTransportAction.java | 2 +- .../opensearch/knn/plugin/transport/KNNWarmupAction.java | 2 +- .../opensearch/knn/plugin/transport/KNNWarmupRequest.java | 2 +- .../knn/plugin/transport/KNNWarmupResponse.java | 4 ++-- .../knn/plugin/transport/KNNWarmupTransportAction.java | 4 ++-- .../knn/plugin/transport/RemoveModelFromCacheAction.java | 2 +- .../plugin/transport/RemoveModelFromCacheNodeRequest.java | 4 ++-- .../transport/RemoveModelFromCacheNodeResponse.java | 2 +- .../knn/plugin/transport/RemoveModelFromCacheRequest.java | 4 ++-- .../plugin/transport/RemoveModelFromCacheResponse.java | 4 ++-- .../transport/RemoveModelFromCacheTransportAction.java | 2 +- .../knn/plugin/transport/SearchModelAction.java | 2 +- .../transport/TrainingJobRouteDecisionInfoAction.java | 2 +- .../TrainingJobRouteDecisionInfoNodeRequest.java | 2 +- .../TrainingJobRouteDecisionInfoNodeResponse.java | 4 ++-- .../transport/TrainingJobRouteDecisionInfoRequest.java | 2 +- .../transport/TrainingJobRouteDecisionInfoResponse.java | 4 ++-- .../TrainingJobRouteDecisionInfoTransportAction.java | 2 +- .../knn/plugin/transport/TrainingJobRouterAction.java | 2 +- .../knn/plugin/transport/TrainingModelAction.java | 2 +- .../knn/plugin/transport/TrainingModelRequest.java | 4 ++-- .../knn/plugin/transport/TrainingModelResponse.java | 4 ++-- .../knn/plugin/transport/UpdateModelGraveyardAction.java | 2 +- .../knn/plugin/transport/UpdateModelGraveyardRequest.java | 4 ++-- .../transport/UpdateModelGraveyardTransportAction.java | 2 +- .../knn/plugin/transport/UpdateModelMetadataAction.java | 2 +- .../knn/plugin/transport/UpdateModelMetadataRequest.java | 4 ++-- .../transport/UpdateModelMetadataTransportAction.java | 2 +- .../java/org/opensearch/knn/KNNSingleNodeTestCase.java | 4 ++-- src/test/java/org/opensearch/knn/KNNTestCase.java | 2 +- .../org/opensearch/knn/index/KNNESSettingsTestIT.java | 2 +- src/test/java/org/opensearch/knn/index/OpenSearchIT.java | 2 +- .../java/org/opensearch/knn/index/VectorDataTypeIT.java | 2 +- .../opensearch/knn/index/codec/KNNCodecServiceTests.java | 2 +- .../opensearch/knn/index/query/KNNQueryBuilderTests.java | 8 ++++---- .../java/org/opensearch/knn/indices/ModelDaoTests.java | 2 +- .../knn/plugin/action/RestDeleteModelHandlerIT.java | 2 +- .../knn/plugin/action/RestGetModelHandlerIT.java | 2 +- .../knn/plugin/action/RestKNNStatsHandlerIT.java | 2 +- .../knn/plugin/action/RestLegacyKNNStatsHandlerIT.java | 2 +- .../knn/plugin/action/RestSearchModelHandlerIT.java | 2 +- .../knn/plugin/action/RestTrainModelHandlerIT.java | 2 +- .../opensearch/knn/plugin/script/KNNScriptScoringIT.java | 2 +- .../opensearch/knn/plugin/script/PainlessScriptIT.java | 2 +- .../plugin/transport/KNNWarmupTransportActionTests.java | 2 +- .../TrainingJobRouteDecisionInfoTransportActionTests.java | 2 +- .../opensearch/knn/training/TrainingJobRunnerTests.java | 2 +- .../java/org/opensearch/knn/KNNRestTestCase.java | 4 ++-- .../java/org/opensearch/knn/ODFERestTestCase.java | 2 +- 73 files changed, 110 insertions(+), 110 deletions(-) diff --git a/qa/restart-upgrade/src/test/java/org/opensearch/knn/bwc/ModelIT.java b/qa/restart-upgrade/src/test/java/org/opensearch/knn/bwc/ModelIT.java index 9adcb2504..0e129f5ad 100644 --- a/qa/restart-upgrade/src/test/java/org/opensearch/knn/bwc/ModelIT.java +++ b/qa/restart-upgrade/src/test/java/org/opensearch/knn/bwc/ModelIT.java @@ -21,7 +21,7 @@ import org.opensearch.knn.indices.ModelMetadata; import org.opensearch.knn.indices.ModelState; import org.opensearch.knn.plugin.KNNPlugin; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import org.opensearch.search.SearchHit; import java.io.IOException; diff --git a/qa/restart-upgrade/src/test/java/org/opensearch/knn/bwc/ScriptScoringIT.java b/qa/restart-upgrade/src/test/java/org/opensearch/knn/bwc/ScriptScoringIT.java index 1771d38ee..2ee1a32f9 100644 --- a/qa/restart-upgrade/src/test/java/org/opensearch/knn/bwc/ScriptScoringIT.java +++ b/qa/restart-upgrade/src/test/java/org/opensearch/knn/bwc/ScriptScoringIT.java @@ -13,7 +13,7 @@ import org.opensearch.knn.IDVectorProducer; import org.opensearch.knn.KNNResult; import org.opensearch.knn.index.SpaceType; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.util.HashMap; import java.util.List; diff --git a/src/main/java/org/opensearch/knn/common/exception/DeleteModelWhenInTrainStateException.java b/src/main/java/org/opensearch/knn/common/exception/DeleteModelWhenInTrainStateException.java index fba20bd17..00f6e6e80 100644 --- a/src/main/java/org/opensearch/knn/common/exception/DeleteModelWhenInTrainStateException.java +++ b/src/main/java/org/opensearch/knn/common/exception/DeleteModelWhenInTrainStateException.java @@ -7,7 +7,7 @@ import org.opensearch.OpenSearchException; import org.opensearch.core.common.logging.LoggerMessageFormat; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; /** * Exception thrown when a model is deleted while it is in the training state. The RestStatus associated with this diff --git a/src/main/java/org/opensearch/knn/index/KNNMethodContext.java b/src/main/java/org/opensearch/knn/index/KNNMethodContext.java index db97df6aa..5f5a0f232 100644 --- a/src/main/java/org/opensearch/knn/index/KNNMethodContext.java +++ b/src/main/java/org/opensearch/knn/index/KNNMethodContext.java @@ -15,9 +15,9 @@ import lombok.Getter; import lombok.NonNull; import org.opensearch.common.ValidationException; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.Writeable; import org.opensearch.knn.index.util.KNNEngine; import org.opensearch.core.xcontent.ToXContentFragment; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/src/main/java/org/opensearch/knn/index/MethodComponentContext.java b/src/main/java/org/opensearch/knn/index/MethodComponentContext.java index 756d463d9..cf10e9a64 100644 --- a/src/main/java/org/opensearch/knn/index/MethodComponentContext.java +++ b/src/main/java/org/opensearch/knn/index/MethodComponentContext.java @@ -13,9 +13,9 @@ import lombok.AllArgsConstructor; import lombok.Getter; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.Writeable; import org.opensearch.core.xcontent.ToXContentFragment; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.index.mapper.MapperParsingException; diff --git a/src/main/java/org/opensearch/knn/index/query/KNNQueryBuilder.java b/src/main/java/org/opensearch/knn/index/query/KNNQueryBuilder.java index 466b4c345..88c5c30f1 100644 --- a/src/main/java/org/opensearch/knn/index/query/KNNQueryBuilder.java +++ b/src/main/java/org/opensearch/knn/index/query/KNNQueryBuilder.java @@ -18,9 +18,9 @@ import org.opensearch.knn.plugin.stats.KNNCounter; import org.apache.lucene.search.Query; import org.opensearch.core.ParseField; -import org.opensearch.common.ParsingException; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.ParsingException; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.index.mapper.MappedFieldType; diff --git a/src/main/java/org/opensearch/knn/indices/Model.java b/src/main/java/org/opensearch/knn/indices/Model.java index c0071ad94..5007650dd 100644 --- a/src/main/java/org/opensearch/knn/indices/Model.java +++ b/src/main/java/org/opensearch/knn/indices/Model.java @@ -12,9 +12,9 @@ package org.opensearch.knn.indices; import org.opensearch.common.Nullable; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.Writeable; import org.opensearch.core.xcontent.ToXContentObject; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.knn.common.KNNConstants; diff --git a/src/main/java/org/opensearch/knn/indices/ModelGraveyard.java b/src/main/java/org/opensearch/knn/indices/ModelGraveyard.java index e7e11e66f..ead95cf9a 100644 --- a/src/main/java/org/opensearch/knn/indices/ModelGraveyard.java +++ b/src/main/java/org/opensearch/knn/indices/ModelGraveyard.java @@ -12,8 +12,8 @@ import org.opensearch.cluster.Diff; import org.opensearch.cluster.NamedDiff; import org.opensearch.cluster.metadata.Metadata; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.core.xcontent.XContentParser; diff --git a/src/main/java/org/opensearch/knn/indices/ModelMetadata.java b/src/main/java/org/opensearch/knn/indices/ModelMetadata.java index 88994cf52..0d0c79bc3 100644 --- a/src/main/java/org/opensearch/knn/indices/ModelMetadata.java +++ b/src/main/java/org/opensearch/knn/indices/ModelMetadata.java @@ -13,9 +13,9 @@ import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.Writeable; import org.opensearch.core.xcontent.ToXContentObject; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.knn.common.KNNConstants; diff --git a/src/main/java/org/opensearch/knn/indices/ModelState.java b/src/main/java/org/opensearch/knn/indices/ModelState.java index d78ae06bc..35def5335 100644 --- a/src/main/java/org/opensearch/knn/indices/ModelState.java +++ b/src/main/java/org/opensearch/knn/indices/ModelState.java @@ -11,9 +11,9 @@ package org.opensearch.knn.indices; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.Writeable; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/KNNPlugin.java b/src/main/java/org/opensearch/knn/plugin/KNNPlugin.java index bf89644cb..54011c259 100644 --- a/src/main/java/org/opensearch/knn/plugin/KNNPlugin.java +++ b/src/main/java/org/opensearch/knn/plugin/KNNPlugin.java @@ -48,7 +48,7 @@ import org.opensearch.cluster.metadata.IndexNameExpressionResolver; import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.service.ClusterService; -import org.opensearch.common.io.stream.NamedWriteableRegistry; +import org.opensearch.core.common.io.stream.NamedWriteableRegistry; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.IndexScopedSettings; import org.opensearch.common.settings.Setting; diff --git a/src/main/java/org/opensearch/knn/plugin/rest/RestKNNWarmupHandler.java b/src/main/java/org/opensearch/knn/plugin/rest/RestKNNWarmupHandler.java index a31c2f297..42991af13 100644 --- a/src/main/java/org/opensearch/knn/plugin/rest/RestKNNWarmupHandler.java +++ b/src/main/java/org/opensearch/knn/plugin/rest/RestKNNWarmupHandler.java @@ -17,7 +17,7 @@ import org.opensearch.cluster.metadata.IndexNameExpressionResolver; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; -import org.opensearch.index.Index; +import org.opensearch.core.index.Index; import org.opensearch.rest.BaseRestHandler; import org.opensearch.rest.RestController; import org.opensearch.rest.RestRequest; diff --git a/src/main/java/org/opensearch/knn/plugin/rest/RestTrainModelHandler.java b/src/main/java/org/opensearch/knn/plugin/rest/RestTrainModelHandler.java index 67ce80959..a4a0de5de 100644 --- a/src/main/java/org/opensearch/knn/plugin/rest/RestTrainModelHandler.java +++ b/src/main/java/org/opensearch/knn/plugin/rest/RestTrainModelHandler.java @@ -27,7 +27,7 @@ import java.util.List; import java.util.Locale; -import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedToken; +import static org.opensearch.core.xcontent.XContentParserUtils.ensureExpectedToken; import static org.opensearch.knn.common.KNNConstants.DIMENSION; import static org.opensearch.knn.common.KNNConstants.KNN_METHOD; import static org.opensearch.knn.common.KNNConstants.MAX_VECTOR_COUNT_PARAMETER; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelAction.java b/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelAction.java index f58728368..33be3fde3 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelAction.java @@ -12,7 +12,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionType; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; public class DeleteModelAction extends ActionType { diff --git a/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelRequest.java index fee82adb5..dbc274160 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelRequest.java @@ -14,8 +14,8 @@ import org.apache.commons.lang.StringUtils; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestValidationException; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelResponse.java index 3f2cb90de..b4879d881 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/DeleteModelResponse.java @@ -12,8 +12,8 @@ import org.opensearch.action.ActionResponse; import org.opensearch.common.Nullable; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.ToXContentObject; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/GetModelAction.java b/src/main/java/org/opensearch/knn/plugin/transport/GetModelAction.java index 74b115830..18c792ec7 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/GetModelAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/GetModelAction.java @@ -12,7 +12,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionType; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; /** * GetModelAction class diff --git a/src/main/java/org/opensearch/knn/plugin/transport/GetModelRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/GetModelRequest.java index 08ba03e07..4c3d4de97 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/GetModelRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/GetModelRequest.java @@ -13,8 +13,8 @@ import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestValidationException; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/GetModelResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/GetModelResponse.java index c94c6769e..4df2b7f03 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/GetModelResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/GetModelResponse.java @@ -11,8 +11,8 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionResponse; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.ToXContentObject; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.knn.indices.Model; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsAction.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsAction.java index ccafb00d5..df7799d1f 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsAction.java @@ -6,7 +6,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionType; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; /** * KNNStatsAction class diff --git a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsNodeRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsNodeRequest.java index 0b859b3a4..52f6c4d16 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsNodeRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsNodeRequest.java @@ -5,8 +5,8 @@ package org.opensearch.knn.plugin.transport; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.transport.TransportRequest; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsNodeResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsNodeResponse.java index 1f1164bd8..14b78fed4 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsNodeResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsNodeResponse.java @@ -7,8 +7,8 @@ import org.opensearch.action.support.nodes.BaseNodeResponse; import org.opensearch.cluster.node.DiscoveryNode; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.ToXContentFragment; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsRequest.java index 26d8a9c5b..2e245e5a3 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsRequest.java @@ -6,8 +6,8 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.support.nodes.BaseNodesRequest; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.knn.plugin.stats.StatNames; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsResponse.java index f108e536e..ec8aa6f6e 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsResponse.java @@ -9,8 +9,8 @@ import org.opensearch.action.support.nodes.BaseNodesResponse; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.node.DiscoveryNode; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.ToXContentObject; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsTransportAction.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsTransportAction.java index 0189bf88d..7edc44894 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsTransportAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNStatsTransportAction.java @@ -12,7 +12,7 @@ import org.opensearch.action.support.nodes.TransportNodesAction; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.inject.Inject; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.transport.TransportService; import org.opensearch.threadpool.ThreadPool; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupAction.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupAction.java index 32fabe0c1..16b5c3a4d 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupAction.java @@ -6,7 +6,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionType; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; /** * Action associated with k-NN warmup diff --git a/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupRequest.java index 545f6fc47..30c7b52a0 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupRequest.java @@ -6,7 +6,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.support.broadcast.BroadcastRequest; -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/knn/plugin/transport/KNNWarmupResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupResponse.java index 842fdf630..d9e607db2 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupResponse.java @@ -5,9 +5,9 @@ package org.opensearch.knn.plugin.transport; -import org.opensearch.action.support.DefaultShardOperationFailedException; +import org.opensearch.core.action.support.DefaultShardOperationFailedException; import org.opensearch.action.support.broadcast.BroadcastResponse; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.xcontent.ToXContentObject; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupTransportAction.java b/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupTransportAction.java index 79c0315fd..a738527ff 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupTransportAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/KNNWarmupTransportAction.java @@ -9,7 +9,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.support.ActionFilters; -import org.opensearch.action.support.DefaultShardOperationFailedException; +import org.opensearch.core.action.support.DefaultShardOperationFailedException; import org.opensearch.action.support.broadcast.node.TransportBroadcastByNodeAction; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.block.ClusterBlockException; @@ -19,7 +19,7 @@ import org.opensearch.cluster.routing.ShardsIterator; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.inject.Inject; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.indices.IndicesService; import org.opensearch.transport.TransportService; import org.opensearch.threadpool.ThreadPool; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheAction.java b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheAction.java index c2ce43069..6a0e61684 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheAction.java @@ -12,7 +12,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionType; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; /** * Action used to remove a model from the cache on some or all nodes diff --git a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheNodeRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheNodeRequest.java index ecbe9df64..ec42de117 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheNodeRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheNodeRequest.java @@ -11,8 +11,8 @@ package org.opensearch.knn.plugin.transport; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.transport.TransportRequest; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheNodeResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheNodeResponse.java index 7e1be85d0..d8bf28d40 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheNodeResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheNodeResponse.java @@ -13,7 +13,7 @@ import org.opensearch.action.support.nodes.BaseNodeResponse; import org.opensearch.cluster.node.DiscoveryNode; -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/knn/plugin/transport/RemoveModelFromCacheRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheRequest.java index 5da60c809..3a31f7ada 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheRequest.java @@ -12,8 +12,8 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.support.nodes.BaseNodesRequest; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheResponse.java index 3293573ce..74a95bf69 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheResponse.java @@ -14,8 +14,8 @@ import org.opensearch.action.FailedNodeException; import org.opensearch.action.support.nodes.BaseNodesResponse; import org.opensearch.cluster.ClusterName; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import java.io.IOException; import java.util.List; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheTransportAction.java b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheTransportAction.java index 92938ed3c..042b870ea 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheTransportAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/RemoveModelFromCacheTransportAction.java @@ -18,7 +18,7 @@ import org.opensearch.action.support.nodes.TransportNodesAction; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.inject.Inject; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.knn.indices.ModelCache; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportService; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/SearchModelAction.java b/src/main/java/org/opensearch/knn/plugin/transport/SearchModelAction.java index 219e6d1e3..ff217fdbd 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/SearchModelAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/SearchModelAction.java @@ -13,7 +13,7 @@ import org.opensearch.action.ActionType; import org.opensearch.action.search.SearchResponse; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; /** * GetModelAction class diff --git a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoAction.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoAction.java index 4336cbf62..03d62bfb7 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoAction.java @@ -12,7 +12,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionType; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; /** * Action used to collect information from each node to determine which node would be best to route a particular diff --git a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoNodeRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoNodeRequest.java index 7d4b8ee76..57957d2b1 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoNodeRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoNodeRequest.java @@ -11,7 +11,7 @@ package org.opensearch.knn.plugin.transport; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.transport.TransportRequest; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoNodeResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoNodeResponse.java index 0947f7431..2469528f2 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoNodeResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoNodeResponse.java @@ -13,8 +13,8 @@ import org.opensearch.action.support.nodes.BaseNodeResponse; import org.opensearch.cluster.node.DiscoveryNode; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.ToXContentFragment; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoRequest.java index 23a0691b8..316168a1c 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoRequest.java @@ -12,7 +12,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.support.nodes.BaseNodesRequest; -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/knn/plugin/transport/TrainingJobRouteDecisionInfoResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoResponse.java index 906ffcab8..71812409c 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoResponse.java @@ -15,8 +15,8 @@ import org.opensearch.action.support.nodes.BaseNodesResponse; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.node.DiscoveryNode; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.ToXContentObject; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoTransportAction.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoTransportAction.java index 407036c86..cdee47927 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoTransportAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoTransportAction.java @@ -16,7 +16,7 @@ import org.opensearch.action.support.nodes.TransportNodesAction; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.inject.Inject; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.knn.training.TrainingJobRunner; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportService; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouterAction.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouterAction.java index d6a263a4b..ad340a582 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouterAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingJobRouterAction.java @@ -12,7 +12,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionType; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; /** * Action to route training request to a particular node in the cluster diff --git a/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelAction.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelAction.java index b82107407..19f1fa366 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelAction.java @@ -12,7 +12,7 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionType; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; public class TrainingModelAction extends ActionType { diff --git a/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelRequest.java index 9b7066c81..9035a8e84 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelRequest.java @@ -16,8 +16,8 @@ import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.ValidationException; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.knn.common.KNNConstants; import org.opensearch.knn.index.IndexUtil; import org.opensearch.knn.index.KNNMethodContext; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelResponse.java b/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelResponse.java index ccbd718b3..2886c30ae 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelResponse.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/TrainingModelResponse.java @@ -12,8 +12,8 @@ package org.opensearch.knn.plugin.transport; import org.opensearch.action.ActionResponse; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.core.xcontent.ToXContentObject; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.knn.common.KNNConstants; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardAction.java b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardAction.java index a9897f711..216efa78e 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardAction.java @@ -7,7 +7,7 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; /** * Action to update model graveyard diff --git a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardRequest.java index f8ca38507..887f5d7a2 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardRequest.java @@ -8,8 +8,8 @@ import lombok.Getter; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.support.master.AcknowledgedRequest; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardTransportAction.java b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardTransportAction.java index a7b5dc876..99aa1b23a 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardTransportAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelGraveyardTransportAction.java @@ -21,7 +21,7 @@ import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.Priority; import org.opensearch.common.inject.Inject; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.knn.indices.ModelGraveyard; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportService; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataAction.java b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataAction.java index 905e05aa0..756a32575 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataAction.java @@ -13,7 +13,7 @@ import org.opensearch.action.ActionType; import org.opensearch.action.support.master.AcknowledgedResponse; -import org.opensearch.common.io.stream.Writeable; +import org.opensearch.core.common.io.stream.Writeable; /** * Action to update model metadata. diff --git a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataRequest.java b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataRequest.java index d0628a519..af063ad27 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataRequest.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataRequest.java @@ -13,8 +13,8 @@ import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.support.master.AcknowledgedRequest; -import org.opensearch.common.io.stream.StreamInput; -import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.core.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.knn.indices.ModelMetadata; import java.io.IOException; diff --git a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataTransportAction.java b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataTransportAction.java index 2cfe04123..8c95c2db8 100644 --- a/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataTransportAction.java +++ b/src/main/java/org/opensearch/knn/plugin/transport/UpdateModelMetadataTransportAction.java @@ -28,7 +28,7 @@ import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.Priority; import org.opensearch.common.inject.Inject; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.knn.indices.ModelMetadata; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportService; diff --git a/src/test/java/org/opensearch/knn/KNNSingleNodeTestCase.java b/src/test/java/org/opensearch/knn/KNNSingleNodeTestCase.java index 48effbb39..792ebde69 100644 --- a/src/test/java/org/opensearch/knn/KNNSingleNodeTestCase.java +++ b/src/test/java/org/opensearch/knn/KNNSingleNodeTestCase.java @@ -5,7 +5,7 @@ package org.opensearch.knn; -import org.opensearch.common.bytes.BytesReference; +import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.knn.index.query.KNNQueryBuilder; import org.opensearch.knn.index.memory.NativeMemoryCacheManager; @@ -25,7 +25,7 @@ import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.index.IndexService; import org.opensearch.plugins.Plugin; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import org.opensearch.test.OpenSearchSingleNodeTestCase; import org.opensearch.test.hamcrest.OpenSearchAssertions; diff --git a/src/test/java/org/opensearch/knn/KNNTestCase.java b/src/test/java/org/opensearch/knn/KNNTestCase.java index ed1dd0e4e..1b0dbefef 100644 --- a/src/test/java/org/opensearch/knn/KNNTestCase.java +++ b/src/test/java/org/opensearch/knn/KNNTestCase.java @@ -14,7 +14,7 @@ import org.opensearch.knn.index.KNNSettings; import org.opensearch.knn.index.memory.NativeMemoryCacheManager; import org.opensearch.knn.plugin.stats.KNNCounter; -import org.opensearch.common.bytes.BytesReference; +import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.test.OpenSearchTestCase; diff --git a/src/test/java/org/opensearch/knn/index/KNNESSettingsTestIT.java b/src/test/java/org/opensearch/knn/index/KNNESSettingsTestIT.java index 7f7028ed8..23a3196fb 100644 --- a/src/test/java/org/opensearch/knn/index/KNNESSettingsTestIT.java +++ b/src/test/java/org/opensearch/knn/index/KNNESSettingsTestIT.java @@ -12,7 +12,7 @@ import org.opensearch.client.Response; import org.opensearch.client.ResponseException; import org.opensearch.common.settings.Settings; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.io.IOException; import java.util.Collections; diff --git a/src/test/java/org/opensearch/knn/index/OpenSearchIT.java b/src/test/java/org/opensearch/knn/index/OpenSearchIT.java index e4871e357..95005a5cb 100644 --- a/src/test/java/org/opensearch/knn/index/OpenSearchIT.java +++ b/src/test/java/org/opensearch/knn/index/OpenSearchIT.java @@ -30,7 +30,7 @@ import org.opensearch.knn.index.query.KNNQueryBuilder; import org.opensearch.knn.index.util.KNNEngine; import org.opensearch.knn.plugin.script.KNNScoringUtil; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.io.IOException; import java.net.URL; diff --git a/src/test/java/org/opensearch/knn/index/VectorDataTypeIT.java b/src/test/java/org/opensearch/knn/index/VectorDataTypeIT.java index 43976b901..17e33a17c 100644 --- a/src/test/java/org/opensearch/knn/index/VectorDataTypeIT.java +++ b/src/test/java/org/opensearch/knn/index/VectorDataTypeIT.java @@ -22,7 +22,7 @@ import org.opensearch.knn.common.KNNConstants; import org.opensearch.knn.index.query.KNNQueryBuilder; import org.opensearch.knn.index.util.KNNEngine; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import org.opensearch.script.Script; import java.util.Collections; diff --git a/src/test/java/org/opensearch/knn/index/codec/KNNCodecServiceTests.java b/src/test/java/org/opensearch/knn/index/codec/KNNCodecServiceTests.java index 2599200e6..233b9adf7 100644 --- a/src/test/java/org/opensearch/knn/index/codec/KNNCodecServiceTests.java +++ b/src/test/java/org/opensearch/knn/index/codec/KNNCodecServiceTests.java @@ -8,7 +8,7 @@ import org.apache.lucene.codecs.Codec; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.common.settings.Settings; -import org.opensearch.index.Index; +import org.opensearch.core.index.Index; import org.opensearch.index.IndexSettings; import org.opensearch.index.codec.CodecServiceConfig; import org.opensearch.index.mapper.MapperService; diff --git a/src/test/java/org/opensearch/knn/index/query/KNNQueryBuilderTests.java b/src/test/java/org/opensearch/knn/index/query/KNNQueryBuilderTests.java index c98f74e62..4e7f739a7 100644 --- a/src/test/java/org/opensearch/knn/index/query/KNNQueryBuilderTests.java +++ b/src/test/java/org/opensearch/knn/index/query/KNNQueryBuilderTests.java @@ -12,9 +12,9 @@ import org.opensearch.cluster.ClusterModule; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.io.stream.BytesStreamOutput; -import org.opensearch.common.io.stream.NamedWriteableAwareStreamInput; -import org.opensearch.common.io.stream.NamedWriteableRegistry; -import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.core.common.io.stream.NamedWriteableAwareStreamInput; +import org.opensearch.core.common.io.stream.NamedWriteableRegistry; +import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.QueryBuilders; @@ -23,7 +23,7 @@ import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.core.xcontent.XContentParser; -import org.opensearch.index.Index; +import org.opensearch.core.index.Index; import org.opensearch.index.mapper.NumberFieldMapper; import org.opensearch.index.query.QueryShardContext; import org.opensearch.knn.index.KNNClusterUtil; diff --git a/src/test/java/org/opensearch/knn/indices/ModelDaoTests.java b/src/test/java/org/opensearch/knn/indices/ModelDaoTests.java index 5122d6998..082757eb5 100644 --- a/src/test/java/org/opensearch/knn/indices/ModelDaoTests.java +++ b/src/test/java/org/opensearch/knn/indices/ModelDaoTests.java @@ -45,7 +45,7 @@ import org.opensearch.knn.plugin.transport.UpdateModelMetadataRequest; import org.opensearch.knn.plugin.transport.UpdateModelGraveyardAction; import org.opensearch.knn.plugin.transport.UpdateModelGraveyardRequest; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.io.IOException; import java.time.ZoneOffset; diff --git a/src/test/java/org/opensearch/knn/plugin/action/RestDeleteModelHandlerIT.java b/src/test/java/org/opensearch/knn/plugin/action/RestDeleteModelHandlerIT.java index cedb27ea9..871a4df39 100644 --- a/src/test/java/org/opensearch/knn/plugin/action/RestDeleteModelHandlerIT.java +++ b/src/test/java/org/opensearch/knn/plugin/action/RestDeleteModelHandlerIT.java @@ -20,7 +20,7 @@ import org.opensearch.common.xcontent.XContentType; import org.opensearch.knn.KNNRestTestCase; import org.opensearch.knn.plugin.KNNPlugin; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.util.List; import java.util.Map; diff --git a/src/test/java/org/opensearch/knn/plugin/action/RestGetModelHandlerIT.java b/src/test/java/org/opensearch/knn/plugin/action/RestGetModelHandlerIT.java index a44ba0558..9b42301b8 100644 --- a/src/test/java/org/opensearch/knn/plugin/action/RestGetModelHandlerIT.java +++ b/src/test/java/org/opensearch/knn/plugin/action/RestGetModelHandlerIT.java @@ -19,7 +19,7 @@ import org.opensearch.common.xcontent.XContentType; import org.opensearch.knn.KNNRestTestCase; import org.opensearch.knn.plugin.KNNPlugin; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.io.IOException; import java.util.Arrays; diff --git a/src/test/java/org/opensearch/knn/plugin/action/RestKNNStatsHandlerIT.java b/src/test/java/org/opensearch/knn/plugin/action/RestKNNStatsHandlerIT.java index fca457daa..725a0e66c 100644 --- a/src/test/java/org/opensearch/knn/plugin/action/RestKNNStatsHandlerIT.java +++ b/src/test/java/org/opensearch/knn/plugin/action/RestKNNStatsHandlerIT.java @@ -28,7 +28,7 @@ import org.opensearch.knn.index.SpaceType; import org.opensearch.knn.plugin.stats.KNNStats; import org.opensearch.knn.plugin.stats.StatNames; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.io.IOException; import java.util.Arrays; diff --git a/src/test/java/org/opensearch/knn/plugin/action/RestLegacyKNNStatsHandlerIT.java b/src/test/java/org/opensearch/knn/plugin/action/RestLegacyKNNStatsHandlerIT.java index f7fb4b9be..a78806b27 100644 --- a/src/test/java/org/opensearch/knn/plugin/action/RestLegacyKNNStatsHandlerIT.java +++ b/src/test/java/org/opensearch/knn/plugin/action/RestLegacyKNNStatsHandlerIT.java @@ -29,7 +29,7 @@ import org.opensearch.common.unit.TimeValue; import org.opensearch.index.query.MatchAllQueryBuilder; import org.opensearch.index.query.QueryBuilder; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.io.IOException; import java.util.Arrays; diff --git a/src/test/java/org/opensearch/knn/plugin/action/RestSearchModelHandlerIT.java b/src/test/java/org/opensearch/knn/plugin/action/RestSearchModelHandlerIT.java index 2bc36a759..9963b5ad4 100644 --- a/src/test/java/org/opensearch/knn/plugin/action/RestSearchModelHandlerIT.java +++ b/src/test/java/org/opensearch/knn/plugin/action/RestSearchModelHandlerIT.java @@ -25,7 +25,7 @@ import org.opensearch.knn.indices.ModelMetadata; import org.opensearch.knn.indices.ModelState; import org.opensearch.knn.plugin.KNNPlugin; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import org.opensearch.search.SearchHit; import java.io.IOException; diff --git a/src/test/java/org/opensearch/knn/plugin/action/RestTrainModelHandlerIT.java b/src/test/java/org/opensearch/knn/plugin/action/RestTrainModelHandlerIT.java index e9f713b38..e5c911326 100644 --- a/src/test/java/org/opensearch/knn/plugin/action/RestTrainModelHandlerIT.java +++ b/src/test/java/org/opensearch/knn/plugin/action/RestTrainModelHandlerIT.java @@ -17,7 +17,7 @@ import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.common.xcontent.XContentType; import org.opensearch.knn.KNNRestTestCase; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.util.Map; diff --git a/src/test/java/org/opensearch/knn/plugin/script/KNNScriptScoringIT.java b/src/test/java/org/opensearch/knn/plugin/script/KNNScriptScoringIT.java index 790f9ca37..e20312c6c 100644 --- a/src/test/java/org/opensearch/knn/plugin/script/KNNScriptScoringIT.java +++ b/src/test/java/org/opensearch/knn/plugin/script/KNNScriptScoringIT.java @@ -21,7 +21,7 @@ import org.opensearch.index.query.MatchAllQueryBuilder; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.functionscore.ScriptScoreQueryBuilder; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import org.opensearch.script.Script; import java.util.ArrayList; diff --git a/src/test/java/org/opensearch/knn/plugin/script/PainlessScriptIT.java b/src/test/java/org/opensearch/knn/plugin/script/PainlessScriptIT.java index b8c9dce34..f46ee9847 100644 --- a/src/test/java/org/opensearch/knn/plugin/script/PainlessScriptIT.java +++ b/src/test/java/org/opensearch/knn/plugin/script/PainlessScriptIT.java @@ -23,7 +23,7 @@ import org.opensearch.index.query.MatchAllQueryBuilder; import org.opensearch.index.query.QueryBuilder; import org.opensearch.knn.index.util.KNNEngine; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import org.opensearch.script.Script; import java.io.IOException; diff --git a/src/test/java/org/opensearch/knn/plugin/transport/KNNWarmupTransportActionTests.java b/src/test/java/org/opensearch/knn/plugin/transport/KNNWarmupTransportActionTests.java index da4c8d834..1f72f78a7 100644 --- a/src/test/java/org/opensearch/knn/plugin/transport/KNNWarmupTransportActionTests.java +++ b/src/test/java/org/opensearch/knn/plugin/transport/KNNWarmupTransportActionTests.java @@ -16,7 +16,7 @@ import org.opensearch.cluster.service.ClusterService; import org.opensearch.index.IndexService; import org.opensearch.knn.index.memory.NativeMemoryCacheManager; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import java.io.IOException; import java.util.EnumSet; diff --git a/src/test/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoTransportActionTests.java b/src/test/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoTransportActionTests.java index 7049bad2d..2eeaab418 100644 --- a/src/test/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoTransportActionTests.java +++ b/src/test/java/org/opensearch/knn/plugin/transport/TrainingJobRouteDecisionInfoTransportActionTests.java @@ -15,7 +15,7 @@ import org.junit.Before; import org.opensearch.action.ActionListener; import org.opensearch.action.index.IndexResponse; -import org.opensearch.index.shard.ShardId; +import org.opensearch.core.index.shard.ShardId; import org.opensearch.knn.KNNSingleNodeTestCase; import org.opensearch.knn.indices.Model; import org.opensearch.knn.indices.ModelDao; diff --git a/src/test/java/org/opensearch/knn/training/TrainingJobRunnerTests.java b/src/test/java/org/opensearch/knn/training/TrainingJobRunnerTests.java index 8b56518a8..3edff82c6 100644 --- a/src/test/java/org/opensearch/knn/training/TrainingJobRunnerTests.java +++ b/src/test/java/org/opensearch/knn/training/TrainingJobRunnerTests.java @@ -13,7 +13,7 @@ import org.opensearch.action.ActionListener; import org.opensearch.action.index.IndexResponse; -import org.opensearch.index.shard.ShardId; +import org.opensearch.core.index.shard.ShardId; import org.opensearch.knn.KNNTestCase; import org.opensearch.knn.indices.Model; import org.opensearch.knn.indices.ModelDao; diff --git a/src/testFixtures/java/org/opensearch/knn/KNNRestTestCase.java b/src/testFixtures/java/org/opensearch/knn/KNNRestTestCase.java index 8c1ff63db..02a3d11a4 100644 --- a/src/testFixtures/java/org/opensearch/knn/KNNRestTestCase.java +++ b/src/testFixtures/java/org/opensearch/knn/KNNRestTestCase.java @@ -11,7 +11,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.hc.core5.http.io.entity.EntityUtils; import org.opensearch.common.Strings; -import org.opensearch.common.bytes.BytesReference; +import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.core.xcontent.DeprecationHandler; import org.opensearch.core.xcontent.NamedXContentRegistry; @@ -37,7 +37,7 @@ import org.opensearch.index.query.ExistsQueryBuilder; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.functionscore.ScriptScoreQueryBuilder; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import org.opensearch.script.Script; import org.opensearch.search.aggregations.metrics.ScriptedMetricAggregationBuilder; diff --git a/src/testFixtures/java/org/opensearch/knn/ODFERestTestCase.java b/src/testFixtures/java/org/opensearch/knn/ODFERestTestCase.java index b7c650bc3..c0d3c2e98 100644 --- a/src/testFixtures/java/org/opensearch/knn/ODFERestTestCase.java +++ b/src/testFixtures/java/org/opensearch/knn/ODFERestTestCase.java @@ -51,7 +51,7 @@ import org.opensearch.core.xcontent.XContentParser; import org.opensearch.common.xcontent.XContentType; import org.opensearch.knn.plugin.KNNPlugin; -import org.opensearch.rest.RestStatus; +import org.opensearch.core.rest.RestStatus; import org.opensearch.search.SearchHit; import org.opensearch.test.rest.OpenSearchRestTestCase; import org.junit.After;