diff --git a/release-notes/opensearch-asynchronous-search.release-notes-2.8.0.0.md b/release-notes/opensearch-asynchronous-search.release-notes-2.8.0.0.md new file mode 100644 index 00000000..1dd64640 --- /dev/null +++ b/release-notes/opensearch-asynchronous-search.release-notes-2.8.0.0.md @@ -0,0 +1,6 @@ +## Version 2.8.0.0 2023-05-30 + +Compatible with OpenSearch 2.8.0 + +### Maintenance +* Updating maintainers file ([275](https://github.com/opensearch-project/asynchronous-search/pull/275)) \ No newline at end of file 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 995ef0a5..54e1f972 100644 --- a/src/main/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequest.java +++ b/src/main/java/org/opensearch/search/asynchronous/request/SubmitAsynchronousSearchRequest.java @@ -10,7 +10,7 @@ import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.search.SearchRequest; import org.opensearch.common.Nullable; -import org.opensearch.common.Strings; +import org.opensearch.core.common.Strings; import org.opensearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.common.unit.TimeValue; 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 c38e7253..20810a26 100644 --- a/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java +++ b/src/main/java/org/opensearch/search/asynchronous/response/AsynchronousSearchResponse.java @@ -5,6 +5,7 @@ package org.opensearch.search.asynchronous.response; +import org.opensearch.BaseExceptionsHelper; import org.opensearch.core.ParseField; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; @@ -123,7 +124,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } if (error != null) { builder.startObject(ERROR.getPreferredName()); - OpenSearchException.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, error); + BaseExceptionsHelper.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, error); builder.endObject(); } builder.endObject(); @@ -206,7 +207,7 @@ private Map getErrorAsMap(OpenSearchException exception) throws BytesReference error; try (XContentBuilder builder = XContentFactory.contentBuilder(Requests.INDEX_CONTENT_TYPE)) { builder.startObject(); - OpenSearchException.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, exception); + BaseExceptionsHelper.generateThrowableXContent(builder, ToXContent.EMPTY_PARAMS, exception); builder.endObject(); error = BytesReference.bytes(builder); return convertToMap(error, false, Requests.INDEX_CONTENT_TYPE).v2(); diff --git a/src/main/java/org/opensearch/search/asynchronous/rest/RestAsynchronousSearchStatsAction.java b/src/main/java/org/opensearch/search/asynchronous/rest/RestAsynchronousSearchStatsAction.java index df983324..a03342f3 100644 --- a/src/main/java/org/opensearch/search/asynchronous/rest/RestAsynchronousSearchStatsAction.java +++ b/src/main/java/org/opensearch/search/asynchronous/rest/RestAsynchronousSearchStatsAction.java @@ -5,12 +5,12 @@ package org.opensearch.search.asynchronous.rest; +import org.opensearch.core.common.Strings; import org.opensearch.search.asynchronous.action.AsynchronousSearchStatsAction; import org.opensearch.search.asynchronous.request.AsynchronousSearchStatsRequest; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.client.node.NodeClient; -import org.opensearch.common.Strings; import org.opensearch.rest.BaseRestHandler; import org.opensearch.rest.RestRequest; import org.opensearch.rest.action.RestActions; 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 51de4d04..a8443135 100644 --- a/src/main/java/org/opensearch/search/asynchronous/task/AsynchronousSearchTask.java +++ b/src/main/java/org/opensearch/search/asynchronous/task/AsynchronousSearchTask.java @@ -5,13 +5,13 @@ package org.opensearch.search.asynchronous.task; +import org.opensearch.core.common.Strings; import org.opensearch.search.asynchronous.context.active.AsynchronousSearchActiveContext; import org.opensearch.search.asynchronous.request.SubmitAsynchronousSearchRequest; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchTask; -import org.opensearch.common.Strings; import org.opensearch.tasks.TaskId; import java.util.Map; diff --git a/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchRestTestCase.java b/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchRestTestCase.java index 64069d91..2f0cdec4 100644 --- a/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchRestTestCase.java +++ b/src/test/java/org/opensearch/search/asynchronous/restIT/AsynchronousSearchRestTestCase.java @@ -5,6 +5,7 @@ package org.opensearch.search.asynchronous.restIT; +import org.opensearch.core.common.Strings; import org.opensearch.core.xcontent.DeprecationHandler; import org.opensearch.core.xcontent.NamedXContentRegistry; import org.opensearch.core.xcontent.XContentBuilder; @@ -27,7 +28,6 @@ import org.opensearch.client.ResponseException; import org.opensearch.common.CheckedFunction; import org.opensearch.common.Nullable; -import org.opensearch.common.Strings; import org.opensearch.common.settings.Settings; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.common.xcontent.XContentType; @@ -222,7 +222,7 @@ protected void updateClusterSettings(String settingKey, Object value) throws Exc .endObject() .endObject(); Request request = new Request("PUT", "_cluster/settings"); - request.setJsonEntity(Strings.toString(builder)); + request.setJsonEntity(org.opensearch.common.Strings.toString(builder)); Response response = client().performRequest(request); assertEquals(RestStatus.OK, RestStatus.fromCode(response.getStatusLine().getStatusCode())); } 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 4587bbcc..74269f57 100644 --- a/src/test/java/org/opensearch/search/asynchronous/utils/RestTestUtils.java +++ b/src/test/java/org/opensearch/search/asynchronous/utils/RestTestUtils.java @@ -5,6 +5,7 @@ package org.opensearch.search.asynchronous.utils; +import org.opensearch.core.common.Strings; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.search.asynchronous.plugin.AsynchronousSearchPlugin; import org.opensearch.search.asynchronous.request.DeleteAsynchronousSearchRequest; @@ -24,7 +25,6 @@ import org.opensearch.client.Request; import org.opensearch.cluster.health.ClusterHealthStatus; import org.opensearch.common.Priority; -import org.opensearch.common.Strings; import org.opensearch.common.SuppressForbidden; import org.opensearch.common.lucene.uid.Versions; import org.opensearch.common.unit.TimeValue;