From b0437672b108296a04813d30ea1d2a54eb5b715f Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Fri, 11 Aug 2023 09:08:27 -0700 Subject: [PATCH 1/7] fixing breaking change before ML fix. Signed-off-by: Mitchell Gale --- .../model/transport/CreateDataSourceActionResponse.java | 2 +- .../model/transport/DeleteDataSourceActionResponse.java | 2 +- .../sql/datasources/rest/RestDataSourceQueryAction.java | 2 +- .../legacy/query/SqlElasticDeleteByQueryRequestBuilder.java | 2 +- .../sql/legacy/query/SqlElasticRequestBuilder.java | 2 +- .../opensearch/sql/legacy/query/join/JoinRequestBuilder.java | 2 +- .../planner/physical/MLCommonsOperatorActions.java | 5 +++-- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/CreateDataSourceActionResponse.java b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/CreateDataSourceActionResponse.java index 377a249a44..4ed0464a25 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/CreateDataSourceActionResponse.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/CreateDataSourceActionResponse.java @@ -10,7 +10,7 @@ import java.io.IOException; import lombok.Getter; import lombok.RequiredArgsConstructor; -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; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/DeleteDataSourceActionResponse.java b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/DeleteDataSourceActionResponse.java index 4bb6e290c5..ec57c4aee7 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/DeleteDataSourceActionResponse.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/DeleteDataSourceActionResponse.java @@ -10,7 +10,7 @@ import java.io.IOException; import lombok.Getter; import lombok.RequiredArgsConstructor; -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; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/rest/RestDataSourceQueryAction.java b/datasources/src/main/java/org/opensearch/sql/datasources/rest/RestDataSourceQueryAction.java index a56512f838..15735b945a 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/rest/RestDataSourceQueryAction.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/rest/RestDataSourceQueryAction.java @@ -22,8 +22,8 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.OpenSearchException; -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.rest.BaseRestHandler; import org.opensearch.rest.BytesRestResponse; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java index 69036a6d10..e917dac08d 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java @@ -8,7 +8,7 @@ import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.index.reindex.DeleteByQueryRequestBuilder; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticRequestBuilder.java index eb04be928c..e1f3db3fa7 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticRequestBuilder.java @@ -8,7 +8,7 @@ import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; /** * Created by Eliran on 19/8/2015. diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java index 195abcadec..b6bf473633 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java @@ -10,7 +10,7 @@ import java.io.IOException; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.search.MultiSearchRequest; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.core.common.bytes.BytesReference; diff --git a/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java index e1f12fb8a7..ed5e619a59 100644 --- a/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java @@ -15,6 +15,7 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import org.opensearch.common.action.ActionFuture; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.function.Predicate; @@ -220,7 +221,7 @@ protected MLPredictionOutput getMLPredictionResult(FunctionName functionName, return (MLPredictionOutput) machineLearningClient .trainAndPredict(mlinput) - .actionGet(30, TimeUnit.SECONDS); + .actionGet(30L, TimeUnit.SECONDS); } /** @@ -246,7 +247,7 @@ protected MLOutput getMLOutput(DataFrame inputDataFrame, return machineLearningClient .run(mlinput, arguments) - .actionGet(30, TimeUnit.SECONDS); + .actionGet(30L, TimeUnit.SECONDS); } /** From 0254f45f54e15ffb94d33c607ac68dbecb73269a Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Fri, 11 Aug 2023 13:12:57 -0700 Subject: [PATCH 2/7] More fixes for core breaking change. Signed-off-by: Mitchell Gale --- .../model/transport/GetDataSourceActionResponse.java | 2 +- .../model/transport/UpdateDataSourceActionResponse.java | 2 +- .../storage/OpenSearchDataSourceMetadataStorage.java | 2 +- .../transport/TransportCreateDataSourceAction.java | 2 +- .../transport/TransportDeleteDataSourceAction.java | 2 +- .../datasources/transport/TransportGetDataSourceAction.java | 4 +++- .../transport/TransportUpdateDataSourceAction.java | 2 +- .../storage/OpenSearchDataSourceMetadataStorageTest.java | 3 +-- .../transport/TransportCreateDataSourceActionTest.java | 3 ++- .../transport/TransportDeleteDataSourceActionTest.java | 3 ++- .../transport/TransportGetDataSourceActionTest.java | 3 ++- .../transport/TransportUpdateDataSourceActionTest.java | 3 ++- .../sql/legacy/executor/ElasticDefaultRestExecutor.java | 3 +-- .../sql/legacy/executor/QueryActionElasticExecutor.java | 2 +- .../sql/legacy/executor/adapter/QueryPlanRequestBuilder.java | 2 +- .../sql/legacy/query/SqlOpenSearchRequestBuilder.java | 2 +- .../sql/legacy/query/multi/MultiQueryRequestBuilder.java | 2 +- .../query/planner/physical/node/scroll/PhysicalScroll.java | 2 +- .../opensearch/sql/legacy/unittest/OpenSearchClientTest.java | 2 +- .../unittest/planner/BindingTupleQueryPlannerExecuteTest.java | 3 +-- .../sql/legacy/unittest/planner/QueryPlannerTest.java | 3 +-- .../org/opensearch/sql/legacy/util/CheckScriptContents.java | 3 +-- plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java | 2 +- .../org/opensearch/sql/plugin/rest/RestPPLQueryAction.java | 2 +- .../sql/plugin/transport/TransportPPLQueryAction.java | 2 +- .../sql/plugin/transport/TransportPPLQueryResponse.java | 2 +- .../java/org/opensearch/sql/spark/response/SparkResponse.java | 3 +-- .../org/opensearch/sql/spark/response/SparkResponseTest.java | 3 +-- 28 files changed, 34 insertions(+), 35 deletions(-) diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/GetDataSourceActionResponse.java b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/GetDataSourceActionResponse.java index 964e5989f8..e88b0509c7 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/GetDataSourceActionResponse.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/GetDataSourceActionResponse.java @@ -10,7 +10,7 @@ import java.io.IOException; import lombok.Getter; import lombok.RequiredArgsConstructor; -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; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/UpdateDataSourceActionResponse.java b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/UpdateDataSourceActionResponse.java index 5f5f6f496a..88e8c41ea9 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/UpdateDataSourceActionResponse.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/UpdateDataSourceActionResponse.java @@ -10,7 +10,7 @@ import java.io.IOException; import lombok.Getter; import lombok.RequiredArgsConstructor; -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; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java b/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java index d756f2e029..1fe1b383f9 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java @@ -18,7 +18,7 @@ import org.apache.commons.io.IOUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.action.ActionFuture; +import org.opensearch.common.action.ActionFuture; import org.opensearch.action.DocWriteRequest; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.create.CreateIndexRequest; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceAction.java b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceAction.java index ce1c1bb157..deaf8bf04c 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceAction.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceAction.java @@ -7,7 +7,7 @@ package org.opensearch.sql.datasources.transport; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionType; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceAction.java b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceAction.java index fe2df1ee51..7f184fade8 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceAction.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceAction.java @@ -7,7 +7,7 @@ package org.opensearch.sql.datasources.transport; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionType; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceAction.java b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceAction.java index 7a36114755..37017b4f10 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceAction.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceAction.java @@ -8,7 +8,9 @@ package org.opensearch.sql.datasources.transport; import java.util.Set; -import org.opensearch.action.ActionListener; + +import org.opensearch.core.action.ActionListener; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.ActionType; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceAction.java b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceAction.java index 13f80733e6..0cc343024a 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceAction.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceAction.java @@ -7,7 +7,7 @@ package org.opensearch.sql.datasources.transport; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionType; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java index b1554ed585..38f46d32b4 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java @@ -25,8 +25,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.DocWriteResponse; +import org.opensearch.common.action.ActionFuture;import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.create.CreateIndexResponse; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.index.IndexResponse; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceActionTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceActionTest.java index 2ece0eb5cd..c73a9df92b 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceActionTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceActionTest.java @@ -14,7 +14,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.sql.datasource.model.DataSourceMetadata; import org.opensearch.sql.datasource.model.DataSourceType; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceActionTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceActionTest.java index 61b197a805..2650337502 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceActionTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceActionTest.java @@ -14,7 +14,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.sql.datasources.model.transport.DeleteDataSourceActionRequest; import org.opensearch.sql.datasources.model.transport.DeleteDataSourceActionResponse; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceActionTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceActionTest.java index 0546df643d..634493f095 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceActionTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceActionTest.java @@ -20,7 +20,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.sql.datasource.model.DataSourceMetadata; import org.opensearch.sql.datasource.model.DataSourceType; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceActionTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceActionTest.java index 2b9305c459..2476960659 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceActionTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceActionTest.java @@ -14,7 +14,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; +import org.opensearch.core.action.ActionResponse; import org.opensearch.action.support.ActionFilters; import org.opensearch.sql.datasource.model.DataSourceMetadata; import org.opensearch.sql.datasource.model.DataSourceType; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java index 220903d49d..33e4c2b23a 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java @@ -11,8 +11,7 @@ import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.ActionRequest; +import org.opensearch.common.action.ActionFuture;import org.opensearch.action.ActionRequest; import org.opensearch.action.admin.indices.get.GetIndexRequest; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java index 185820c0a4..0e66da2cf0 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java @@ -8,7 +8,7 @@ import java.io.IOException; import java.util.List; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse;; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; import org.opensearch.search.SearchHits; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java index a7b0f96b1b..978d188938 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java @@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse;; import org.opensearch.sql.legacy.expression.domain.BindingTuple; import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; import org.opensearch.sql.legacy.query.planner.core.BindingTupleQueryPlanner; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java index 3edd8d3fbd..a68c4f7f3c 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java @@ -8,7 +8,7 @@ import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse;; /** * Created by Eliran on 19/8/2015. diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java index 2a5e356073..d5c1cd068e 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java @@ -13,7 +13,7 @@ import java.util.Map; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse;; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.common.xcontent.XContentFactory; import org.opensearch.core.common.bytes.BytesReference; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java index ec81913807..8f52760c3a 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java @@ -9,7 +9,7 @@ import java.util.Iterator; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse;; import org.opensearch.action.search.SearchResponse; import org.opensearch.sql.legacy.exception.SqlParseException; import org.opensearch.sql.legacy.expression.domain.BindingTuple; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java index d0e740de51..b04edd608e 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java @@ -17,7 +17,7 @@ import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.opensearch.action.ActionFuture; +import org.opensearch.common.action.ActionFuture; import org.opensearch.action.search.MultiSearchRequest; import org.opensearch.action.search.MultiSearchResponse; import org.opensearch.action.search.SearchRequest; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java index db474e5136..14de0f7144 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java @@ -23,8 +23,7 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.runners.MockitoJUnitRunner; import org.mockito.stubbing.Answer; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.search.SearchResponse; +import org.opensearch.common.action.ActionFuture;import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; import org.opensearch.search.aggregations.Aggregations; import org.opensearch.sql.legacy.domain.ColumnTypeProvider; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java index 456889fe53..0bab3df577 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java @@ -31,8 +31,7 @@ import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.search.ClearScrollRequestBuilder; +import org.opensearch.common.action.ActionFuture;import org.opensearch.action.search.ClearScrollRequestBuilder; import org.opensearch.action.search.ClearScrollResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.SearchScrollRequestBuilder; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java index 7b03140ea4..a0ea6405a4 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java @@ -26,8 +26,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.mockito.stubbing.Answer; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsRequest; +import org.opensearch.common.action.ActionFuture;import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsRequest; import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.client.AdminClient; diff --git a/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java b/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java index 12d6358c7a..0bdf36d284 100644 --- a/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java @@ -19,7 +19,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.ActionRequest; -import org.opensearch.action.ActionResponse; +import org.opensearch.core.action.ActionResponse;; import org.opensearch.action.ActionType; import org.opensearch.client.Client; import org.opensearch.client.node.NodeClient; diff --git a/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java b/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java index 8b5074a5aa..e8e6408b00 100644 --- a/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java @@ -18,7 +18,7 @@ import java.util.function.Supplier; 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.client.node.NodeClient; import org.opensearch.core.rest.RestStatus; import org.opensearch.index.IndexNotFoundException; diff --git a/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryAction.java b/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryAction.java index dbe5230abf..a10d50c198 100644 --- a/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryAction.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryAction.java @@ -9,7 +9,7 @@ import java.util.Locale; import java.util.Optional; -import org.opensearch.action.ActionListener; +import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; diff --git a/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryResponse.java b/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryResponse.java index 4f26686f30..1a5fceb71b 100644 --- a/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryResponse.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryResponse.java @@ -8,7 +8,7 @@ import java.io.IOException; import lombok.Getter; import lombok.RequiredArgsConstructor; -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; diff --git a/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java b/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java index 504d4c96ca..fdeb7d34f1 100644 --- a/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java +++ b/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java @@ -13,8 +13,7 @@ import org.apache.logging.log4j.Logger; import org.json.JSONObject; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.DocWriteResponse; +import org.opensearch.common.action.ActionFuture;import org.opensearch.action.DocWriteResponse; import org.opensearch.action.delete.DeleteRequest; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchRequest; diff --git a/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java b/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java index f6bc23b827..ad6d85a9e8 100644 --- a/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java +++ b/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java @@ -21,8 +21,7 @@ import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import org.opensearch.ResourceNotFoundException; -import org.opensearch.action.ActionFuture; -import org.opensearch.action.DocWriteResponse; +import org.opensearch.common.action.ActionFuture;import org.opensearch.action.DocWriteResponse; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; From 1dab611e72122dd4f6fde1ec0d19baad2bfe583e Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Fri, 11 Aug 2023 13:24:15 -0700 Subject: [PATCH 3/7] spotless apply. Signed-off-by: Mitchell Gale --- .../model/transport/GetDataSourceActionResponse.java | 2 +- .../storage/OpenSearchDataSourceMetadataStorage.java | 2 +- .../transport/TransportCreateDataSourceAction.java | 2 +- .../transport/TransportDeleteDataSourceAction.java | 2 +- .../datasources/transport/TransportGetDataSourceAction.java | 4 +--- .../transport/TransportUpdateDataSourceAction.java | 2 +- .../storage/OpenSearchDataSourceMetadataStorageTest.java | 2 +- .../transport/TransportCreateDataSourceActionTest.java | 3 +-- .../transport/TransportDeleteDataSourceActionTest.java | 3 +-- .../transport/TransportGetDataSourceActionTest.java | 3 +-- .../transport/TransportUpdateDataSourceActionTest.java | 3 +-- .../sql/legacy/executor/ElasticDefaultRestExecutor.java | 2 +- .../sql/legacy/executor/QueryActionElasticExecutor.java | 2 +- .../sql/legacy/executor/adapter/QueryPlanRequestBuilder.java | 2 +- .../legacy/query/SqlElasticDeleteByQueryRequestBuilder.java | 2 +- .../sql/legacy/query/SqlOpenSearchRequestBuilder.java | 2 +- .../opensearch/sql/legacy/query/join/JoinRequestBuilder.java | 2 +- .../sql/legacy/query/multi/MultiQueryRequestBuilder.java | 2 +- .../query/planner/physical/node/scroll/PhysicalScroll.java | 2 +- .../opensearch/sql/legacy/unittest/OpenSearchClientTest.java | 2 +- .../unittest/planner/BindingTupleQueryPlannerExecuteTest.java | 2 +- .../sql/legacy/unittest/planner/QueryPlannerTest.java | 2 +- .../org/opensearch/sql/legacy/util/CheckScriptContents.java | 2 +- .../opensearch/planner/physical/MLCommonsOperatorActions.java | 1 - plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java | 2 +- .../org/opensearch/sql/plugin/rest/RestPPLQueryAction.java | 2 +- .../sql/plugin/transport/TransportPPLQueryAction.java | 2 +- .../sql/plugin/transport/TransportPPLQueryResponse.java | 2 +- .../java/org/opensearch/sql/spark/response/SparkResponse.java | 2 +- .../org/opensearch/sql/spark/response/SparkResponseTest.java | 2 +- 30 files changed, 29 insertions(+), 36 deletions(-) diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/GetDataSourceActionResponse.java b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/GetDataSourceActionResponse.java index e88b0509c7..dccb3e9b52 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/GetDataSourceActionResponse.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/model/transport/GetDataSourceActionResponse.java @@ -10,7 +10,7 @@ import java.io.IOException; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.opensearch.core.action.ActionResponse;; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.io.stream.StreamOutput; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java b/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java index 1fe1b383f9..0a9e42e2cd 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorage.java @@ -18,7 +18,6 @@ import org.apache.commons.io.IOUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.common.action.ActionFuture; import org.opensearch.action.DocWriteRequest; import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.create.CreateIndexRequest; @@ -34,6 +33,7 @@ import org.opensearch.action.update.UpdateResponse; import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.action.ActionFuture; import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.common.xcontent.XContentType; import org.opensearch.index.engine.DocumentMissingException; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceAction.java b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceAction.java index deaf8bf04c..fefd0250ce 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceAction.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceAction.java @@ -7,11 +7,11 @@ package org.opensearch.sql.datasources.transport; -import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionType; 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.sql.datasource.DataSourceService; import org.opensearch.sql.datasource.model.DataSourceMetadata; import org.opensearch.sql.datasources.model.transport.CreateDataSourceActionRequest; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceAction.java b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceAction.java index 7f184fade8..39e51aabef 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceAction.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceAction.java @@ -7,11 +7,11 @@ package org.opensearch.sql.datasources.transport; -import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionType; 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.sql.datasource.DataSourceService; import org.opensearch.sql.datasources.model.transport.DeleteDataSourceActionRequest; import org.opensearch.sql.datasources.model.transport.DeleteDataSourceActionResponse; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceAction.java b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceAction.java index 37017b4f10..477d10fa0b 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceAction.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceAction.java @@ -8,13 +8,11 @@ package org.opensearch.sql.datasources.transport; import java.util.Set; - -import org.opensearch.core.action.ActionListener; -import org.opensearch.core.action.ActionResponse; import org.opensearch.action.ActionType; 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.sql.datasource.DataSourceService; import org.opensearch.sql.datasource.model.DataSourceMetadata; import org.opensearch.sql.datasources.model.transport.GetDataSourceActionRequest; diff --git a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceAction.java b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceAction.java index 0cc343024a..e01a8ffea2 100644 --- a/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceAction.java +++ b/datasources/src/main/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceAction.java @@ -7,11 +7,11 @@ package org.opensearch.sql.datasources.transport; -import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionType; 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.sql.datasource.DataSourceService; import org.opensearch.sql.datasources.model.transport.UpdateDataSourceActionRequest; import org.opensearch.sql.datasources.model.transport.UpdateDataSourceActionResponse; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java index 38f46d32b4..dccebc8e59 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java @@ -25,7 +25,6 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.common.action.ActionFuture;import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.create.CreateIndexResponse; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.index.IndexResponse; @@ -33,6 +32,7 @@ import org.opensearch.action.update.UpdateResponse; import org.opensearch.client.Client; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.action.ActionFuture; import org.opensearch.core.index.shard.ShardId; import org.opensearch.core.rest.RestStatus; import org.opensearch.index.engine.DocumentMissingException; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceActionTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceActionTest.java index c73a9df92b..ccae5de2a9 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceActionTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportCreateDataSourceActionTest.java @@ -14,9 +14,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.core.action.ActionListener; -import org.opensearch.core.action.ActionResponse; import org.opensearch.action.support.ActionFilters; +import org.opensearch.core.action.ActionListener; import org.opensearch.sql.datasource.model.DataSourceMetadata; import org.opensearch.sql.datasource.model.DataSourceType; import org.opensearch.sql.datasources.model.transport.CreateDataSourceActionRequest; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceActionTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceActionTest.java index 2650337502..e97e7d1a65 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceActionTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportDeleteDataSourceActionTest.java @@ -14,9 +14,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.core.action.ActionListener; -import org.opensearch.core.action.ActionResponse; import org.opensearch.action.support.ActionFilters; +import org.opensearch.core.action.ActionListener; import org.opensearch.sql.datasources.model.transport.DeleteDataSourceActionRequest; import org.opensearch.sql.datasources.model.transport.DeleteDataSourceActionResponse; import org.opensearch.sql.datasources.service.DataSourceServiceImpl; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceActionTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceActionTest.java index 634493f095..fc4439470e 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceActionTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportGetDataSourceActionTest.java @@ -20,9 +20,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.core.action.ActionListener; -import org.opensearch.core.action.ActionResponse; import org.opensearch.action.support.ActionFilters; +import org.opensearch.core.action.ActionListener; import org.opensearch.sql.datasource.model.DataSourceMetadata; import org.opensearch.sql.datasource.model.DataSourceType; import org.opensearch.sql.datasources.model.transport.GetDataSourceActionRequest; diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceActionTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceActionTest.java index 2476960659..4b5a6e0f57 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceActionTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/transport/TransportUpdateDataSourceActionTest.java @@ -14,9 +14,8 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; -import org.opensearch.core.action.ActionListener; -import org.opensearch.core.action.ActionResponse; import org.opensearch.action.support.ActionFilters; +import org.opensearch.core.action.ActionListener; import org.opensearch.sql.datasource.model.DataSourceMetadata; import org.opensearch.sql.datasource.model.DataSourceType; import org.opensearch.sql.datasources.model.transport.UpdateDataSourceActionRequest; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java index 33e4c2b23a..581553fd9a 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java @@ -11,12 +11,12 @@ import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.common.action.ActionFuture;import org.opensearch.action.ActionRequest; import org.opensearch.action.admin.indices.get.GetIndexRequest; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.SearchScrollRequest; import org.opensearch.client.Client; +import org.opensearch.common.action.ActionFuture; import org.opensearch.core.rest.RestStatus; import org.opensearch.index.reindex.BulkIndexByScrollResponseContentListener; import org.opensearch.index.reindex.DeleteByQueryRequest; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java index 0e66da2cf0..bcb25fd39a 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/QueryActionElasticExecutor.java @@ -8,9 +8,9 @@ import java.io.IOException; import java.util.List; -import org.opensearch.core.action.ActionResponse;; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; +import org.opensearch.core.action.ActionResponse; import org.opensearch.search.SearchHits; import org.opensearch.search.aggregations.Aggregations; import org.opensearch.sql.legacy.exception.SqlParseException; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java index 978d188938..ef0bc85bc1 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/adapter/QueryPlanRequestBuilder.java @@ -10,7 +10,7 @@ import lombok.RequiredArgsConstructor; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.core.action.ActionResponse;; +import org.opensearch.core.action.ActionResponse; import org.opensearch.sql.legacy.expression.domain.BindingTuple; import org.opensearch.sql.legacy.query.SqlElasticRequestBuilder; import org.opensearch.sql.legacy.query.planner.core.BindingTupleQueryPlanner; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java index e917dac08d..6963996b22 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlElasticDeleteByQueryRequestBuilder.java @@ -8,8 +8,8 @@ import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.core.action.ActionResponse; import org.opensearch.action.search.SearchRequestBuilder; +import org.opensearch.core.action.ActionResponse; import org.opensearch.index.reindex.DeleteByQueryRequestBuilder; /** diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java index a68c4f7f3c..6bba1048c4 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/SqlOpenSearchRequestBuilder.java @@ -8,7 +8,7 @@ import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.core.action.ActionResponse;; +import org.opensearch.core.action.ActionResponse; /** * Created by Eliran on 19/8/2015. diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java index b6bf473633..316d17a275 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/join/JoinRequestBuilder.java @@ -10,9 +10,9 @@ import java.io.IOException; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.core.action.ActionResponse; import org.opensearch.action.search.MultiSearchRequest; import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java index d5c1cd068e..5340a701ed 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/multi/MultiQueryRequestBuilder.java @@ -13,9 +13,9 @@ import java.util.Map; import org.opensearch.action.ActionRequest; import org.opensearch.action.ActionRequestBuilder; -import org.opensearch.core.action.ActionResponse;; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.common.xcontent.XContentFactory; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.bytes.BytesReference; import org.opensearch.core.xcontent.ToXContent; import org.opensearch.core.xcontent.XContentBuilder; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java index 8f52760c3a..8866420218 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/PhysicalScroll.java @@ -9,8 +9,8 @@ import java.util.Iterator; import lombok.RequiredArgsConstructor; import lombok.SneakyThrows; -import org.opensearch.core.action.ActionResponse;; import org.opensearch.action.search.SearchResponse; +import org.opensearch.core.action.ActionResponse; import org.opensearch.sql.legacy.exception.SqlParseException; import org.opensearch.sql.legacy.expression.domain.BindingTuple; import org.opensearch.sql.legacy.query.AggregationQueryAction; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java index b04edd608e..2a654774d4 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/OpenSearchClientTest.java @@ -17,12 +17,12 @@ import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.opensearch.common.action.ActionFuture; import org.opensearch.action.search.MultiSearchRequest; import org.opensearch.action.search.MultiSearchResponse; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; +import org.opensearch.common.action.ActionFuture; import org.opensearch.sql.legacy.esdomain.OpenSearchClient; public class OpenSearchClientTest { diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java index 14de0f7144..882d437880 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java @@ -23,8 +23,8 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.runners.MockitoJUnitRunner; import org.mockito.stubbing.Answer; -import org.opensearch.common.action.ActionFuture;import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; +import org.opensearch.common.action.ActionFuture; import org.opensearch.search.aggregations.Aggregations; import org.opensearch.sql.legacy.domain.ColumnTypeProvider; import org.opensearch.sql.legacy.expression.domain.BindingTuple; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java index 0bab3df577..d95c92d14e 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java @@ -31,12 +31,12 @@ import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.opensearch.common.action.ActionFuture;import org.opensearch.action.search.ClearScrollRequestBuilder; import org.opensearch.action.search.ClearScrollResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.SearchScrollRequestBuilder; import org.opensearch.client.Client; import org.opensearch.cluster.ClusterName; +import org.opensearch.common.action.ActionFuture; import org.opensearch.common.settings.ClusterSettings; import org.opensearch.common.unit.TimeValue; import org.opensearch.core.common.bytes.BytesArray; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java index a0ea6405a4..5ae9737a6e 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java @@ -26,7 +26,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.mockito.stubbing.Answer; -import org.opensearch.common.action.ActionFuture;import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsRequest; import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.client.AdminClient; @@ -37,6 +36,7 @@ import org.opensearch.cluster.metadata.IndexNameExpressionResolver; import org.opensearch.cluster.metadata.Metadata; import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.action.ActionFuture; import org.opensearch.common.xcontent.XContentType; import org.opensearch.core.xcontent.DeprecationHandler; import org.opensearch.core.xcontent.NamedXContentRegistry; diff --git a/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java index ed5e619a59..95b317ea44 100644 --- a/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java @@ -15,7 +15,6 @@ import java.util.Iterator; import java.util.LinkedList; import java.util.List; -import org.opensearch.common.action.ActionFuture; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.function.Predicate; diff --git a/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java b/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java index 0bdf36d284..5e156c2f5d 100644 --- a/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/SQLPlugin.java @@ -19,7 +19,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.opensearch.action.ActionRequest; -import org.opensearch.core.action.ActionResponse;; import org.opensearch.action.ActionType; import org.opensearch.client.Client; import org.opensearch.client.node.NodeClient; @@ -34,6 +33,7 @@ import org.opensearch.common.settings.Settings; import org.opensearch.common.settings.SettingsFilter; 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/sql/plugin/rest/RestPPLQueryAction.java b/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java index e8e6408b00..55f8dfdfef 100644 --- a/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java @@ -18,8 +18,8 @@ import java.util.function.Supplier; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.opensearch.core.action.ActionListener; import org.opensearch.client.node.NodeClient; +import org.opensearch.core.action.ActionListener; import org.opensearch.core.rest.RestStatus; import org.opensearch.index.IndexNotFoundException; import org.opensearch.rest.BaseRestHandler; diff --git a/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryAction.java b/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryAction.java index a10d50c198..8a9d276673 100644 --- a/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryAction.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryAction.java @@ -9,7 +9,6 @@ import java.util.Locale; import java.util.Optional; -import org.opensearch.core.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.support.ActionFilters; import org.opensearch.action.support.HandledTransportAction; @@ -18,6 +17,7 @@ import org.opensearch.common.inject.Inject; import org.opensearch.common.inject.Injector; import org.opensearch.common.inject.ModulesBuilder; +import org.opensearch.core.action.ActionListener; import org.opensearch.sql.common.response.ResponseListener; import org.opensearch.sql.common.utils.QueryContext; import org.opensearch.sql.datasource.DataSourceService; diff --git a/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryResponse.java b/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryResponse.java index 1a5fceb71b..169777e8dc 100644 --- a/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryResponse.java +++ b/plugin/src/main/java/org/opensearch/sql/plugin/transport/TransportPPLQueryResponse.java @@ -8,7 +8,7 @@ import java.io.IOException; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.opensearch.core.action.ActionResponse;; +import org.opensearch.core.action.ActionResponse; import org.opensearch.core.common.io.stream.StreamInput; import org.opensearch.core.common.io.stream.StreamOutput; diff --git a/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java b/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java index fdeb7d34f1..04c6d40cb0 100644 --- a/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java +++ b/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java @@ -13,12 +13,12 @@ import org.apache.logging.log4j.Logger; import org.json.JSONObject; import org.opensearch.ResourceNotFoundException; -import org.opensearch.common.action.ActionFuture;import org.opensearch.action.DocWriteResponse; import org.opensearch.action.delete.DeleteRequest; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; +import org.opensearch.common.action.ActionFuture; import org.opensearch.index.query.QueryBuilder; import org.opensearch.index.query.QueryBuilders; import org.opensearch.search.SearchHit; diff --git a/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java b/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java index ad6d85a9e8..e19d5b6be2 100644 --- a/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java +++ b/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java @@ -21,10 +21,10 @@ import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import org.opensearch.ResourceNotFoundException; -import org.opensearch.common.action.ActionFuture;import org.opensearch.action.DocWriteResponse; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; +import org.opensearch.common.action.ActionFuture; import org.opensearch.core.rest.RestStatus; import org.opensearch.search.SearchHit; import org.opensearch.search.SearchHits; From 070bcd3b76821141254cb804915bf2a12713504e Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Fri, 11 Aug 2023 13:31:00 -0700 Subject: [PATCH 4/7] Remove d L at end of actionGet int Signed-off-by: Mitchell Gale --- .../opensearch/planner/physical/MLCommonsOperatorActions.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java index 95b317ea44..e1f12fb8a7 100644 --- a/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java +++ b/opensearch/src/main/java/org/opensearch/sql/opensearch/planner/physical/MLCommonsOperatorActions.java @@ -220,7 +220,7 @@ protected MLPredictionOutput getMLPredictionResult(FunctionName functionName, return (MLPredictionOutput) machineLearningClient .trainAndPredict(mlinput) - .actionGet(30L, TimeUnit.SECONDS); + .actionGet(30, TimeUnit.SECONDS); } /** @@ -246,7 +246,7 @@ protected MLOutput getMLOutput(DataFrame inputDataFrame, return machineLearningClient .run(mlinput, arguments) - .actionGet(30L, TimeUnit.SECONDS); + .actionGet(30, TimeUnit.SECONDS); } /** From 1513779d8422cb9dd9097dca8737ebebe9c687dd Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Fri, 11 Aug 2023 15:33:18 -0700 Subject: [PATCH 5/7] Adding missed import updates for ElasticDefaultRestExecutor and OpenSearchDataSourceMetadataStorageTest.java Signed-off-by: Mitchell Gale --- .../storage/OpenSearchDataSourceMetadataStorageTest.java | 1 + .../sql/legacy/executor/ElasticDefaultRestExecutor.java | 1 + 2 files changed, 2 insertions(+) diff --git a/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java b/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java index dccebc8e59..bab568bc32 100644 --- a/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java +++ b/datasources/src/test/java/org/opensearch/sql/datasources/storage/OpenSearchDataSourceMetadataStorageTest.java @@ -25,6 +25,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; +import org.opensearch.action.DocWriteResponse; import org.opensearch.action.admin.indices.create.CreateIndexResponse; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.index.IndexResponse; diff --git a/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java index 581553fd9a..a5dd066536 100644 --- a/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java +++ b/legacy/src/main/java/org/opensearch/sql/legacy/executor/ElasticDefaultRestExecutor.java @@ -11,6 +11,7 @@ import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.opensearch.action.ActionRequest; import org.opensearch.action.admin.indices.get.GetIndexRequest; import org.opensearch.action.search.SearchRequest; import org.opensearch.action.search.SearchResponse; From 4d6a99fd11bfd481b53e1e7c1d8d5cf6876fd236 Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Fri, 11 Aug 2023 15:45:48 -0700 Subject: [PATCH 6/7] Adding missed import updates for SparkResponse.java Signed-off-by: Mitchell Gale --- .../java/org/opensearch/sql/spark/response/SparkResponse.java | 1 + 1 file changed, 1 insertion(+) diff --git a/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java b/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java index 04c6d40cb0..f30072eb3f 100644 --- a/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java +++ b/spark/src/main/java/org/opensearch/sql/spark/response/SparkResponse.java @@ -13,6 +13,7 @@ import org.apache.logging.log4j.Logger; import org.json.JSONObject; import org.opensearch.ResourceNotFoundException; +import org.opensearch.action.DocWriteResponse; import org.opensearch.action.delete.DeleteRequest; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchRequest; From 8b0f8dfa3750fecf29a607ced7b91ef1550365b3 Mon Sep 17 00:00:00 2001 From: Mitchell Gale Date: Fri, 11 Aug 2023 15:51:13 -0700 Subject: [PATCH 7/7] Adding missed import updates for BindingTupleQueryPlannerExecuteTest CheckScriptContents QueryPlannerTest.java SparkResponseTest.java Signed-off-by: Mitchell Gale --- .../unittest/planner/BindingTupleQueryPlannerExecuteTest.java | 1 + .../opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java | 1 + .../java/org/opensearch/sql/legacy/util/CheckScriptContents.java | 1 + .../org/opensearch/sql/spark/response/SparkResponseTest.java | 1 + 4 files changed, 4 insertions(+) diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java index 882d437880..9f6fcbcc6d 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/BindingTupleQueryPlannerExecuteTest.java @@ -23,6 +23,7 @@ import org.mockito.invocation.InvocationOnMock; import org.mockito.runners.MockitoJUnitRunner; import org.mockito.stubbing.Answer; +import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client; import org.opensearch.common.action.ActionFuture; import org.opensearch.search.aggregations.Aggregations; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java index d95c92d14e..66380c108d 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/unittest/planner/QueryPlannerTest.java @@ -31,6 +31,7 @@ import org.mockito.MockitoAnnotations; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; +import org.opensearch.action.search.ClearScrollRequestBuilder; import org.opensearch.action.search.ClearScrollResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.action.search.SearchScrollRequestBuilder; diff --git a/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java b/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java index 5ae9737a6e..d627cebb27 100644 --- a/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java +++ b/legacy/src/test/java/org/opensearch/sql/legacy/util/CheckScriptContents.java @@ -26,6 +26,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.mockito.stubbing.Answer; +import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsRequest; import org.opensearch.action.admin.indices.mapping.get.GetFieldMappingsResponse; import org.opensearch.action.search.SearchRequestBuilder; import org.opensearch.client.AdminClient; diff --git a/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java b/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java index e19d5b6be2..abc4c81626 100644 --- a/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java +++ b/spark/src/test/java/org/opensearch/sql/spark/response/SparkResponseTest.java @@ -21,6 +21,7 @@ import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import org.opensearch.ResourceNotFoundException; +import org.opensearch.action.DocWriteResponse; import org.opensearch.action.delete.DeleteResponse; import org.opensearch.action.search.SearchResponse; import org.opensearch.client.Client;