From e3595860c53c9e624a1ec8db308421be2469bca1 Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Thu, 10 Aug 2023 18:00:37 -0700 Subject: [PATCH 1/3] Fix breaking action change in main OpenSearch project. Signed-off-by: Mitchell Gale --- .../org/opensearch/ml/client/MachineLearningClient.java | 4 ++-- .../org/opensearch/ml/client/MachineLearningNodeClient.java | 4 ++-- .../org/opensearch/ml/client/MachineLearningClientTest.java | 2 +- .../opensearch/ml/client/MachineLearningNodeClientTest.java | 2 +- .../org/opensearch/ml/common/transport/MLTaskResponse.java | 2 +- .../ml/common/transport/deploy/MLDeployModelResponse.java | 2 +- .../ml/common/transport/execute/MLExecuteTaskResponse.java | 2 +- .../ml/common/transport/forward/MLForwardResponse.java | 2 +- .../ml/common/transport/model/MLModelGetResponse.java | 2 +- .../common/transport/register/MLRegisterModelResponse.java | 2 +- .../ml/common/transport/sync/MLSyncUpResponse.java | 2 +- .../ml/common/transport/task/MLTaskGetResponse.java | 2 +- .../transport/upload_chunk/MLRegisterModelMetaResponse.java | 2 +- .../transport/upload_chunk/MLUploadModelChunkResponse.java | 2 +- .../ml/common/transport/forward/MLForwardResponseTest.java | 2 +- .../transport/prediction/MLPredictionTaskResponseTest.java | 2 +- .../transport/training/MLTrainingTaskResponseTest.java | 2 +- .../src/main/java/org/opensearch/ml/engine/ModelHelper.java | 2 +- .../algorithms/anomalylocalization/AnomalyLocalizer.java | 2 +- .../anomalylocalization/AnomalyLocalizerImpl.java | 6 +++--- .../algorithms/metrics_correlation/MetricsCorrelation.java | 4 ++-- .../anomalylocalization/AnomalyLocalizerImplTests.java | 2 +- .../metrics_correlation/MetricsCorrelationTest.java | 4 ++-- .../engine/algorithms/text_embedding/ModelHelperTest.java | 2 +- .../ml/action/deploy/TransportDeployModelAction.java | 2 +- .../ml/action/deploy/TransportDeployModelOnNodeAction.java | 2 +- .../ml/action/execute/TransportExecuteTaskAction.java | 2 +- .../ml/action/forward/TransportForwardAction.java | 2 +- .../org/opensearch/ml/action/handler/MLSearchHandler.java | 2 +- .../ml/action/models/DeleteModelTransportAction.java | 2 +- .../ml/action/models/GetModelTransportAction.java | 2 +- .../ml/action/models/SearchModelTransportAction.java | 2 +- .../ml/action/prediction/TransportPredictionTaskAction.java | 2 +- .../ml/action/register/TransportRegisterModelAction.java | 2 +- .../ml/action/tasks/DeleteTaskTransportAction.java | 2 +- .../opensearch/ml/action/tasks/GetTaskTransportAction.java | 2 +- .../ml/action/tasks/SearchTaskTransportAction.java | 2 +- .../ml/action/training/TransportTrainingTaskAction.java | 2 +- .../trainpredict/TransportTrainAndPredictionTaskAction.java | 2 +- .../ml/action/undeploy/TransportUndeployModelAction.java | 2 +- .../ml/action/upload_chunk/MLModelChunkUploader.java | 2 +- .../upload_chunk/TransportRegisterModelMetaAction.java | 2 +- .../upload_chunk/TransportUploadModelChunkAction.java | 2 +- .../opensearch/ml/autoredeploy/MLModelAutoReDeployer.java | 2 +- .../main/java/org/opensearch/ml/cluster/MLSyncUpCron.java | 2 +- .../java/org/opensearch/ml/indices/MLIndicesHandler.java | 2 +- .../org/opensearch/ml/indices/MLInputDatasetHandler.java | 2 +- .../main/java/org/opensearch/ml/model/MLModelManager.java | 2 +- .../org/opensearch/ml/plugin/MachineLearningPlugin.java | 2 +- .../java/org/opensearch/ml/rest/RestMLPredictionAction.java | 2 +- .../java/org/opensearch/ml/rest/RestMLProfileAction.java | 2 +- .../main/java/org/opensearch/ml/rest/RestMLStatsAction.java | 2 +- .../java/org/opensearch/ml/task/MLExecuteTaskRunner.java | 2 +- .../java/org/opensearch/ml/task/MLPredictTaskRunner.java | 2 +- .../main/java/org/opensearch/ml/task/MLTaskDispatcher.java | 2 +- .../src/main/java/org/opensearch/ml/task/MLTaskManager.java | 2 +- .../src/main/java/org/opensearch/ml/task/MLTaskRunner.java | 2 +- .../org/opensearch/ml/task/MLTrainAndPredictTaskRunner.java | 2 +- .../java/org/opensearch/ml/task/MLTrainingTaskRunner.java | 2 +- .../src/main/java/org/opensearch/ml/utils/IndexUtils.java | 2 +- .../ml/action/deploy/TransportDeployModelActionTests.java | 2 +- .../deploy/TransportDeployModelOnNodeActionTests.java | 2 +- .../ml/action/forward/TransportForwardActionTests.java | 2 +- .../ml/action/models/DeleteModelTransportActionTests.java | 2 +- .../ml/action/models/GetModelTransportActionTests.java | 2 +- .../ml/action/models/SearchModelTransportActionTests.java | 2 +- .../action/register/TransportRegisterModelActionTests.java | 2 +- .../ml/action/tasks/DeleteTaskTransportActionTests.java | 2 +- .../ml/action/tasks/GetTaskTransportActionTests.java | 2 +- .../ml/action/tasks/SearchTaskTransportActionTests.java | 2 +- .../ml/action/upload_chunk/MLModelChunkUploaderTests.java | 2 +- .../upload_chunk/TransportRegisterModelMetaActionTests.java | 2 +- .../upload_chunk/TransportUploadModelChunkActionTests.java | 2 +- .../ml/autoredeploy/MLModelAutoReDeployerTests.java | 2 +- .../java/org/opensearch/ml/cluster/MLSyncUpCronTests.java | 2 +- .../org/opensearch/ml/indices/MLIndicesHandlerTests.java | 2 +- .../opensearch/ml/indices/MLInputDatasetHandlerTests.java | 2 +- .../java/org/opensearch/ml/model/MLModelManagerTests.java | 2 +- .../opensearch/ml/rest/RestMLDeleteModelActionTests.java | 2 +- .../org/opensearch/ml/rest/RestMLDeleteTaskActionTests.java | 2 +- .../opensearch/ml/rest/RestMLDeployModelActionTests.java | 2 +- .../org/opensearch/ml/rest/RestMLExecuteActionTests.java | 2 +- .../org/opensearch/ml/rest/RestMLGetModelActionTests.java | 2 +- .../org/opensearch/ml/rest/RestMLGetTaskActionTests.java | 2 +- .../org/opensearch/ml/rest/RestMLPredictionActionTests.java | 2 +- .../org/opensearch/ml/rest/RestMLProfileActionTests.java | 2 +- .../opensearch/ml/rest/RestMLRegisterModelActionTests.java | 2 +- .../ml/rest/RestMLRegisterModelMetaActionTests.java | 2 +- .../opensearch/ml/rest/RestMLSearchModelActionTests.java | 2 +- .../java/org/opensearch/ml/rest/RestMLStatsActionTests.java | 2 +- .../ml/rest/RestMLTrainAndPredictActionTests.java | 2 +- .../org/opensearch/ml/rest/RestMLTrainingActionTests.java | 2 +- .../opensearch/ml/rest/RestMLUndeployModelActionTests.java | 2 +- .../ml/rest/RestMLUploadModelChunkActionTests.java | 2 +- .../org/opensearch/ml/task/MLExecuteTaskRunnerTests.java | 2 +- .../org/opensearch/ml/task/MLPredictTaskRunnerTests.java | 2 +- .../java/org/opensearch/ml/task/MLTaskDispatcherTests.java | 2 +- .../java/org/opensearch/ml/task/MLTaskManagerTests.java | 2 +- .../ml/task/MLTrainAndPredictTaskRunnerTests.java | 2 +- .../org/opensearch/ml/task/MLTrainingTaskRunnerTests.java | 2 +- .../test/java/org/opensearch/ml/task/TaskRunnerTests.java | 2 +- .../test/java/org/opensearch/ml/utils/IndexUtilsTests.java | 2 +- .../src/test/java/org/opensearch/ml/utils/MockHelper.java | 2 +- 103 files changed, 109 insertions(+), 109 deletions(-) diff --git a/client/src/main/java/org/opensearch/ml/client/MachineLearningClient.java b/client/src/main/java/org/opensearch/ml/client/MachineLearningClient.java index b4d72549c2..57fda6bab8 100644 --- a/client/src/main/java/org/opensearch/ml/client/MachineLearningClient.java +++ b/client/src/main/java/org/opensearch/ml/client/MachineLearningClient.java @@ -6,8 +6,8 @@ package org.opensearch.ml.client; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.ActionListener; +import org.opensearch.common.action.ActionFuture; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; diff --git a/client/src/main/java/org/opensearch/ml/client/MachineLearningNodeClient.java b/client/src/main/java/org/opensearch/ml/client/MachineLearningNodeClient.java index b189d48e52..b9f143ed2e 100644 --- a/client/src/main/java/org/opensearch/ml/client/MachineLearningNodeClient.java +++ b/client/src/main/java/org/opensearch/ml/client/MachineLearningNodeClient.java @@ -8,8 +8,8 @@ import lombok.AccessLevel; import lombok.RequiredArgsConstructor; import lombok.experimental.FieldDefaults; -import org.opensearch.action.ActionListener; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionListener; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; diff --git a/client/src/test/java/org/opensearch/ml/client/MachineLearningClientTest.java b/client/src/test/java/org/opensearch/ml/client/MachineLearningClientTest.java index db26175b91..2a98812090 100644 --- a/client/src/test/java/org/opensearch/ml/client/MachineLearningClientTest.java +++ b/client/src/test/java/org/opensearch/ml/client/MachineLearningClientTest.java @@ -11,7 +11,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; diff --git a/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java b/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java index 8d8c14f557..b515fc71cc 100644 --- a/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java +++ b/client/src/test/java/org/opensearch/ml/client/MachineLearningNodeClientTest.java @@ -14,7 +14,7 @@ import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/MLTaskResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/MLTaskResponse.java index 207e7f81d7..4358538741 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/MLTaskResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/MLTaskResponse.java @@ -8,7 +8,7 @@ import lombok.Builder; import lombok.Getter; import lombok.ToString; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.io.stream.InputStreamStreamInput; import org.opensearch.core.common.io.stream.OutputStreamStreamOutput; import org.opensearch.core.common.io.stream.StreamInput; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/deploy/MLDeployModelResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/deploy/MLDeployModelResponse.java index b3adae463d..a37ac71e8a 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/deploy/MLDeployModelResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/deploy/MLDeployModelResponse.java @@ -6,7 +6,7 @@ package org.opensearch.ml.common.transport.deploy; import lombok.Getter; -import org.opensearch.action.ActionResponse; +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.core.xcontent.ToXContent; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/execute/MLExecuteTaskResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/execute/MLExecuteTaskResponse.java index db3f338e39..b97c02ca9c 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/execute/MLExecuteTaskResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/execute/MLExecuteTaskResponse.java @@ -9,7 +9,7 @@ import lombok.Getter; import lombok.NonNull; import lombok.ToString; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.io.stream.InputStreamStreamInput; import org.opensearch.core.common.io.stream.OutputStreamStreamOutput; import org.opensearch.core.common.io.stream.StreamInput; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/forward/MLForwardResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/forward/MLForwardResponse.java index 1f9820b1bc..ff51103671 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/forward/MLForwardResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/forward/MLForwardResponse.java @@ -8,7 +8,7 @@ import lombok.Builder; import lombok.Getter; import lombok.ToString; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.io.stream.InputStreamStreamInput; import org.opensearch.core.common.io.stream.OutputStreamStreamOutput; import org.opensearch.core.common.io.stream.StreamInput; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/model/MLModelGetResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/model/MLModelGetResponse.java index d503963599..b9a1040474 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/model/MLModelGetResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/model/MLModelGetResponse.java @@ -8,7 +8,7 @@ import lombok.Builder; import lombok.Getter; import lombok.ToString; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.io.stream.InputStreamStreamInput; import org.opensearch.core.common.io.stream.OutputStreamStreamOutput; import org.opensearch.core.common.io.stream.StreamInput; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/register/MLRegisterModelResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/register/MLRegisterModelResponse.java index 7144875a71..51bc98fe1b 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/register/MLRegisterModelResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/register/MLRegisterModelResponse.java @@ -6,7 +6,7 @@ package org.opensearch.ml.common.transport.register; import lombok.Getter; -import org.opensearch.action.ActionResponse; +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.core.xcontent.ToXContent; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/sync/MLSyncUpResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/sync/MLSyncUpResponse.java index c5e68a9006..6c4f4ed82f 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/sync/MLSyncUpResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/sync/MLSyncUpResponse.java @@ -6,7 +6,7 @@ package org.opensearch.ml.common.transport.sync; import lombok.Getter; -import org.opensearch.action.ActionResponse; +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.core.xcontent.ToXContent; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/task/MLTaskGetResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/task/MLTaskGetResponse.java index 3efef6dfe7..cc4d51192a 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/task/MLTaskGetResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/task/MLTaskGetResponse.java @@ -7,7 +7,7 @@ import lombok.Builder; import lombok.Getter; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.io.stream.InputStreamStreamInput; import org.opensearch.core.common.io.stream.OutputStreamStreamOutput; import org.opensearch.core.common.io.stream.StreamInput; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/upload_chunk/MLRegisterModelMetaResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/upload_chunk/MLRegisterModelMetaResponse.java index 30506d2762..42b734a1a2 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/upload_chunk/MLRegisterModelMetaResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/upload_chunk/MLRegisterModelMetaResponse.java @@ -6,7 +6,7 @@ package org.opensearch.ml.common.transport.upload_chunk; import lombok.Getter; -import org.opensearch.action.ActionResponse; +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.core.xcontent.ToXContent; diff --git a/common/src/main/java/org/opensearch/ml/common/transport/upload_chunk/MLUploadModelChunkResponse.java b/common/src/main/java/org/opensearch/ml/common/transport/upload_chunk/MLUploadModelChunkResponse.java index c30fa685d4..b6a065a1be 100644 --- a/common/src/main/java/org/opensearch/ml/common/transport/upload_chunk/MLUploadModelChunkResponse.java +++ b/common/src/main/java/org/opensearch/ml/common/transport/upload_chunk/MLUploadModelChunkResponse.java @@ -6,7 +6,7 @@ package org.opensearch.ml.common.transport.upload_chunk; import lombok.Getter; -import org.opensearch.action.ActionResponse; +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.core.xcontent.ToXContent; diff --git a/common/src/test/java/org/opensearch/ml/common/transport/forward/MLForwardResponseTest.java b/common/src/test/java/org/opensearch/ml/common/transport/forward/MLForwardResponseTest.java index df4f415722..fa2d86a54d 100644 --- a/common/src/test/java/org/opensearch/ml/common/transport/forward/MLForwardResponseTest.java +++ b/common/src/test/java/org/opensearch/ml/common/transport/forward/MLForwardResponseTest.java @@ -4,7 +4,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.core.common.io.stream.StreamOutput; diff --git a/common/src/test/java/org/opensearch/ml/common/transport/prediction/MLPredictionTaskResponseTest.java b/common/src/test/java/org/opensearch/ml/common/transport/prediction/MLPredictionTaskResponseTest.java index 9eb8532044..fdd3883441 100644 --- a/common/src/test/java/org/opensearch/ml/common/transport/prediction/MLPredictionTaskResponseTest.java +++ b/common/src/test/java/org/opensearch/ml/common/transport/prediction/MLPredictionTaskResponseTest.java @@ -6,7 +6,7 @@ package org.opensearch.ml.common.transport.prediction; import org.junit.Test; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.core.common.io.stream.StreamOutput; diff --git a/common/src/test/java/org/opensearch/ml/common/transport/training/MLTrainingTaskResponseTest.java b/common/src/test/java/org/opensearch/ml/common/transport/training/MLTrainingTaskResponseTest.java index 0e7b2940a6..cca7a158cf 100644 --- a/common/src/test/java/org/opensearch/ml/common/transport/training/MLTrainingTaskResponseTest.java +++ b/common/src/test/java/org/opensearch/ml/common/transport/training/MLTrainingTaskResponseTest.java @@ -9,7 +9,7 @@ import java.io.UncheckedIOException; import org.junit.Test; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.common.io.stream.BytesStreamOutput; import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.ml.common.output.MLTrainingOutput; diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/ModelHelper.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/ModelHelper.java index d3427e676a..a19db4923a 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/ModelHelper.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/ModelHelper.java @@ -10,7 +10,7 @@ import com.google.gson.Gson; import com.google.gson.stream.JsonReader; import lombok.extern.log4j.Log4j2; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.FunctionName; import org.opensearch.ml.common.model.MLModelConfig; import org.opensearch.ml.common.model.MLModelFormat; diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizer.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizer.java index 8b0b5f8370..3cf748cf0e 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizer.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizer.java @@ -5,7 +5,7 @@ package org.opensearch.ml.engine.algorithms.anomalylocalization; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.input.execute.anomalylocalization.AnomalyLocalizationInput; import org.opensearch.ml.common.output.execute.anomalylocalization.AnomalyLocalizationOutput; diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizerImpl.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizerImpl.java index 06215f2a36..47e6affc1e 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizerImpl.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizerImpl.java @@ -19,9 +19,9 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.LatchedActionListener; -import org.opensearch.action.NotifyOnceListener; +import org.opensearch.core.action.NotifyOnceListener; import org.opensearch.action.search.MultiSearchRequest; import org.opensearch.action.search.MultiSearchResponse; import org.opensearch.action.search.SearchRequest; @@ -57,7 +57,7 @@ import lombok.SneakyThrows; import lombok.extern.log4j.Log4j2; -import static org.opensearch.action.ActionListener.wrap; +import static org.opensearch.core.action.ActionListener.wrap; import static org.opensearch.search.aggregations.MultiBucketConsumerService.MAX_BUCKET_SETTING; /** diff --git a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelation.java b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelation.java index c37ea2b81d..2666555c45 100644 --- a/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelation.java +++ b/ml-algorithms/src/main/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelation.java @@ -9,8 +9,8 @@ import ai.djl.translate.TranslateException; import com.google.common.annotations.VisibleForTesting; import lombok.extern.log4j.Log4j2; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.ActionListener; +import org.opensearch.common.action.ActionFuture; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.client.Client; import org.opensearch.common.settings.Settings; diff --git a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizerImplTests.java b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizerImplTests.java index c69edda582..e484277934 100644 --- a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizerImplTests.java +++ b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/anomalylocalization/AnomalyLocalizerImplTests.java @@ -23,7 +23,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.search.MultiSearchResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.support.IndicesOptions; diff --git a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelationTest.java b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelationTest.java index 527c40a4c8..23ec3b6f94 100644 --- a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelationTest.java +++ b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/metrics_correlation/MetricsCorrelationTest.java @@ -14,8 +14,8 @@ import org.junit.rules.ExpectedException; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.ActionListener; +import org.opensearch.common.action.ActionFuture; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.ShardSearchFailure; diff --git a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/text_embedding/ModelHelperTest.java b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/text_embedding/ModelHelperTest.java index e5db723812..2d14c51878 100644 --- a/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/text_embedding/ModelHelperTest.java +++ b/ml-algorithms/src/test/java/org/opensearch/ml/engine/algorithms/text_embedding/ModelHelperTest.java @@ -12,7 +12,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.FunctionName; import org.opensearch.ml.common.model.MLModelConfig; import org.opensearch.ml.common.model.MLModelFormat; diff --git a/plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelAction.java b/plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelAction.java index 7fe38afb9c..9936a9fa1a 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelAction.java @@ -22,7 +22,6 @@ import java.util.Set; import java.util.stream.Collectors; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; @@ -32,6 +31,7 @@ import org.opensearch.common.inject.Inject; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.FunctionName; diff --git a/plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelOnNodeAction.java b/plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelOnNodeAction.java index 4bf041dd7c..67f58d69a0 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelOnNodeAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/deploy/TransportDeployModelOnNodeAction.java @@ -13,7 +13,6 @@ import java.util.List; import java.util.Map; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListenerResponseHandler; import org.opensearch.action.FailedNodeException; import org.opensearch.action.support.ActionFilters; @@ -23,6 +22,7 @@ import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.breaker.MLCircuitBreakerService; diff --git a/plugin/src/main/java/org/opensearch/ml/action/execute/TransportExecuteTaskAction.java b/plugin/src/main/java/org/opensearch/ml/action/execute/TransportExecuteTaskAction.java index d0bb728ed1..efb6207a4b 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/execute/TransportExecuteTaskAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/execute/TransportExecuteTaskAction.java @@ -5,11 +5,11 @@ package org.opensearch.ml.action.execute; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.transport.execute.MLExecuteTaskAction; import org.opensearch.ml.common.transport.execute.MLExecuteTaskRequest; import org.opensearch.ml.common.transport.execute.MLExecuteTaskResponse; diff --git a/plugin/src/main/java/org/opensearch/ml/action/forward/TransportForwardAction.java b/plugin/src/main/java/org/opensearch/ml/action/forward/TransportForwardAction.java index bdb34ff0b3..3c3ac42d29 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/forward/TransportForwardAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/forward/TransportForwardAction.java @@ -17,7 +17,6 @@ import java.util.Map; import java.util.Set; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; @@ -26,6 +25,7 @@ import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.inject.Inject; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.autoredeploy.MLModelAutoReDeployer; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.MLModel; diff --git a/plugin/src/main/java/org/opensearch/ml/action/handler/MLSearchHandler.java b/plugin/src/main/java/org/opensearch/ml/action/handler/MLSearchHandler.java index b4d0ba6185..f9da57a018 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/handler/MLSearchHandler.java +++ b/plugin/src/main/java/org/opensearch/ml/action/handler/MLSearchHandler.java @@ -9,11 +9,11 @@ import static org.opensearch.core.rest.RestStatus.INTERNAL_SERVER_ERROR; import org.opensearch.OpenSearchStatusException; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.index.IndexNotFoundException; diff --git a/plugin/src/main/java/org/opensearch/ml/action/models/DeleteModelTransportAction.java b/plugin/src/main/java/org/opensearch/ml/action/models/DeleteModelTransportAction.java index d1123a7310..469d4de209 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/models/DeleteModelTransportAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/models/DeleteModelTransportAction.java @@ -14,7 +14,6 @@ import org.opensearch.OpenSearchStatusException; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.delete.DeleteRequest; import org.opensearch.action.delete.DeleteResponse; @@ -25,6 +24,7 @@ import org.opensearch.client.Client; import org.opensearch.common.inject.Inject; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentParser; diff --git a/plugin/src/main/java/org/opensearch/ml/action/models/GetModelTransportAction.java b/plugin/src/main/java/org/opensearch/ml/action/models/GetModelTransportAction.java index 7ecef4f201..bfab1e42c6 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/models/GetModelTransportAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/models/GetModelTransportAction.java @@ -11,7 +11,6 @@ import static org.opensearch.ml.utils.MLNodeUtils.createXContentParserFromRegistry; import static org.opensearch.ml.utils.RestActionUtils.getFetchSourceContext; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.get.GetRequest; import org.opensearch.action.get.GetResponse; @@ -20,6 +19,7 @@ import org.opensearch.client.Client; import org.opensearch.common.inject.Inject; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.index.IndexNotFoundException; diff --git a/plugin/src/main/java/org/opensearch/ml/action/models/SearchModelTransportAction.java b/plugin/src/main/java/org/opensearch/ml/action/models/SearchModelTransportAction.java index 999b0b7dfe..28ac82353e 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/models/SearchModelTransportAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/models/SearchModelTransportAction.java @@ -5,12 +5,12 @@ package org.opensearch.ml.action.models; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.action.handler.MLSearchHandler; import org.opensearch.ml.common.transport.model.MLModelSearchAction; import org.opensearch.tasks.Task; diff --git a/plugin/src/main/java/org/opensearch/ml/action/prediction/TransportPredictionTaskAction.java b/plugin/src/main/java/org/opensearch/ml/action/prediction/TransportPredictionTaskAction.java index 4eb0a95bb9..23503c96f7 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/prediction/TransportPredictionTaskAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/prediction/TransportPredictionTaskAction.java @@ -5,11 +5,11 @@ package org.opensearch.ml.action.prediction; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.transport.MLTaskResponse; import org.opensearch.ml.common.transport.prediction.MLPredictionTaskAction; import org.opensearch.ml.common.transport.prediction.MLPredictionTaskRequest; diff --git a/plugin/src/main/java/org/opensearch/ml/action/register/TransportRegisterModelAction.java b/plugin/src/main/java/org/opensearch/ml/action/register/TransportRegisterModelAction.java index 4b63a37a90..b2201f5251 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/register/TransportRegisterModelAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/register/TransportRegisterModelAction.java @@ -15,7 +15,6 @@ import java.util.Arrays; import java.util.regex.Pattern; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListenerResponseHandler; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; @@ -25,6 +24,7 @@ import org.opensearch.common.inject.Inject; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.MLTask; import org.opensearch.ml.common.MLTaskState; diff --git a/plugin/src/main/java/org/opensearch/ml/action/tasks/DeleteTaskTransportAction.java b/plugin/src/main/java/org/opensearch/ml/action/tasks/DeleteTaskTransportAction.java index cc0428a66d..753dcb4a05 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/tasks/DeleteTaskTransportAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/tasks/DeleteTaskTransportAction.java @@ -9,7 +9,6 @@ import static org.opensearch.ml.common.CommonValue.ML_TASK_INDEX; import static org.opensearch.ml.utils.MLNodeUtils.createXContentParserFromRegistry; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.delete.DeleteRequest; import org.opensearch.action.delete.DeleteResponse; @@ -19,6 +18,7 @@ import org.opensearch.client.Client; import org.opensearch.common.inject.Inject; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.ml.common.MLTask; diff --git a/plugin/src/main/java/org/opensearch/ml/action/tasks/GetTaskTransportAction.java b/plugin/src/main/java/org/opensearch/ml/action/tasks/GetTaskTransportAction.java index 28062e1e47..93d5ae598e 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/tasks/GetTaskTransportAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/tasks/GetTaskTransportAction.java @@ -9,7 +9,6 @@ import static org.opensearch.ml.common.CommonValue.ML_TASK_INDEX; import static org.opensearch.ml.utils.MLNodeUtils.createXContentParserFromRegistry; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.get.GetRequest; import org.opensearch.action.support.ActionFilters; @@ -17,6 +16,7 @@ import org.opensearch.client.Client; import org.opensearch.common.inject.Inject; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.index.IndexNotFoundException; diff --git a/plugin/src/main/java/org/opensearch/ml/action/tasks/SearchTaskTransportAction.java b/plugin/src/main/java/org/opensearch/ml/action/tasks/SearchTaskTransportAction.java index 4d811064bc..a9d1d1133b 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/tasks/SearchTaskTransportAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/tasks/SearchTaskTransportAction.java @@ -5,12 +5,12 @@ package org.opensearch.ml.action.tasks; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.action.handler.MLSearchHandler; import org.opensearch.ml.common.transport.task.MLTaskSearchAction; import org.opensearch.tasks.Task; diff --git a/plugin/src/main/java/org/opensearch/ml/action/training/TransportTrainingTaskAction.java b/plugin/src/main/java/org/opensearch/ml/action/training/TransportTrainingTaskAction.java index bd1feb6e30..0b7e00e2c4 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/training/TransportTrainingTaskAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/training/TransportTrainingTaskAction.java @@ -5,11 +5,11 @@ package org.opensearch.ml.action.training; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.transport.MLTaskResponse; import org.opensearch.ml.common.transport.training.MLTrainingTaskAction; import org.opensearch.ml.common.transport.training.MLTrainingTaskRequest; diff --git a/plugin/src/main/java/org/opensearch/ml/action/trainpredict/TransportTrainAndPredictionTaskAction.java b/plugin/src/main/java/org/opensearch/ml/action/trainpredict/TransportTrainAndPredictionTaskAction.java index 8be89f2e31..d968bdc495 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/trainpredict/TransportTrainAndPredictionTaskAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/trainpredict/TransportTrainAndPredictionTaskAction.java @@ -5,11 +5,11 @@ package org.opensearch.ml.action.trainpredict; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.transport.MLTaskResponse; import org.opensearch.ml.common.transport.training.MLTrainingTaskRequest; import org.opensearch.ml.common.transport.trainpredict.MLTrainAndPredictionTaskAction; diff --git a/plugin/src/main/java/org/opensearch/ml/action/undeploy/TransportUndeployModelAction.java b/plugin/src/main/java/org/opensearch/ml/action/undeploy/TransportUndeployModelAction.java index 1e3c14e248..e97b7b6f53 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/undeploy/TransportUndeployModelAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/undeploy/TransportUndeployModelAction.java @@ -16,7 +16,6 @@ import java.util.Map; import java.util.stream.Collectors; -import org.opensearch.action.ActionListener; import org.opensearch.action.FailedNodeException; import org.opensearch.action.bulk.BulkRequest; import org.opensearch.action.bulk.BulkResponse; @@ -27,6 +26,7 @@ import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.inject.Inject; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.MLModel; diff --git a/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/MLModelChunkUploader.java b/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/MLModelChunkUploader.java index 0a13d04629..e861077587 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/MLModelChunkUploader.java +++ b/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/MLModelChunkUploader.java @@ -12,7 +12,6 @@ import java.util.Base64; import java.util.concurrent.Semaphore; -import org.opensearch.action.ActionListener; import org.opensearch.action.get.GetRequest; import org.opensearch.action.get.GetResponse; import org.opensearch.action.index.IndexRequest; @@ -21,6 +20,7 @@ import org.opensearch.common.inject.Inject; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/TransportRegisterModelMetaAction.java b/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/TransportRegisterModelMetaAction.java index 20cddb5aaf..6b38645af0 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/TransportRegisterModelMetaAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/TransportRegisterModelMetaAction.java @@ -5,11 +5,11 @@ package org.opensearch.ml.action.upload_chunk; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.MLTaskState; import org.opensearch.ml.common.transport.upload_chunk.MLRegisterModelMetaAction; import org.opensearch.ml.common.transport.upload_chunk.MLRegisterModelMetaInput; diff --git a/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/TransportUploadModelChunkAction.java b/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/TransportUploadModelChunkAction.java index 7de6d791a8..8be824a791 100644 --- a/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/TransportUploadModelChunkAction.java +++ b/plugin/src/main/java/org/opensearch/ml/action/upload_chunk/TransportUploadModelChunkAction.java @@ -5,11 +5,11 @@ package org.opensearch.ml.action.upload_chunk; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.transport.upload_chunk.MLUploadModelChunkAction; import org.opensearch.ml.common.transport.upload_chunk.MLUploadModelChunkInput; import org.opensearch.ml.common.transport.upload_chunk.MLUploadModelChunkRequest; diff --git a/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java b/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java index 580538f513..dc322f2836 100644 --- a/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java +++ b/plugin/src/main/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployer.java @@ -18,7 +18,6 @@ import java.util.function.Consumer; import java.util.stream.Collectors; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchAction; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.action.search.SearchResponse; @@ -26,6 +25,7 @@ import org.opensearch.client.OpenSearchClient; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.index.query.TermsQueryBuilder; import org.opensearch.ml.common.MLModel; diff --git a/plugin/src/main/java/org/opensearch/ml/cluster/MLSyncUpCron.java b/plugin/src/main/java/org/opensearch/ml/cluster/MLSyncUpCron.java index 0ba118bd29..ddf34cb879 100644 --- a/plugin/src/main/java/org/opensearch/ml/cluster/MLSyncUpCron.java +++ b/plugin/src/main/java/org/opensearch/ml/cluster/MLSyncUpCron.java @@ -18,13 +18,13 @@ import java.util.concurrent.Semaphore; import java.util.stream.Collectors; -import org.opensearch.action.ActionListener; import org.opensearch.action.bulk.BulkRequest; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.update.UpdateRequest; import org.opensearch.client.Client; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.core.action.ActionListener; import org.opensearch.index.query.BoolQueryBuilder; import org.opensearch.index.query.TermsQueryBuilder; import org.opensearch.ml.common.MLModel; diff --git a/plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java b/plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java index 422f6b0d3a..4d2fe548c9 100644 --- a/plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java +++ b/plugin/src/main/java/org/opensearch/ml/indices/MLIndicesHandler.java @@ -14,7 +14,6 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicBoolean; -import org.opensearch.action.ActionListener; import org.opensearch.action.admin.indices.create.CreateIndexRequest; import org.opensearch.action.admin.indices.create.CreateIndexResponse; import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest; @@ -23,6 +22,7 @@ import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.CommonValue; import org.opensearch.ml.common.exception.MLException; diff --git a/plugin/src/main/java/org/opensearch/ml/indices/MLInputDatasetHandler.java b/plugin/src/main/java/org/opensearch/ml/indices/MLInputDatasetHandler.java index 709202c056..1dcf6bdf77 100644 --- a/plugin/src/main/java/org/opensearch/ml/indices/MLInputDatasetHandler.java +++ b/plugin/src/main/java/org/opensearch/ml/indices/MLInputDatasetHandler.java @@ -9,9 +9,9 @@ import java.util.List; import java.util.Map; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.client.Client; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.dataframe.DataFrame; import org.opensearch.ml.common.dataframe.DataFrameBuilder; import org.opensearch.ml.common.dataset.DataFrameInputDataset; diff --git a/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java b/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java index 8fd7907529..e5465c06fb 100644 --- a/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java +++ b/plugin/src/main/java/org/opensearch/ml/model/MLModelManager.java @@ -53,7 +53,6 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Supplier; -import org.opensearch.action.ActionListener; import org.opensearch.action.delete.DeleteRequest; import org.opensearch.action.get.GetRequest; import org.opensearch.action.get.GetResponse; @@ -69,6 +68,7 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/plugin/src/main/java/org/opensearch/ml/plugin/MachineLearningPlugin.java b/plugin/src/main/java/org/opensearch/ml/plugin/MachineLearningPlugin.java index c538e08aaf..7fa22f8318 100644 --- a/plugin/src/main/java/org/opensearch/ml/plugin/MachineLearningPlugin.java +++ b/plugin/src/main/java/org/opensearch/ml/plugin/MachineLearningPlugin.java @@ -16,13 +16,13 @@ import java.util.function.Supplier; import org.opensearch.action.ActionRequest; -import org.opensearch.action.ActionResponse; import org.opensearch.client.Client; import org.opensearch.cluster.metadata.IndexNameExpressionResolver; import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.*; import org.opensearch.common.util.concurrent.OpenSearchExecutors; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.io.stream.NamedWriteableRegistry; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.env.Environment; diff --git a/plugin/src/main/java/org/opensearch/ml/rest/RestMLPredictionAction.java b/plugin/src/main/java/org/opensearch/ml/rest/RestMLPredictionAction.java index df2df93815..ca36d0810c 100644 --- a/plugin/src/main/java/org/opensearch/ml/rest/RestMLPredictionAction.java +++ b/plugin/src/main/java/org/opensearch/ml/rest/RestMLPredictionAction.java @@ -16,8 +16,8 @@ import java.util.Locale; import java.util.Optional; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.ml.common.FunctionName; diff --git a/plugin/src/main/java/org/opensearch/ml/rest/RestMLProfileAction.java b/plugin/src/main/java/org/opensearch/ml/rest/RestMLProfileAction.java index 000f48f49d..d33d11dbef 100644 --- a/plugin/src/main/java/org/opensearch/ml/rest/RestMLProfileAction.java +++ b/plugin/src/main/java/org/opensearch/ml/rest/RestMLProfileAction.java @@ -21,9 +21,9 @@ import java.util.Optional; import java.util.stream.Collectors; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/plugin/src/main/java/org/opensearch/ml/rest/RestMLStatsAction.java b/plugin/src/main/java/org/opensearch/ml/rest/RestMLStatsAction.java index 54b0f51286..8ecb66eb49 100644 --- a/plugin/src/main/java/org/opensearch/ml/rest/RestMLStatsAction.java +++ b/plugin/src/main/java/org/opensearch/ml/rest/RestMLStatsAction.java @@ -22,10 +22,10 @@ import java.util.Optional; import java.util.stream.Collectors; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/plugin/src/main/java/org/opensearch/ml/task/MLExecuteTaskRunner.java b/plugin/src/main/java/org/opensearch/ml/task/MLExecuteTaskRunner.java index 04c830d6d3..11b1ecd886 100644 --- a/plugin/src/main/java/org/opensearch/ml/task/MLExecuteTaskRunner.java +++ b/plugin/src/main/java/org/opensearch/ml/task/MLExecuteTaskRunner.java @@ -8,10 +8,10 @@ import static org.opensearch.ml.plugin.MachineLearningPlugin.EXECUTE_THREAD_POOL; import static org.opensearch.ml.settings.MLCommonsSettings.ML_COMMONS_ENABLE_MCORR; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListenerResponseHandler; import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.breaker.MLCircuitBreakerService; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.FunctionName; diff --git a/plugin/src/main/java/org/opensearch/ml/task/MLPredictTaskRunner.java b/plugin/src/main/java/org/opensearch/ml/task/MLPredictTaskRunner.java index 5db36c3658..043428a483 100644 --- a/plugin/src/main/java/org/opensearch/ml/task/MLPredictTaskRunner.java +++ b/plugin/src/main/java/org/opensearch/ml/task/MLPredictTaskRunner.java @@ -17,7 +17,6 @@ import org.opensearch.OpenSearchException; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListenerResponseHandler; import org.opensearch.action.get.GetRequest; import org.opensearch.action.get.GetResponse; @@ -29,6 +28,7 @@ import org.opensearch.common.xcontent.LoggingDeprecationHandler; import org.opensearch.common.xcontent.XContentType; import org.opensearch.commons.authuser.User; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentParser; import org.opensearch.ml.breaker.MLCircuitBreakerService; diff --git a/plugin/src/main/java/org/opensearch/ml/task/MLTaskDispatcher.java b/plugin/src/main/java/org/opensearch/ml/task/MLTaskDispatcher.java index 6d6f1735ab..a7485134ec 100644 --- a/plugin/src/main/java/org/opensearch/ml/task/MLTaskDispatcher.java +++ b/plugin/src/main/java/org/opensearch/ml/task/MLTaskDispatcher.java @@ -15,11 +15,11 @@ import javax.naming.LimitExceededException; -import org.opensearch.action.ActionListener; import org.opensearch.client.Client; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.action.stats.MLStatsNodeResponse; import org.opensearch.ml.action.stats.MLStatsNodesAction; import org.opensearch.ml.action.stats.MLStatsNodesRequest; diff --git a/plugin/src/main/java/org/opensearch/ml/task/MLTaskManager.java b/plugin/src/main/java/org/opensearch/ml/task/MLTaskManager.java index 5799d2a237..f1feb4ec32 100644 --- a/plugin/src/main/java/org/opensearch/ml/task/MLTaskManager.java +++ b/plugin/src/main/java/org/opensearch/ml/task/MLTaskManager.java @@ -23,7 +23,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import org.opensearch.action.ActionListener; import org.opensearch.action.index.IndexRequest; import org.opensearch.action.index.IndexResponse; import org.opensearch.action.support.WriteRequest; @@ -32,6 +31,7 @@ import org.opensearch.client.Client; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.ToXContent; diff --git a/plugin/src/main/java/org/opensearch/ml/task/MLTaskRunner.java b/plugin/src/main/java/org/opensearch/ml/task/MLTaskRunner.java index 925f71a6fc..f97731235f 100644 --- a/plugin/src/main/java/org/opensearch/ml/task/MLTaskRunner.java +++ b/plugin/src/main/java/org/opensearch/ml/task/MLTaskRunner.java @@ -10,8 +10,8 @@ import java.util.HashMap; import java.util.Map; -import org.opensearch.action.ActionListener; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.transport.TransportResponse; import org.opensearch.ml.breaker.MLCircuitBreakerService; import org.opensearch.ml.cluster.DiscoveryNodeHelper; diff --git a/plugin/src/main/java/org/opensearch/ml/task/MLTrainAndPredictTaskRunner.java b/plugin/src/main/java/org/opensearch/ml/task/MLTrainAndPredictTaskRunner.java index 30983171fa..09603d291e 100644 --- a/plugin/src/main/java/org/opensearch/ml/task/MLTrainAndPredictTaskRunner.java +++ b/plugin/src/main/java/org/opensearch/ml/task/MLTrainAndPredictTaskRunner.java @@ -10,11 +10,11 @@ import java.time.Instant; import java.util.UUID; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListenerResponseHandler; import org.opensearch.action.support.ThreadedActionListener; import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.breaker.MLCircuitBreakerService; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.MLTask; diff --git a/plugin/src/main/java/org/opensearch/ml/task/MLTrainingTaskRunner.java b/plugin/src/main/java/org/opensearch/ml/task/MLTrainingTaskRunner.java index f8937f9a0a..090afb445a 100644 --- a/plugin/src/main/java/org/opensearch/ml/task/MLTrainingTaskRunner.java +++ b/plugin/src/main/java/org/opensearch/ml/task/MLTrainingTaskRunner.java @@ -11,7 +11,6 @@ import java.time.Instant; import java.util.UUID; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListenerResponseHandler; import org.opensearch.action.index.IndexRequest; import org.opensearch.action.index.IndexResponse; @@ -21,6 +20,7 @@ import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; import org.opensearch.ml.breaker.MLCircuitBreakerService; diff --git a/plugin/src/main/java/org/opensearch/ml/utils/IndexUtils.java b/plugin/src/main/java/org/opensearch/ml/utils/IndexUtils.java index 2283ee8415..3bbfedb370 100644 --- a/plugin/src/main/java/org/opensearch/ml/utils/IndexUtils.java +++ b/plugin/src/main/java/org/opensearch/ml/utils/IndexUtils.java @@ -8,13 +8,13 @@ import java.util.List; import java.util.Locale; -import org.opensearch.action.ActionListener; import org.opensearch.action.admin.indices.stats.IndicesStatsRequest; import org.opensearch.client.Client; import org.opensearch.cluster.health.ClusterIndexHealth; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.inject.Inject; +import org.opensearch.core.action.ActionListener; public class IndexUtils { /** diff --git a/plugin/src/test/java/org/opensearch/ml/action/deploy/TransportDeployModelActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/deploy/TransportDeployModelActionTests.java index c783133387..3ed91048a2 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/deploy/TransportDeployModelActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/deploy/TransportDeployModelActionTests.java @@ -24,7 +24,6 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionType; import org.opensearch.action.index.IndexResponse; @@ -37,6 +36,7 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.FunctionName; diff --git a/plugin/src/test/java/org/opensearch/ml/action/deploy/TransportDeployModelOnNodeActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/deploy/TransportDeployModelOnNodeActionTests.java index d38d529466..6b8add6552 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/deploy/TransportDeployModelOnNodeActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/deploy/TransportDeployModelOnNodeActionTests.java @@ -31,7 +31,6 @@ import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListenerResponseHandler; import org.opensearch.action.FailedNodeException; import org.opensearch.action.support.ActionFilters; @@ -45,6 +44,7 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.transport.TransportAddress; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.breaker.MLCircuitBreakerService; diff --git a/plugin/src/test/java/org/opensearch/ml/action/forward/TransportForwardActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/forward/TransportForwardActionTests.java index 16f2ea804f..6347d1ec29 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/forward/TransportForwardActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/forward/TransportForwardActionTests.java @@ -38,13 +38,13 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.action.support.ActionFilters; import org.opensearch.client.Client; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.autoredeploy.MLModelAutoReDeployer; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.FunctionName; diff --git a/plugin/src/test/java/org/opensearch/ml/action/models/DeleteModelTransportActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/models/DeleteModelTransportActionTests.java index 65b96cb852..e45d689a28 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/models/DeleteModelTransportActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/models/DeleteModelTransportActionTests.java @@ -27,7 +27,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; import org.opensearch.action.bulk.BulkItemResponse; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.get.GetResponse; @@ -36,6 +35,7 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.ToXContent; diff --git a/plugin/src/test/java/org/opensearch/ml/action/models/GetModelTransportActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/models/GetModelTransportActionTests.java index 5262a565da..c369def7f9 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/models/GetModelTransportActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/models/GetModelTransportActionTests.java @@ -19,12 +19,12 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.get.GetResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.client.Client; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.common.transport.model.MLModelGetRequest; import org.opensearch.ml.common.transport.model.MLModelGetResponse; diff --git a/plugin/src/test/java/org/opensearch/ml/action/models/SearchModelTransportActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/models/SearchModelTransportActionTests.java index e0968d8d96..3b435da97d 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/models/SearchModelTransportActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/models/SearchModelTransportActionTests.java @@ -16,13 +16,13 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.OpenSearchStatusException; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.client.Client; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.index.IndexNotFoundException; diff --git a/plugin/src/test/java/org/opensearch/ml/action/register/TransportRegisterModelActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/register/TransportRegisterModelActionTests.java index 3d60f23731..d31198e85b 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/register/TransportRegisterModelActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/register/TransportRegisterModelActionTests.java @@ -19,7 +19,6 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListenerResponseHandler; import org.opensearch.action.index.IndexResponse; import org.opensearch.action.support.ActionFilters; @@ -29,6 +28,7 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.FunctionName; import org.opensearch.ml.common.model.MLModelFormat; diff --git a/plugin/src/test/java/org/opensearch/ml/action/tasks/DeleteTaskTransportActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/tasks/DeleteTaskTransportActionTests.java index 1f881b0234..5e14c76c0c 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/tasks/DeleteTaskTransportActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/tasks/DeleteTaskTransportActionTests.java @@ -19,7 +19,6 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.get.GetResponse; import org.opensearch.action.support.ActionFilters; @@ -27,6 +26,7 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.ToXContent; diff --git a/plugin/src/test/java/org/opensearch/ml/action/tasks/GetTaskTransportActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/tasks/GetTaskTransportActionTests.java index 420e1b79ed..83da0f8273 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/tasks/GetTaskTransportActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/tasks/GetTaskTransportActionTests.java @@ -19,12 +19,12 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.get.GetResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.client.Client; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.index.IndexNotFoundException; import org.opensearch.ml.common.transport.task.MLTaskGetRequest; diff --git a/plugin/src/test/java/org/opensearch/ml/action/tasks/SearchTaskTransportActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/tasks/SearchTaskTransportActionTests.java index c2dce539d2..70a8806652 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/tasks/SearchTaskTransportActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/tasks/SearchTaskTransportActionTests.java @@ -11,11 +11,11 @@ import org.junit.Before; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.client.Client; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.action.handler.MLSearchHandler; import org.opensearch.test.OpenSearchTestCase; diff --git a/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/MLModelChunkUploaderTests.java b/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/MLModelChunkUploaderTests.java index 5aec7d95d3..e6b561c68b 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/MLModelChunkUploaderTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/MLModelChunkUploaderTests.java @@ -19,7 +19,6 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.get.GetResponse; import org.opensearch.action.index.IndexResponse; import org.opensearch.client.Client; @@ -27,6 +26,7 @@ import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.commons.authuser.User; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.ToXContent; diff --git a/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/TransportRegisterModelMetaActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/TransportRegisterModelMetaActionTests.java index aba0f7f87d..55ff8418a8 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/TransportRegisterModelMetaActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/TransportRegisterModelMetaActionTests.java @@ -13,8 +13,8 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.support.ActionFilters; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.FunctionName; import org.opensearch.ml.common.model.MLModelFormat; import org.opensearch.ml.common.model.TextEmbeddingModelConfig; diff --git a/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/TransportUploadModelChunkActionTests.java b/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/TransportUploadModelChunkActionTests.java index e5cee2f768..d6be4fc843 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/TransportUploadModelChunkActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/upload_chunk/TransportUploadModelChunkActionTests.java @@ -13,8 +13,8 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.support.ActionFilters; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.common.transport.upload_chunk.MLUploadModelChunkInput; import org.opensearch.ml.common.transport.upload_chunk.MLUploadModelChunkRequest; import org.opensearch.ml.common.transport.upload_chunk.MLUploadModelChunkResponse; diff --git a/plugin/src/test/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployerTests.java b/plugin/src/test/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployerTests.java index 6c2be0a4a8..5f25b96f59 100644 --- a/plugin/src/test/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/autoredeploy/MLModelAutoReDeployerTests.java @@ -26,7 +26,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchAction; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.action.search.SearchResponse; @@ -39,6 +38,7 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.common.transport.TransportAddress; import org.opensearch.core.xcontent.ToXContent; diff --git a/plugin/src/test/java/org/opensearch/ml/cluster/MLSyncUpCronTests.java b/plugin/src/test/java/org/opensearch/ml/cluster/MLSyncUpCronTests.java index ccb1ef1e9a..6d45263d19 100644 --- a/plugin/src/test/java/org/opensearch/ml/cluster/MLSyncUpCronTests.java +++ b/plugin/src/test/java/org/opensearch/ml/cluster/MLSyncUpCronTests.java @@ -35,7 +35,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.action.bulk.BulkRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.SearchResponseSections; @@ -50,6 +49,7 @@ import org.opensearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.common.transport.TransportAddress; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/plugin/src/test/java/org/opensearch/ml/indices/MLIndicesHandlerTests.java b/plugin/src/test/java/org/opensearch/ml/indices/MLIndicesHandlerTests.java index 534a6f930c..9acb84633a 100644 --- a/plugin/src/test/java/org/opensearch/ml/indices/MLIndicesHandlerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/indices/MLIndicesHandlerTests.java @@ -23,7 +23,6 @@ import java.util.concurrent.ExecutionException; import org.junit.Before; -import org.opensearch.action.ActionListener; import org.opensearch.action.admin.indices.create.CreateIndexRequest; import org.opensearch.action.admin.indices.create.CreateIndexResponse; import org.opensearch.client.AdminClient; @@ -31,6 +30,7 @@ import org.opensearch.client.IndicesAdminClient; import org.opensearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.core.action.ActionListener; import org.opensearch.test.OpenSearchIntegTestCase; @OpenSearchIntegTestCase.ClusterScope(scope = OpenSearchIntegTestCase.Scope.TEST, numDataNodes = 2) diff --git a/plugin/src/test/java/org/opensearch/ml/indices/MLInputDatasetHandlerTests.java b/plugin/src/test/java/org/opensearch/ml/indices/MLInputDatasetHandlerTests.java index 264b0c9fbe..5ec2ab686c 100644 --- a/plugin/src/test/java/org/opensearch/ml/indices/MLInputDatasetHandlerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/indices/MLInputDatasetHandlerTests.java @@ -25,9 +25,9 @@ import org.junit.Rule; import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesArray; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.index.query.QueryBuilders; diff --git a/plugin/src/test/java/org/opensearch/ml/model/MLModelManagerTests.java b/plugin/src/test/java/org/opensearch/ml/model/MLModelManagerTests.java index 3746f45265..4d563bff42 100644 --- a/plugin/src/test/java/org/opensearch/ml/model/MLModelManagerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/model/MLModelManagerTests.java @@ -63,7 +63,6 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.index.IndexResponse; import org.opensearch.action.update.UpdateResponse; import org.opensearch.client.Client; @@ -71,6 +70,7 @@ import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.breaker.MLCircuitBreakerService; import org.opensearch.ml.breaker.ThresholdCircuitBreaker; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeleteModelActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeleteModelActionTests.java index b52f33d58e..e3ef6422d0 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeleteModelActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeleteModelActionTests.java @@ -18,10 +18,10 @@ import org.junit.Before; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opensearch.action.ActionListener; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.common.transport.model.MLModelDeleteAction; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeleteTaskActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeleteTaskActionTests.java index c6b8745a86..efa158f7aa 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeleteTaskActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeleteTaskActionTests.java @@ -18,10 +18,10 @@ import org.junit.Before; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opensearch.action.ActionListener; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.common.transport.task.MLTaskDeleteAction; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeployModelActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeployModelActionTests.java index 4e76b6dd68..eee7f39e87 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeployModelActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLDeployModelActionTests.java @@ -15,10 +15,10 @@ import org.junit.Ignore; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.common.bytes.BytesArray; import org.opensearch.core.xcontent.NamedXContentRegistry; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLExecuteActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLExecuteActionTests.java index bb3717fdf9..607f5aed86 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLExecuteActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLExecuteActionTests.java @@ -21,9 +21,9 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.ml.common.FunctionName; import org.opensearch.ml.common.input.Input; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLGetModelActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLGetModelActionTests.java index f951f6b92d..a17358e213 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLGetModelActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLGetModelActionTests.java @@ -20,9 +20,9 @@ import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.common.transport.model.MLModelGetAction; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLGetTaskActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLGetTaskActionTests.java index 365e7e3f18..51b718d8c3 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLGetTaskActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLGetTaskActionTests.java @@ -18,9 +18,9 @@ import org.junit.Before; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.ml.common.transport.task.*; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLPredictionActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLPredictionActionTests.java index 2932ca00bb..af56baa13f 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLPredictionActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLPredictionActionTests.java @@ -23,9 +23,9 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.ml.common.FunctionName; import org.opensearch.ml.common.MLModel; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLProfileActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLProfileActionTests.java index 2a6ce1f9f2..21d4c2592b 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLProfileActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLProfileActionTests.java @@ -32,7 +32,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; @@ -42,6 +41,7 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.commons.authuser.User; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.common.transport.TransportAddress; import org.opensearch.core.xcontent.NamedXContentRegistry; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLRegisterModelActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLRegisterModelActionTests.java index a385d85d85..6ddb0764fd 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLRegisterModelActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLRegisterModelActionTests.java @@ -17,10 +17,10 @@ import org.junit.Ignore; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.common.bytes.BytesArray; import org.opensearch.core.xcontent.NamedXContentRegistry; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLRegisterModelMetaActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLRegisterModelMetaActionTests.java index f53335612c..df8e35d49f 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLRegisterModelMetaActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLRegisterModelMetaActionTests.java @@ -20,10 +20,10 @@ import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.common.bytes.BytesArray; import org.opensearch.core.xcontent.NamedXContentRegistry; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLSearchModelActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLSearchModelActionTests.java index 728a0c902a..b679b73585 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLSearchModelActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLSearchModelActionTests.java @@ -24,7 +24,6 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.SearchResponseSections; @@ -32,6 +31,7 @@ import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.rest.RestStatus; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLStatsActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLStatsActionTests.java index 099b09d60d..c9173bffbb 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLStatsActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLStatsActionTests.java @@ -37,7 +37,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; @@ -46,6 +45,7 @@ import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.common.transport.TransportAddress; import org.opensearch.core.rest.RestStatus; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLTrainAndPredictActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLTrainAndPredictActionTests.java index ef2c9a3f38..7981a926c9 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLTrainAndPredictActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLTrainAndPredictActionTests.java @@ -20,9 +20,9 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.ml.common.MLTaskState; import org.opensearch.ml.common.input.MLInput; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLTrainingActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLTrainingActionTests.java index f795f7117e..b2b8e20e37 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLTrainingActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLTrainingActionTests.java @@ -23,9 +23,9 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.ml.common.MLTaskState; import org.opensearch.ml.common.input.MLInput; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLUndeployModelActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLUndeployModelActionTests.java index cb7aa041ff..f970a9200e 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLUndeployModelActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLUndeployModelActionTests.java @@ -21,13 +21,13 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.common.bytes.BytesArray; import org.opensearch.core.xcontent.NamedXContentRegistry; diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestMLUploadModelChunkActionTests.java b/plugin/src/test/java/org/opensearch/ml/rest/RestMLUploadModelChunkActionTests.java index 3e130d35a4..842e168a65 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestMLUploadModelChunkActionTests.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestMLUploadModelChunkActionTests.java @@ -17,9 +17,9 @@ import org.junit.Ignore; import org.mockito.ArgumentCaptor; import org.mockito.Mock; -import org.opensearch.action.ActionListener; import org.opensearch.client.node.NodeClient; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.Strings; import org.opensearch.core.common.bytes.BytesArray; import org.opensearch.core.xcontent.NamedXContentRegistry; diff --git a/plugin/src/test/java/org/opensearch/ml/task/MLExecuteTaskRunnerTests.java b/plugin/src/test/java/org/opensearch/ml/task/MLExecuteTaskRunnerTests.java index dcabf35adf..c278e069ce 100644 --- a/plugin/src/test/java/org/opensearch/ml/task/MLExecuteTaskRunnerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/task/MLExecuteTaskRunnerTests.java @@ -27,11 +27,11 @@ import org.junit.rules.ExpectedException; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.breaker.MLCircuitBreakerService; import org.opensearch.ml.cluster.DiscoveryNodeHelper; import org.opensearch.ml.common.FunctionName; diff --git a/plugin/src/test/java/org/opensearch/ml/task/MLPredictTaskRunnerTests.java b/plugin/src/test/java/org/opensearch/ml/task/MLPredictTaskRunnerTests.java index 8d2f926568..ce51a029e8 100644 --- a/plugin/src/test/java/org/opensearch/ml/task/MLPredictTaskRunnerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/task/MLPredictTaskRunnerTests.java @@ -23,7 +23,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.action.get.GetResponse; import org.opensearch.client.Client; import org.opensearch.cluster.node.DiscoveryNode; @@ -33,6 +32,7 @@ import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.commons.ConfigConstants; import org.opensearch.commons.authuser.User; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/plugin/src/test/java/org/opensearch/ml/task/MLTaskDispatcherTests.java b/plugin/src/test/java/org/opensearch/ml/task/MLTaskDispatcherTests.java index 02f907e081..e6e9357dc5 100644 --- a/plugin/src/test/java/org/opensearch/ml/task/MLTaskDispatcherTests.java +++ b/plugin/src/test/java/org/opensearch/ml/task/MLTaskDispatcherTests.java @@ -27,7 +27,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.client.Client; import org.opensearch.cluster.ClusterName; import org.opensearch.cluster.ClusterState; @@ -36,6 +35,7 @@ import org.opensearch.cluster.node.DiscoveryNodes; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.action.stats.MLStatsNodeResponse; import org.opensearch.ml.action.stats.MLStatsNodesAction; import org.opensearch.ml.action.stats.MLStatsNodesRequest; diff --git a/plugin/src/test/java/org/opensearch/ml/task/MLTaskManagerTests.java b/plugin/src/test/java/org/opensearch/ml/task/MLTaskManagerTests.java index 10e9e3c367..69b5f613b8 100644 --- a/plugin/src/test/java/org/opensearch/ml/task/MLTaskManagerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/task/MLTaskManagerTests.java @@ -27,13 +27,13 @@ import org.junit.Rule; import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; -import org.opensearch.action.ActionListener; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.update.UpdateRequest; import org.opensearch.action.update.UpdateResponse; import org.opensearch.client.Client; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.index.Index; import org.opensearch.core.index.shard.ShardId; import org.opensearch.ml.common.MLTask; diff --git a/plugin/src/test/java/org/opensearch/ml/task/MLTrainAndPredictTaskRunnerTests.java b/plugin/src/test/java/org/opensearch/ml/task/MLTrainAndPredictTaskRunnerTests.java index 0892ed2770..4a88c68cda 100644 --- a/plugin/src/test/java/org/opensearch/ml/task/MLTrainAndPredictTaskRunnerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/task/MLTrainAndPredictTaskRunnerTests.java @@ -27,11 +27,11 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.client.Client; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; +import org.opensearch.core.action.ActionListener; import org.opensearch.index.query.MatchAllQueryBuilder; import org.opensearch.ml.breaker.MLCircuitBreakerService; import org.opensearch.ml.cluster.DiscoveryNodeHelper; diff --git a/plugin/src/test/java/org/opensearch/ml/task/MLTrainingTaskRunnerTests.java b/plugin/src/test/java/org/opensearch/ml/task/MLTrainingTaskRunnerTests.java index 294e43dedb..8842818a59 100644 --- a/plugin/src/test/java/org/opensearch/ml/task/MLTrainingTaskRunnerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/task/MLTrainingTaskRunnerTests.java @@ -26,13 +26,13 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.opensearch.Version; -import org.opensearch.action.ActionListener; import org.opensearch.action.index.IndexResponse; import org.opensearch.client.Client; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.settings.Settings; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.index.Index; import org.opensearch.core.index.shard.ShardId; import org.opensearch.index.query.MatchAllQueryBuilder; diff --git a/plugin/src/test/java/org/opensearch/ml/task/TaskRunnerTests.java b/plugin/src/test/java/org/opensearch/ml/task/TaskRunnerTests.java index cc2edc88e6..98a536c155 100644 --- a/plugin/src/test/java/org/opensearch/ml/task/TaskRunnerTests.java +++ b/plugin/src/test/java/org/opensearch/ml/task/TaskRunnerTests.java @@ -25,8 +25,8 @@ import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opensearch.action.ActionListener; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.core.action.ActionListener; import org.opensearch.ml.breaker.MLCircuitBreakerService; import org.opensearch.ml.breaker.ThresholdCircuitBreaker; import org.opensearch.ml.cluster.DiscoveryNodeHelper; diff --git a/plugin/src/test/java/org/opensearch/ml/utils/IndexUtilsTests.java b/plugin/src/test/java/org/opensearch/ml/utils/IndexUtilsTests.java index f39514cb4f..5903841c95 100644 --- a/plugin/src/test/java/org/opensearch/ml/utils/IndexUtilsTests.java +++ b/plugin/src/test/java/org/opensearch/ml/utils/IndexUtilsTests.java @@ -6,8 +6,8 @@ package org.opensearch.ml.utils; import org.junit.Ignore; -import org.opensearch.action.ActionListener; import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.core.action.ActionListener; import org.opensearch.test.OpenSearchIntegTestCase; import com.google.common.collect.ImmutableMap; diff --git a/plugin/src/test/java/org/opensearch/ml/utils/MockHelper.java b/plugin/src/test/java/org/opensearch/ml/utils/MockHelper.java index 34b26ed4a9..c5be5613b3 100644 --- a/plugin/src/test/java/org/opensearch/ml/utils/MockHelper.java +++ b/plugin/src/test/java/org/opensearch/ml/utils/MockHelper.java @@ -18,12 +18,12 @@ import java.util.Collections; import java.util.concurrent.ExecutorService; -import org.opensearch.action.ActionListener; import org.opensearch.action.get.GetResponse; import org.opensearch.action.index.IndexResponse; import org.opensearch.action.update.UpdateResponse; import org.opensearch.client.Client; import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.index.get.GetResult; From 0bd84dd7a7e055aeb8b175cfa600af020f3ab617 Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Thu, 10 Aug 2023 18:17:33 -0700 Subject: [PATCH 2/3] adding missing action changes for actionfuture. Signed-off-by: Mitchell Gale --- .../java/org/opensearch/ml/action/MLCommonsIntegTestCase.java | 2 +- .../org/opensearch/ml/action/prediction/PredictionITTests.java | 2 +- .../java/org/opensearch/ml/action/stats/MLStatsNodeITTests.java | 2 +- .../src/test/java/org/opensearch/ml/utils/IntegTestUtils.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/src/test/java/org/opensearch/ml/action/MLCommonsIntegTestCase.java b/plugin/src/test/java/org/opensearch/ml/action/MLCommonsIntegTestCase.java index 517e9ae0ac..696ae15a28 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/MLCommonsIntegTestCase.java +++ b/plugin/src/test/java/org/opensearch/ml/action/MLCommonsIntegTestCase.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.Set; -import org.opensearch.action.ActionFuture; +import org.opensearch.common.action.ActionFuture; import org.opensearch.action.bulk.BulkRequest; import org.opensearch.action.index.IndexRequest; import org.opensearch.action.search.SearchRequest; diff --git a/plugin/src/test/java/org/opensearch/ml/action/prediction/PredictionITTests.java b/plugin/src/test/java/org/opensearch/ml/action/prediction/PredictionITTests.java index e2a618bd06..b0b7c379a3 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/prediction/PredictionITTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/prediction/PredictionITTests.java @@ -14,7 +14,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.rules.ExpectedException; -import org.opensearch.action.ActionFuture; +import org.opensearch.common.action.ActionFuture; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.ml.action.MLCommonsIntegTestCase; import org.opensearch.ml.common.FunctionName; diff --git a/plugin/src/test/java/org/opensearch/ml/action/stats/MLStatsNodeITTests.java b/plugin/src/test/java/org/opensearch/ml/action/stats/MLStatsNodeITTests.java index 9140619dc1..f68bec725a 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/stats/MLStatsNodeITTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/stats/MLStatsNodeITTests.java @@ -16,7 +16,7 @@ import java.util.concurrent.ExecutionException; import org.junit.Before; -import org.opensearch.action.ActionFuture; +import org.opensearch.common.action.ActionFuture; import org.opensearch.ml.plugin.MachineLearningPlugin; import org.opensearch.ml.stats.MLStatsInput; import org.opensearch.plugins.Plugin; diff --git a/plugin/src/test/java/org/opensearch/ml/utils/IntegTestUtils.java b/plugin/src/test/java/org/opensearch/ml/utils/IntegTestUtils.java index 511cad9655..b717973579 100644 --- a/plugin/src/test/java/org/opensearch/ml/utils/IntegTestUtils.java +++ b/plugin/src/test/java/org/opensearch/ml/utils/IntegTestUtils.java @@ -13,7 +13,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -import org.opensearch.action.ActionFuture; +import org.opensearch.common.action.ActionFuture; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.index.IndexAction; import org.opensearch.action.index.IndexRequest; From ff46b901bc8dd917b2cb88e3bf1ddb7042a2bd5b Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Thu, 10 Aug 2023 18:18:49 -0700 Subject: [PATCH 3/3] Spotless apply. Signed-off-by: Mitchell Gale --- .../java/org/opensearch/ml/action/MLCommonsIntegTestCase.java | 2 +- .../org/opensearch/ml/action/prediction/PredictionITTests.java | 2 +- .../src/test/java/org/opensearch/ml/utils/IntegTestUtils.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/src/test/java/org/opensearch/ml/action/MLCommonsIntegTestCase.java b/plugin/src/test/java/org/opensearch/ml/action/MLCommonsIntegTestCase.java index 696ae15a28..bf197c18ac 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/MLCommonsIntegTestCase.java +++ b/plugin/src/test/java/org/opensearch/ml/action/MLCommonsIntegTestCase.java @@ -18,7 +18,6 @@ import java.util.Map; import java.util.Set; -import org.opensearch.common.action.ActionFuture; import org.opensearch.action.bulk.BulkRequest; import org.opensearch.action.index.IndexRequest; import org.opensearch.action.search.SearchRequest; @@ -26,6 +25,7 @@ import org.opensearch.action.support.WriteRequest; import org.opensearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.common.action.ActionFuture; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentType; import org.opensearch.index.query.QueryBuilder; diff --git a/plugin/src/test/java/org/opensearch/ml/action/prediction/PredictionITTests.java b/plugin/src/test/java/org/opensearch/ml/action/prediction/PredictionITTests.java index b0b7c379a3..f793c4bab0 100644 --- a/plugin/src/test/java/org/opensearch/ml/action/prediction/PredictionITTests.java +++ b/plugin/src/test/java/org/opensearch/ml/action/prediction/PredictionITTests.java @@ -14,8 +14,8 @@ import org.junit.Before; import org.junit.Rule; import org.junit.rules.ExpectedException; -import org.opensearch.common.action.ActionFuture; import org.opensearch.action.ActionRequestValidationException; +import org.opensearch.common.action.ActionFuture; import org.opensearch.ml.action.MLCommonsIntegTestCase; import org.opensearch.ml.common.FunctionName; import org.opensearch.ml.common.MLModel; diff --git a/plugin/src/test/java/org/opensearch/ml/utils/IntegTestUtils.java b/plugin/src/test/java/org/opensearch/ml/utils/IntegTestUtils.java index b717973579..7608e6ab55 100644 --- a/plugin/src/test/java/org/opensearch/ml/utils/IntegTestUtils.java +++ b/plugin/src/test/java/org/opensearch/ml/utils/IntegTestUtils.java @@ -13,7 +13,6 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; -import org.opensearch.common.action.ActionFuture; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.index.IndexAction; import org.opensearch.action.index.IndexRequest; @@ -22,6 +21,7 @@ import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.support.WriteRequest; +import org.opensearch.common.action.ActionFuture; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.xcontent.XContentType; import org.opensearch.core.rest.RestStatus;