diff --git a/src/main/java/org/opensearch/search/asynchronous/context/active/AsynchronousSearchActiveContext.java b/src/main/java/org/opensearch/search/asynchronous/context/active/AsynchronousSearchActiveContext.java index 89189a29..aee08a7b 100644 --- a/src/main/java/org/opensearch/search/asynchronous/context/active/AsynchronousSearchActiveContext.java +++ b/src/main/java/org/opensearch/search/asynchronous/context/active/AsynchronousSearchActiveContext.java @@ -14,7 +14,7 @@ import org.opensearch.search.asynchronous.id.AsynchronousSearchIdConverter; import org.opensearch.search.asynchronous.listener.AsynchronousSearchProgressListener; import org.opensearch.common.SetOnce; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.search.SearchProgressActionListener; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.SearchTask; diff --git a/src/main/java/org/opensearch/search/asynchronous/context/permits/AsynchronousSearchContextPermits.java b/src/main/java/org/opensearch/search/asynchronous/context/permits/AsynchronousSearchContextPermits.java index 962d946d..66acadc8 100644 --- a/src/main/java/org/opensearch/search/asynchronous/context/permits/AsynchronousSearchContextPermits.java +++ b/src/main/java/org/opensearch/search/asynchronous/context/permits/AsynchronousSearchContextPermits.java @@ -12,7 +12,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.common.lease.Releasable; import org.opensearch.common.unit.TimeValue; import org.opensearch.common.util.concurrent.AbstractRunnable; diff --git a/src/main/java/org/opensearch/search/asynchronous/context/permits/NoopAsynchronousSearchContextPermits.java b/src/main/java/org/opensearch/search/asynchronous/context/permits/NoopAsynchronousSearchContextPermits.java index c885d0b5..40c004c4 100644 --- a/src/main/java/org/opensearch/search/asynchronous/context/permits/NoopAsynchronousSearchContextPermits.java +++ b/src/main/java/org/opensearch/search/asynchronous/context/permits/NoopAsynchronousSearchContextPermits.java @@ -7,7 +7,7 @@ import org.opensearch.search.asynchronous.context.AsynchronousSearchContextId; import org.opensearch.search.asynchronous.context.active.AsynchronousSearchContextClosedException; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.common.lease.Releasable; import org.opensearch.common.unit.TimeValue; diff --git a/src/main/java/org/opensearch/search/asynchronous/context/state/event/SearchStartedEvent.java b/src/main/java/org/opensearch/search/asynchronous/context/state/event/SearchStartedEvent.java index d0eb952b..eafdeaa0 100644 --- a/src/main/java/org/opensearch/search/asynchronous/context/state/event/SearchStartedEvent.java +++ b/src/main/java/org/opensearch/search/asynchronous/context/state/event/SearchStartedEvent.java @@ -7,7 +7,7 @@ import org.opensearch.search.asynchronous.context.AsynchronousSearchContext; import org.opensearch.search.asynchronous.context.state.AsynchronousSearchContextEvent; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.search.SearchTask; diff --git a/src/main/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchTimeoutWrapper.java b/src/main/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchTimeoutWrapper.java index 3efe8c20..5efbfaa2 100644 --- a/src/main/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchTimeoutWrapper.java +++ b/src/main/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchTimeoutWrapper.java @@ -7,7 +7,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.common.unit.TimeValue; import org.opensearch.threadpool.Scheduler; import org.opensearch.threadpool.ThreadPool; diff --git a/src/main/java/org/opensearch/search/asynchronous/listener/CompositeSearchProgressActionListener.java b/src/main/java/org/opensearch/search/asynchronous/listener/CompositeSearchProgressActionListener.java index 16450b8e..b4b8ea4e 100644 --- a/src/main/java/org/opensearch/search/asynchronous/listener/CompositeSearchProgressActionListener.java +++ b/src/main/java/org/opensearch/search/asynchronous/listener/CompositeSearchProgressActionListener.java @@ -5,7 +5,7 @@ package org.opensearch.search.asynchronous.listener; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.search.SearchProgressActionListener; import java.util.ArrayList; diff --git a/src/main/java/org/opensearch/search/asynchronous/listener/PrioritizedActionListener.java b/src/main/java/org/opensearch/search/asynchronous/listener/PrioritizedActionListener.java index aba66c5b..2c6954b1 100644 --- a/src/main/java/org/opensearch/search/asynchronous/listener/PrioritizedActionListener.java +++ b/src/main/java/org/opensearch/search/asynchronous/listener/PrioritizedActionListener.java @@ -6,7 +6,7 @@ package org.opensearch.search.asynchronous.listener; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; public interface PrioritizedActionListener extends ActionListener { diff --git a/src/main/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementService.java b/src/main/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementService.java index 02e2aa47..30df51a2 100644 --- a/src/main/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementService.java +++ b/src/main/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementService.java @@ -14,7 +14,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.cluster.ClusterChangedEvent; diff --git a/src/main/java/org/opensearch/search/asynchronous/plugin/AsynchronousSearchPlugin.java b/src/main/java/org/opensearch/search/asynchronous/plugin/AsynchronousSearchPlugin.java index a457fa6e..9590c734 100644 --- a/src/main/java/org/opensearch/search/asynchronous/plugin/AsynchronousSearchPlugin.java +++ b/src/main/java/org/opensearch/search/asynchronous/plugin/AsynchronousSearchPlugin.java @@ -24,7 +24,7 @@ import org.opensearch.search.asynchronous.transport.TransportGetAsynchronousSearchAction; import org.opensearch.search.asynchronous.transport.TransportSubmitAsynchronousSearchAction; import org.opensearch.action.ActionRequest; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.client.Client; import org.opensearch.cluster.metadata.IndexNameExpressionResolver; import org.opensearch.cluster.node.DiscoveryNodes; diff --git a/src/main/java/org/opensearch/search/asynchronous/processor/AsynchronousSearchPostProcessor.java b/src/main/java/org/opensearch/search/asynchronous/processor/AsynchronousSearchPostProcessor.java index 534e7cdd..7ac320b4 100644 --- a/src/main/java/org/opensearch/search/asynchronous/processor/AsynchronousSearchPostProcessor.java +++ b/src/main/java/org/opensearch/search/asynchronous/processor/AsynchronousSearchPostProcessor.java @@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.opensearch.ExceptionsHelper; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.search.SearchResponse; import org.opensearch.cluster.service.ClusterService; import org.opensearch.common.unit.TimeValue; diff --git a/src/main/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequest.java b/src/main/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequest.java index 21897e0a..b17d423e 100644 --- a/src/main/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequest.java +++ b/src/main/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequest.java @@ -14,7 +14,7 @@ import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.io.stream.StreamOutput; import org.opensearch.common.unit.TimeValue; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import java.io.IOException; import java.util.Map; diff --git a/src/main/java/org/opensearch/search/asynchronous/response/AcknowledgedResponse.java b/src/main/java/org/opensearch/search/asynchronous/response/AcknowledgedResponse.java index 5e9af3a6..dad0c7db 100644 --- a/src/main/java/org/opensearch/search/asynchronous/response/AcknowledgedResponse.java +++ b/src/main/java/org/opensearch/search/asynchronous/response/AcknowledgedResponse.java @@ -5,7 +5,7 @@ package org.opensearch.search.asynchronous.response; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.common.xcontent.StatusToXContentObject; import org.opensearch.core.ParseField; import org.opensearch.core.common.io.stream.StreamInput; diff --git a/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java b/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java index 39774ca2..5c29834a 100644 --- a/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java +++ b/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java @@ -6,13 +6,12 @@ package org.opensearch.search.asynchronous.response; import org.opensearch.common.xcontent.StatusToXContentObject; -import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.XContentType; import org.opensearch.core.ParseField; import org.opensearch.search.asynchronous.context.state.AsynchronousSearchState; import org.opensearch.OpenSearchException; import org.opensearch.ExceptionsHelper; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Requests; import org.opensearch.common.Nullable; @@ -218,7 +217,8 @@ private Map getErrorAsMap(OpenSearchException exception) throws private Map getResponseAsMap(SearchResponse searchResponse) throws IOException { if (searchResponse != null) { - BytesReference response = XContentHelper.toXContent(searchResponse, Requests.INDEX_CONTENT_TYPE, true); + BytesReference response = org.opensearch.core.xcontent.XContentHelper.toXContent( + searchResponse, Requests.INDEX_CONTENT_TYPE,true); if (response == null) { return emptyMap(); } diff --git a/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPersistenceService.java b/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPersistenceService.java index a069e288..86c79292 100644 --- a/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPersistenceService.java +++ b/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPersistenceService.java @@ -16,7 +16,7 @@ import org.opensearch.ExceptionsHelper; import org.opensearch.ResourceAlreadyExistsException; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.bulk.BackoffPolicy; import org.opensearch.action.delete.DeleteRequest; diff --git a/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchService.java b/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchService.java index 7092e1a8..516fec3a 100644 --- a/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchService.java +++ b/src/main/java/org/opensearch/search/asynchronous/service/AsynchronousSearchService.java @@ -12,7 +12,7 @@ import org.opensearch.OpenSearchSecurityException; import org.opensearch.OpenSearchTimeoutException; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest; import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse; import org.opensearch.action.search.SearchAction; @@ -58,7 +58,7 @@ import org.opensearch.search.asynchronous.stats.AsynchronousSearchStats; import org.opensearch.search.asynchronous.stats.InternalAsynchronousSearchStats; import org.opensearch.search.asynchronous.utils.AsynchronousSearchExceptionUtils; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.threadpool.ThreadPool; import java.util.Collections; @@ -75,8 +75,8 @@ import java.util.function.Supplier; import java.util.stream.Collectors; -import static org.opensearch.action.ActionListener.runAfter; -import static org.opensearch.action.ActionListener.wrap; +import static org.opensearch.core.action.ActionListener.runAfter; +import static org.opensearch.core.action.ActionListener.wrap; import static org.opensearch.search.asynchronous.context.state.AsynchronousSearchState.CLOSED; import static org.opensearch.search.asynchronous.context.state.AsynchronousSearchState.FAILED; import static org.opensearch.search.asynchronous.context.state.AsynchronousSearchState.INIT; diff --git a/src/main/java/org/opensearch/search/asynchronous/task/AsynchronousSearchTask.java b/src/main/java/org/opensearch/search/asynchronous/task/AsynchronousSearchTask.java index 42094959..fd6d0dff 100644 --- a/src/main/java/org/opensearch/search/asynchronous/task/AsynchronousSearchTask.java +++ b/src/main/java/org/opensearch/search/asynchronous/task/AsynchronousSearchTask.java @@ -12,7 +12,7 @@ import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchTask; import org.opensearch.core.common.Strings; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import java.util.Map; import java.util.Objects; diff --git a/src/main/java/org/opensearch/search/asynchronous/task/SubmitAsynchronousSearchTask.java b/src/main/java/org/opensearch/search/asynchronous/task/SubmitAsynchronousSearchTask.java index cd5dfedd..57daf100 100644 --- a/src/main/java/org/opensearch/search/asynchronous/task/SubmitAsynchronousSearchTask.java +++ b/src/main/java/org/opensearch/search/asynchronous/task/SubmitAsynchronousSearchTask.java @@ -7,7 +7,7 @@ import org.opensearch.search.asynchronous.request.SubmitAsynchronousSearchRequest; import org.opensearch.tasks.CancellableTask; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import java.util.Map; diff --git a/src/main/java/org/opensearch/search/asynchronous/transport/TransportAsynchronousSearchRoutingAction.java b/src/main/java/org/opensearch/search/asynchronous/transport/TransportAsynchronousSearchRoutingAction.java index 51ab1e1e..3aa10379 100644 --- a/src/main/java/org/opensearch/search/asynchronous/transport/TransportAsynchronousSearchRoutingAction.java +++ b/src/main/java/org/opensearch/search/asynchronous/transport/TransportAsynchronousSearchRoutingAction.java @@ -15,9 +15,9 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionListenerResponseHandler; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; import org.opensearch.client.Client; diff --git a/src/main/java/org/opensearch/search/asynchronous/transport/TransportDeleteAsynchronousSearchAction.java b/src/main/java/org/opensearch/search/asynchronous/transport/TransportDeleteAsynchronousSearchAction.java index 235d33ce..14e70f69 100644 --- a/src/main/java/org/opensearch/search/asynchronous/transport/TransportDeleteAsynchronousSearchAction.java +++ b/src/main/java/org/opensearch/search/asynchronous/transport/TransportDeleteAsynchronousSearchAction.java @@ -14,7 +14,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.support.ActionFilters; import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; diff --git a/src/main/java/org/opensearch/search/asynchronous/transport/TransportGetAsynchronousSearchAction.java b/src/main/java/org/opensearch/search/asynchronous/transport/TransportGetAsynchronousSearchAction.java index a1e76d2d..3ec7f631 100644 --- a/src/main/java/org/opensearch/search/asynchronous/transport/TransportGetAsynchronousSearchAction.java +++ b/src/main/java/org/opensearch/search/asynchronous/transport/TransportGetAsynchronousSearchAction.java @@ -18,7 +18,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.support.ActionFilters; import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; diff --git a/src/main/java/org/opensearch/search/asynchronous/transport/TransportSubmitAsynchronousSearchAction.java b/src/main/java/org/opensearch/search/asynchronous/transport/TransportSubmitAsynchronousSearchAction.java index 1e35d960..780157cf 100644 --- a/src/main/java/org/opensearch/search/asynchronous/transport/TransportSubmitAsynchronousSearchAction.java +++ b/src/main/java/org/opensearch/search/asynchronous/transport/TransportSubmitAsynchronousSearchAction.java @@ -21,7 +21,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchTask; import org.opensearch.action.search.TransportSearchAction; @@ -31,7 +31,7 @@ import org.opensearch.common.inject.Inject; import org.opensearch.search.SearchService; import org.opensearch.tasks.Task; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.threadpool.ThreadPool; import org.opensearch.transport.TransportService; diff --git a/src/test/java/org/opensearch/search/asynchronous/commons/AsynchronousSearchIntegTestCase.java b/src/test/java/org/opensearch/search/asynchronous/commons/AsynchronousSearchIntegTestCase.java index af67b699..d429f1ea 100644 --- a/src/test/java/org/opensearch/search/asynchronous/commons/AsynchronousSearchIntegTestCase.java +++ b/src/test/java/org/opensearch/search/asynchronous/commons/AsynchronousSearchIntegTestCase.java @@ -28,7 +28,7 @@ import org.opensearch.plugins.PluginsService; import org.opensearch.script.MockScriptPlugin; import org.opensearch.search.lookup.LeafFieldsLookup; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.OpenSearchIntegTestCase; import java.util.ArrayList; diff --git a/src/test/java/org/opensearch/search/asynchronous/commons/AsynchronousSearchSingleNodeTestCase.java b/src/test/java/org/opensearch/search/asynchronous/commons/AsynchronousSearchSingleNodeTestCase.java index d337f1e8..80d1b1c6 100644 --- a/src/test/java/org/opensearch/search/asynchronous/commons/AsynchronousSearchSingleNodeTestCase.java +++ b/src/test/java/org/opensearch/search/asynchronous/commons/AsynchronousSearchSingleNodeTestCase.java @@ -22,8 +22,8 @@ import org.apache.lucene.search.TotalHits; import org.junit.After; import org.junit.Before; -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.get.GetRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.ShardSearchFailure; diff --git a/src/test/java/org/opensearch/search/asynchronous/context/active/AsynchronousSearchActiveContextTests.java b/src/test/java/org/opensearch/search/asynchronous/context/active/AsynchronousSearchActiveContextTests.java index c7b4db18..dbd71023 100644 --- a/src/test/java/org/opensearch/search/asynchronous/context/active/AsynchronousSearchActiveContextTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/context/active/AsynchronousSearchActiveContextTests.java @@ -29,7 +29,7 @@ import org.opensearch.search.internal.InternalSearchResponse; import org.opensearch.search.profile.SearchProfileShardResults; import org.opensearch.search.suggest.Suggest; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.threadpool.ScalingExecutorBuilder; import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; diff --git a/src/test/java/org/opensearch/search/asynchronous/context/permits/AsynchronousSearchContextPermitsTests.java b/src/test/java/org/opensearch/search/asynchronous/context/permits/AsynchronousSearchContextPermitsTests.java index 0c866d06..ea5431f3 100644 --- a/src/test/java/org/opensearch/search/asynchronous/context/permits/AsynchronousSearchContextPermitsTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/context/permits/AsynchronousSearchContextPermitsTests.java @@ -7,7 +7,7 @@ import org.opensearch.search.asynchronous.context.AsynchronousSearchContextId; import org.opensearch.search.asynchronous.plugin.AsynchronousSearchPlugin; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.support.PlainActionFuture; import org.opensearch.common.CheckedRunnable; diff --git a/src/test/java/org/opensearch/search/asynchronous/context/permits/NoopAsynchronousSearchContextPermitsTests.java b/src/test/java/org/opensearch/search/asynchronous/context/permits/NoopAsynchronousSearchContextPermitsTests.java index 5c5d27a3..69db6df8 100644 --- a/src/test/java/org/opensearch/search/asynchronous/context/permits/NoopAsynchronousSearchContextPermitsTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/context/permits/NoopAsynchronousSearchContextPermitsTests.java @@ -7,7 +7,7 @@ import org.opensearch.search.asynchronous.context.AsynchronousSearchContextId; import org.opensearch.search.asynchronous.context.active.AsynchronousSearchContextClosedException; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.LatchedActionListener; import org.opensearch.common.unit.TimeValue; import org.opensearch.test.OpenSearchTestCase; diff --git a/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchRejectionIT.java b/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchRejectionIT.java index 53304334..58ec7451 100644 --- a/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchRejectionIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchRejectionIT.java @@ -19,7 +19,7 @@ import org.opensearch.OpenSearchTimeoutException; import org.opensearch.ExceptionsHelper; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.search.SearchAction; import org.opensearch.action.search.SearchPhaseExecutionException; @@ -34,7 +34,7 @@ import org.opensearch.index.query.QueryBuilders; import org.opensearch.search.SearchService; import org.opensearch.search.aggregations.InternalAggregation; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.test.junit.annotations.TestLogging; import org.opensearch.threadpool.TestThreadPool; diff --git a/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchTaskCancellationIT.java b/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchTaskCancellationIT.java index 9d915860..37f30576 100644 --- a/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchTaskCancellationIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/integTests/AsynchronousSearchTaskCancellationIT.java @@ -11,7 +11,7 @@ import org.opensearch.search.asynchronous.plugin.AsynchronousSearchPlugin; import org.opensearch.search.asynchronous.request.SubmitAsynchronousSearchRequest; import org.opensearch.search.asynchronous.response.AsynchronousSearchResponse; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse; import org.opensearch.action.admin.cluster.node.tasks.list.ListTasksResponse; import org.opensearch.action.bulk.BulkRequestBuilder; diff --git a/src/test/java/org/opensearch/search/asynchronous/integTests/DeleteAsynchronousSearchSingleNodeIT.java b/src/test/java/org/opensearch/search/asynchronous/integTests/DeleteAsynchronousSearchSingleNodeIT.java index 5ec3d8c0..a4ed93fd 100644 --- a/src/test/java/org/opensearch/search/asynchronous/integTests/DeleteAsynchronousSearchSingleNodeIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/integTests/DeleteAsynchronousSearchSingleNodeIT.java @@ -11,7 +11,7 @@ import org.opensearch.search.asynchronous.response.AcknowledgedResponse; import org.opensearch.search.asynchronous.response.AsynchronousSearchResponse; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.common.TriConsumer; diff --git a/src/test/java/org/opensearch/search/asynchronous/integTests/GetAsynchronousSearchSingleNodeIT.java b/src/test/java/org/opensearch/search/asynchronous/integTests/GetAsynchronousSearchSingleNodeIT.java index ebb5eb35..bd64e20e 100644 --- a/src/test/java/org/opensearch/search/asynchronous/integTests/GetAsynchronousSearchSingleNodeIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/integTests/GetAsynchronousSearchSingleNodeIT.java @@ -14,7 +14,7 @@ import org.opensearch.search.asynchronous.utils.QuadConsumer; import org.opensearch.OpenSearchTimeoutException; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.common.TriConsumer; diff --git a/src/test/java/org/opensearch/search/asynchronous/integTests/MixedOperationSingleNodeIT.java b/src/test/java/org/opensearch/search/asynchronous/integTests/MixedOperationSingleNodeIT.java index 21a90010..d319875f 100644 --- a/src/test/java/org/opensearch/search/asynchronous/integTests/MixedOperationSingleNodeIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/integTests/MixedOperationSingleNodeIT.java @@ -14,7 +14,7 @@ import org.opensearch.search.asynchronous.utils.QuadConsumer; import org.opensearch.OpenSearchTimeoutException; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.common.unit.TimeValue; diff --git a/src/test/java/org/opensearch/search/asynchronous/integTests/SubmitAsynchronousSearchSingleNodeIT.java b/src/test/java/org/opensearch/search/asynchronous/integTests/SubmitAsynchronousSearchSingleNodeIT.java index 8ff0fae6..1d820a9f 100644 --- a/src/test/java/org/opensearch/search/asynchronous/integTests/SubmitAsynchronousSearchSingleNodeIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/integTests/SubmitAsynchronousSearchSingleNodeIT.java @@ -15,7 +15,7 @@ import org.opensearch.search.asynchronous.response.AsynchronousSearchResponse; import org.opensearch.search.asynchronous.service.AsynchronousSearchService; import org.opensearch.search.asynchronous.utils.AsynchronousSearchAssertions; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; diff --git a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchCancellationIT.java b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchCancellationIT.java index 93c3be97..7a27a854 100644 --- a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchCancellationIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchCancellationIT.java @@ -24,7 +24,7 @@ import org.opensearch.script.ScriptType; import org.opensearch.search.SearchService; import org.opensearch.search.aggregations.InternalAggregation; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.tasks.TaskInfo; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.threadpool.TestThreadPool; diff --git a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java index deace270..804fa882 100644 --- a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchPartialResponseIT.java @@ -21,7 +21,7 @@ import org.opensearch.search.aggregations.InternalAggregation; import org.opensearch.search.aggregations.InternalAggregations; import org.opensearch.search.aggregations.bucket.terms.Terms; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.OpenSearchIntegTestCase; import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; diff --git a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListenerIT.java b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListenerIT.java index 48fba6fd..74273d89 100644 --- a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListenerIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchProgressListenerIT.java @@ -23,7 +23,7 @@ import org.opensearch.search.builder.SearchSourceBuilder; import org.opensearch.search.sort.FieldSortBuilder; import org.opensearch.search.sort.SortOrder; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.OpenSearchSingleNodeTestCase; import org.opensearch.threadpool.TestThreadPool; import org.opensearch.threadpool.ThreadPool; diff --git a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchTimeoutWrapperTests.java b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchTimeoutWrapperTests.java index c4609b2f..5be5a85c 100644 --- a/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchTimeoutWrapperTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/listener/AsynchronousSearchTimeoutWrapperTests.java @@ -6,7 +6,7 @@ package org.opensearch.search.asynchronous.listener; import org.opensearch.search.asynchronous.plugin.AsynchronousSearchPlugin; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.cluster.coordination.DeterministicTaskQueue; import org.opensearch.common.settings.Settings; import org.opensearch.common.unit.TimeValue; diff --git a/src/test/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementServiceIT.java b/src/test/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementServiceIT.java index abf0224b..e1cc44d2 100644 --- a/src/test/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementServiceIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/management/AsynchronousSearchManagementServiceIT.java @@ -19,7 +19,7 @@ import org.opensearch.search.asynchronous.response.AcknowledgedResponse; import org.opensearch.search.asynchronous.response.AsynchronousSearchResponse; import org.opensearch.search.asynchronous.task.AsynchronousSearchTask; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.bulk.BulkRequestBuilder; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.support.WriteRequest; @@ -33,7 +33,7 @@ import org.opensearch.script.Script; import org.opensearch.script.ScriptType; import org.opensearch.search.SearchService; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.OpenSearchIntegTestCase; import java.util.Arrays; diff --git a/src/test/java/org/opensearch/search/asynchronous/request/AsynchronousSearchRequestRoutingIT.java b/src/test/java/org/opensearch/search/asynchronous/request/AsynchronousSearchRequestRoutingIT.java index 7c152d0f..7991cc75 100644 --- a/src/test/java/org/opensearch/search/asynchronous/request/AsynchronousSearchRequestRoutingIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/request/AsynchronousSearchRequestRoutingIT.java @@ -15,7 +15,7 @@ import org.opensearch.search.asynchronous.response.AcknowledgedResponse; import org.opensearch.search.asynchronous.response.AsynchronousSearchResponse; import org.opensearch.search.asynchronous.utils.TestClientUtils; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.search.SearchRequest; import org.opensearch.cluster.health.ClusterHealthStatus; diff --git a/src/test/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequestTests.java b/src/test/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequestTests.java index 999485fe..21cd12b3 100644 --- a/src/test/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequestTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequestTests.java @@ -11,7 +11,7 @@ import org.opensearch.common.unit.TimeValue; import org.opensearch.search.builder.SearchSourceBuilder; import org.opensearch.search.suggest.SuggestBuilder; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.OpenSearchTestCase; import java.util.HashMap; diff --git a/src/test/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponseTests.java b/src/test/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponseTests.java index 1f527a73..385b5844 100644 --- a/src/test/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponseTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponseTests.java @@ -7,7 +7,7 @@ import org.opensearch.common.xcontent.LoggingDeprecationHandler; import org.opensearch.common.xcontent.XContentHelper; -import org.opensearch.common.xcontent.XContentType; +import org.opensearch.core.xcontent.MediaType; import org.opensearch.search.asynchronous.context.state.AsynchronousSearchState; import org.apache.lucene.search.TotalHits; import org.opensearch.action.search.SearchResponse; @@ -30,8 +30,6 @@ import java.util.Collections; import java.util.UUID; -import static org.opensearch.common.xcontent.XContentHelper.toXContent; - public class AsynchronousSearchResponseTests extends AbstractSerializingTestCase { @Override @@ -90,8 +88,9 @@ public void testXContentRoundTripForAsynchronousSearchResponseContainingError() randomNonNegativeLong(), randomNonNegativeLong(), null, new RuntimeException("test")); BytesReference serializedResponse; - XContentType xContentType = Requests.INDEX_CONTENT_TYPE; - serializedResponse = toXContent(asResponse, xContentType, true); + MediaType xContentType = Requests.INDEX_CONTENT_TYPE; + + serializedResponse = org.opensearch.core.xcontent.XContentHelper.toXContent(asResponse, xContentType, true); try (XContentParser parser = XContentHelper.createParser(NamedXContentRegistry.EMPTY, LoggingDeprecationHandler.INSTANCE, serializedResponse, xContentType)) { AsynchronousSearchResponse asResponse1 = AsynchronousSearchResponse.fromXContent(parser); diff --git a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPostProcessorTests.java b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPostProcessorTests.java index 2d8b9e20..7aeedb16 100644 --- a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPostProcessorTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchPostProcessorTests.java @@ -20,9 +20,9 @@ import org.opensearch.search.asynchronous.utils.AsynchronousSearchAssertions; import org.apache.lucene.search.TotalHits; import org.opensearch.Version; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionRequest; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.ActionType; import org.opensearch.action.index.IndexAction; import org.opensearch.action.search.SearchPhaseExecutionException; diff --git a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceFreeContextTests.java b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceFreeContextTests.java index f4998782..f9ed251b 100644 --- a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceFreeContextTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceFreeContextTests.java @@ -20,9 +20,9 @@ import org.opensearch.OpenSearchTimeoutException; import org.opensearch.ResourceNotFoundException; import org.opensearch.Version; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionRequest; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.ActionType; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.LatchedActionListener; @@ -55,7 +55,7 @@ import org.opensearch.search.internal.InternalSearchResponse; import org.opensearch.search.profile.SearchProfileShardResults; import org.opensearch.search.suggest.Suggest; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.ClusterServiceUtils; import org.opensearch.test.OpenSearchTestCase; import org.opensearch.test.client.NoOpClient; @@ -82,7 +82,7 @@ import static org.opensearch.search.asynchronous.commons.AsynchronousSearchTestCase.mockAsynchronousSearchProgressListener; import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; -import static org.opensearch.action.ActionListener.wrap; +import static org.opensearch.core.action.ActionListener.wrap; import static org.opensearch.common.unit.TimeValue.timeValueDays; import static org.opensearch.common.unit.TimeValue.timeValueHours; import static org.mockito.ArgumentMatchers.any; diff --git a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceTests.java b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceTests.java index db9a7739..c37f4eeb 100644 --- a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceTests.java @@ -21,9 +21,9 @@ import org.opensearch.OpenSearchTimeoutException; import org.opensearch.ResourceNotFoundException; import org.opensearch.Version; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionRequest; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.ActionType; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.index.IndexAction; @@ -48,7 +48,7 @@ import org.opensearch.search.internal.InternalSearchResponse; import org.opensearch.search.profile.SearchProfileShardResults; import org.opensearch.search.suggest.Suggest; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.ClusterServiceUtils; import org.opensearch.test.OpenSearchTestCase; import org.opensearch.test.client.NoOpClient; @@ -70,7 +70,7 @@ import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; -import static org.opensearch.action.ActionListener.wrap; +import static org.opensearch.core.action.ActionListener.wrap; import static org.opensearch.common.unit.TimeValue.timeValueHours; import static org.hamcrest.Matchers.greaterThan; diff --git a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceUpdateContextTests.java b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceUpdateContextTests.java index b7783c13..5c9e44ff 100644 --- a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceUpdateContextTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchServiceUpdateContextTests.java @@ -12,9 +12,9 @@ import org.opensearch.OpenSearchTimeoutException; import org.opensearch.ResourceNotFoundException; import org.opensearch.Version; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionRequest; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.ActionType; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.LatchedActionListener; @@ -57,7 +57,7 @@ import org.opensearch.search.internal.InternalSearchResponse; import org.opensearch.search.profile.SearchProfileShardResults; import org.opensearch.search.suggest.Suggest; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.ClusterServiceUtils; import org.opensearch.test.OpenSearchTestCase; import org.opensearch.test.client.NoOpClient; @@ -87,7 +87,7 @@ import static org.hamcrest.Matchers.greaterThan; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; -import static org.opensearch.action.ActionListener.wrap; +import static org.opensearch.core.action.ActionListener.wrap; import static org.opensearch.common.unit.TimeValue.timeValueHours; import static org.opensearch.search.asynchronous.commons.AsynchronousSearchTestCase.mockAsynchronousSearchProgressListener; import static org.opensearch.search.asynchronous.context.state.AsynchronousSearchState.CLOSED; diff --git a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchStateMachineTests.java b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchStateMachineTests.java index 8edbd043..776b7f9c 100644 --- a/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchStateMachineTests.java +++ b/src/test/java/org/opensearch/search/asynchronous/service/AsynchronousSearchStateMachineTests.java @@ -25,9 +25,9 @@ import org.apache.lucene.search.TotalHits; import org.opensearch.OpenSearchException; import org.opensearch.Version; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionRequest; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.ActionType; import org.opensearch.action.admin.indices.create.CreateIndexAction; import org.opensearch.action.search.SearchAction; @@ -48,7 +48,7 @@ import org.opensearch.search.internal.InternalSearchResponse; import org.opensearch.search.profile.SearchProfileShardResults; import org.opensearch.search.suggest.Suggest; -import org.opensearch.tasks.TaskId; +import org.opensearch.core.tasks.TaskId; import org.opensearch.test.OpenSearchTestCase; import org.opensearch.test.client.NoOpClient; import org.opensearch.threadpool.ExecutorBuilder; diff --git a/src/test/java/org/opensearch/search/asynchronous/service/persistence/AsynchronousSearchPersistenceServiceIT.java b/src/test/java/org/opensearch/search/asynchronous/service/persistence/AsynchronousSearchPersistenceServiceIT.java index 81b7ef82..bef1651e 100644 --- a/src/test/java/org/opensearch/search/asynchronous/service/persistence/AsynchronousSearchPersistenceServiceIT.java +++ b/src/test/java/org/opensearch/search/asynchronous/service/persistence/AsynchronousSearchPersistenceServiceIT.java @@ -24,7 +24,7 @@ import org.opensearch.OpenSearchSecurityException; import org.opensearch.OpenSearchTimeoutException; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.LatchedActionListener; import org.opensearch.action.index.IndexResponse; diff --git a/src/test/java/org/opensearch/search/asynchronous/utils/RestTestUtils.java b/src/test/java/org/opensearch/search/asynchronous/utils/RestTestUtils.java index a7a045ad..e5ee2576 100644 --- a/src/test/java/org/opensearch/search/asynchronous/utils/RestTestUtils.java +++ b/src/test/java/org/opensearch/search/asynchronous/utils/RestTestUtils.java @@ -5,7 +5,6 @@ package org.opensearch.search.asynchronous.utils; -import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.XContentType; import org.opensearch.search.asynchronous.plugin.AsynchronousSearchPlugin; import org.opensearch.search.asynchronous.request.DeleteAsynchronousSearchRequest; @@ -449,14 +448,14 @@ Params withActions(List actions) { return this; } - Params withTaskId(org.opensearch.tasks.TaskId taskId) { + Params withTaskId(org.opensearch.core.tasks.TaskId taskId) { if (taskId != null && taskId.isSet()) { return putParam("task_id", taskId.toString()); } return this; } - Params withParentTaskId(org.opensearch.tasks.TaskId parentTaskId) { + Params withParentTaskId(org.opensearch.core.tasks.TaskId parentTaskId) { if (parentTaskId != null && parentTaskId.isSet()) { return putParam("parent_task_id", parentTaskId.toString()); } @@ -506,7 +505,8 @@ static HttpEntity createEntity(ToXContent toXContent, XContentType xContentType) static HttpEntity createEntity(ToXContent toXContent, XContentType xContentType, ToXContent.Params toXContentParams) throws IOException { - BytesRef source = XContentHelper.toXContent(toXContent, xContentType, toXContentParams, false).toBytesRef(); + BytesRef source = org.opensearch.core.xcontent.XContentHelper.toXContent( + toXContent, xContentType, toXContentParams, false).toBytesRef(); return new NByteArrayEntity(source.bytes, source.offset, source.length, createContentType(xContentType)); } diff --git a/src/test/java/org/opensearch/search/asynchronous/utils/TestClientUtils.java b/src/test/java/org/opensearch/search/asynchronous/utils/TestClientUtils.java index 8d6e7280..49fcb548 100644 --- a/src/test/java/org/opensearch/search/asynchronous/utils/TestClientUtils.java +++ b/src/test/java/org/opensearch/search/asynchronous/utils/TestClientUtils.java @@ -16,8 +16,8 @@ import org.opensearch.search.asynchronous.response.AcknowledgedResponse; import org.opensearch.search.asynchronous.response.AsynchronousSearchResponse; import org.opensearch.search.asynchronous.service.AsynchronousSearchPersistenceService; -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.bulk.BackoffPolicy; import org.opensearch.action.get.GetRequest; import org.opensearch.action.get.GetResponse; diff --git a/src/test/java/org/opensearch/search/asynchronous/utils/TestUtils.java b/src/test/java/org/opensearch/search/asynchronous/utils/TestUtils.java index c54c35f8..13bd4996 100644 --- a/src/test/java/org/opensearch/search/asynchronous/utils/TestUtils.java +++ b/src/test/java/org/opensearch/search/asynchronous/utils/TestUtils.java @@ -16,7 +16,6 @@ import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.settings.Settings; -import org.opensearch.common.xcontent.XContentHelper; import org.opensearch.threadpool.ThreadPool; import java.io.IOException; @@ -49,7 +48,9 @@ public static ClusterService createClusterService(Settings settings, ThreadPool public static Map getResponseAsMap(SearchResponse searchResponse) throws IOException { if (searchResponse != null) { - BytesReference response = XContentHelper.toXContent(searchResponse, Requests.INDEX_CONTENT_TYPE, true); + + BytesReference response = org.opensearch.core.xcontent.XContentHelper.toXContent( + searchResponse, Requests.INDEX_CONTENT_TYPE, true); if (response == null) { return emptyMap(); }