From e8b5a411a5f186f29317fa32b1b0e58c722edbd4 Mon Sep 17 00:00:00 2001 From: Nick Knize Date: Wed, 3 Mar 2021 14:29:06 -0600 Subject: [PATCH] [Rename] ElasticsearchClient class in server module (#166) This commit refactors the ElasticsearchClient class located in the server module to OpenSearchClient. References and usages throughout the rest of the codebase are fully refactored. Signed-off-by: Nicholas Knize --- .../mustache/SearchTemplateRequestBuilder.java | 6 +++--- .../index/rankeval/RankEvalRequestBuilder.java | 6 +++--- .../index/reindex/RethrottleRequestBuilder.java | 6 +++--- .../elasticsearch/action/ActionRequestBuilder.java | 6 +++--- .../ClusterAllocationExplainRequestBuilder.java | 4 ++-- .../health/ClusterHealthRequestBuilder.java | 4 ++-- .../hotthreads/NodesHotThreadsRequestBuilder.java | 4 ++-- .../cluster/node/info/NodesInfoRequestBuilder.java | 4 ++-- .../NodesReloadSecureSettingsRequestBuilder.java | 4 ++-- .../node/stats/NodesStatsRequestBuilder.java | 4 ++-- .../tasks/cancel/CancelTasksRequestBuilder.java | 4 ++-- .../node/tasks/get/GetTaskRequestBuilder.java | 4 ++-- .../node/tasks/list/ListTasksRequestBuilder.java | 4 ++-- .../node/usage/NodesUsageRequestBuilder.java | 4 ++-- .../cluster/remote/RemoteInfoRequestBuilder.java | 4 ++-- .../cleanup/CleanupRepositoryRequestBuilder.java | 6 +++--- .../delete/DeleteRepositoryRequestBuilder.java | 6 +++--- .../get/GetRepositoriesRequestBuilder.java | 6 +++--- .../put/PutRepositoryRequestBuilder.java | 6 +++--- .../verify/VerifyRepositoryRequestBuilder.java | 6 +++--- .../reroute/ClusterRerouteRequestBuilder.java | 6 +++--- .../ClusterUpdateSettingsRequestBuilder.java | 4 ++-- .../shards/ClusterSearchShardsRequestBuilder.java | 4 ++-- .../clone/CloneSnapshotRequestBuilder.java | 6 +++--- .../create/CreateSnapshotRequestBuilder.java | 6 +++--- .../delete/DeleteSnapshotRequestBuilder.java | 6 +++--- .../snapshots/get/GetSnapshotsRequestBuilder.java | 6 +++--- .../restore/RestoreSnapshotRequestBuilder.java | 6 +++--- .../status/SnapshotsStatusRequestBuilder.java | 6 +++--- .../cluster/state/ClusterStateRequestBuilder.java | 4 ++-- .../cluster/stats/ClusterStatsRequestBuilder.java | 4 ++-- .../DeleteStoredScriptRequestBuilder.java | 4 ++-- .../GetStoredScriptRequestBuilder.java | 4 ++-- .../PutStoredScriptRequestBuilder.java | 4 ++-- .../tasks/PendingClusterTasksRequestBuilder.java | 4 ++-- .../alias/IndicesAliasesRequestBuilder.java | 4 ++-- .../alias/exists/AliasesExistRequestBuilder.java | 4 ++-- .../alias/get/BaseAliasesRequestBuilder.java | 4 ++-- .../alias/get/GetAliasesRequestBuilder.java | 4 ++-- .../indices/analyze/AnalyzeRequestBuilder.java | 6 +++--- .../clear/ClearIndicesCacheRequestBuilder.java | 4 ++-- .../indices/close/CloseIndexRequestBuilder.java | 6 +++--- .../indices/create/CreateIndexRequestBuilder.java | 6 +++--- .../indices/delete/DeleteIndexRequestBuilder.java | 4 ++-- .../indices/IndicesExistsRequestBuilder.java | 4 ++-- .../exists/types/TypesExistsRequestBuilder.java | 6 +++--- .../admin/indices/flush/FlushRequestBuilder.java | 4 ++-- .../indices/flush/SyncedFlushRequestBuilder.java | 4 ++-- .../forcemerge/ForceMergeRequestBuilder.java | 4 ++-- .../admin/indices/get/GetIndexRequestBuilder.java | 4 ++-- .../get/GetFieldMappingsRequestBuilder.java | 4 ++-- .../mapping/get/GetMappingsRequestBuilder.java | 4 ++-- .../mapping/put/PutMappingRequestBuilder.java | 4 ++-- .../indices/open/OpenIndexRequestBuilder.java | 6 +++--- .../readonly/AddIndexBlockRequestBuilder.java | 4 ++-- .../indices/recovery/RecoveryRequestBuilder.java | 6 +++--- .../indices/refresh/RefreshRequestBuilder.java | 4 ++-- .../indices/rollover/RolloverRequestBuilder.java | 4 ++-- .../segments/IndicesSegmentsRequestBuilder.java | 4 ++-- .../settings/get/GetSettingsRequestBuilder.java | 4 ++-- .../settings/put/UpdateSettingsRequestBuilder.java | 4 ++-- .../shards/IndicesShardStoreRequestBuilder.java | 4 ++-- .../admin/indices/shrink/ResizeRequestBuilder.java | 4 ++-- .../indices/stats/IndicesStatsRequestBuilder.java | 4 ++-- .../delete/DeleteIndexTemplateRequestBuilder.java | 6 +++--- .../get/GetIndexTemplatesRequestBuilder.java | 6 +++--- .../put/PutIndexTemplateRequestBuilder.java | 6 +++--- .../upgrade/get/UpgradeStatusRequestBuilder.java | 4 ++-- .../upgrade/post/UpgradeRequestBuilder.java | 4 ++-- .../post/UpgradeSettingsRequestBuilder.java | 4 ++-- .../query/ValidateQueryRequestBuilder.java | 4 ++-- .../action/bulk/BulkRequestBuilder.java | 14 +++++++------- .../action/delete/DeleteRequestBuilder.java | 6 +++--- .../action/explain/ExplainRequestBuilder.java | 6 +++--- .../fieldcaps/FieldCapabilitiesRequestBuilder.java | 4 ++-- .../action/get/GetRequestBuilder.java | 6 +++--- .../action/get/MultiGetRequestBuilder.java | 4 ++-- .../action/index/IndexRequestBuilder.java | 6 +++--- .../ingest/DeletePipelineRequestBuilder.java | 6 +++--- .../action/ingest/GetPipelineRequestBuilder.java | 6 +++--- .../action/ingest/PutPipelineRequestBuilder.java | 6 +++--- .../ingest/SimulatePipelineRequestBuilder.java | 6 +++--- .../action/main/MainRequestBuilder.java | 4 ++-- .../action/search/ClearScrollRequestBuilder.java | 4 ++-- .../action/search/MultiSearchRequestBuilder.java | 4 ++-- .../action/search/SearchRequestBuilder.java | 4 ++-- .../action/search/SearchScrollRequestBuilder.java | 6 +++--- .../BroadcastOperationRequestBuilder.java | 4 ++-- .../support/master/AcknowledgedRequestBuilder.java | 4 ++-- .../master/MasterNodeOperationRequestBuilder.java | 4 ++-- .../MasterNodeReadOperationRequestBuilder.java | 4 ++-- .../master/info/ClusterInfoRequestBuilder.java | 4 ++-- .../nodes/NodesOperationRequestBuilder.java | 4 ++-- .../replication/ReplicationRequestBuilder.java | 4 ++-- .../InstanceShardOperationRequestBuilder.java | 4 ++-- .../shard/SingleShardOperationRequestBuilder.java | 4 ++-- .../action/support/tasks/TasksRequestBuilder.java | 6 +++--- .../MultiTermVectorsRequestBuilder.java | 4 ++-- .../termvectors/TermVectorsRequestBuilder.java | 6 +++--- .../action/update/UpdateRequestBuilder.java | 6 +++--- .../main/java/org/elasticsearch/client/Client.java | 2 +- .../elasticsearch/client/ClusterAdminClient.java | 2 +- .../elasticsearch/client/IndicesAdminClient.java | 2 +- ...sticsearchClient.java => OpenSearchClient.java} | 2 +- .../client/support/AbstractClient.java | 12 ++++++------ .../AbstractBulkByScrollRequestBuilder.java | 4 ++-- .../AbstractBulkIndexByScrollRequestBuilder.java | 4 ++-- .../index/reindex/DeleteByQueryRequestBuilder.java | 6 +++--- .../index/reindex/ReindexRequestBuilder.java | 12 ++++++------ .../index/reindex/UpdateByQueryRequestBuilder.java | 10 +++++----- .../persistent/CompletionPersistentTaskAction.java | 4 ++-- .../persistent/RemovePersistentTaskAction.java | 4 ++-- .../persistent/StartPersistentTaskAction.java | 4 ++-- .../UpdatePersistentTaskStatusAction.java | 4 ++-- .../admin/cluster/node/tasks/TestTaskPlugin.java | 4 ++-- .../persistent/TestPersistentTasksPlugin.java | 4 ++-- 116 files changed, 282 insertions(+), 282 deletions(-) rename server/src/main/java/org/elasticsearch/client/{ElasticsearchClient.java => OpenSearchClient.java} (98%) diff --git a/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/SearchTemplateRequestBuilder.java b/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/SearchTemplateRequestBuilder.java index 054acbc655768..69924d1beea48 100644 --- a/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/SearchTemplateRequestBuilder.java +++ b/modules/lang-mustache/src/main/java/org/elasticsearch/script/mustache/SearchTemplateRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.search.SearchRequest; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.script.ScriptType; import java.util.Map; @@ -29,11 +29,11 @@ public class SearchTemplateRequestBuilder extends ActionRequestBuilder { - SearchTemplateRequestBuilder(ElasticsearchClient client, SearchTemplateAction action) { + SearchTemplateRequestBuilder(OpenSearchClient client, SearchTemplateAction action) { super(client, action, new SearchTemplateRequest()); } - public SearchTemplateRequestBuilder(ElasticsearchClient client) { + public SearchTemplateRequestBuilder(OpenSearchClient client) { this(client, SearchTemplateAction.INSTANCE); } diff --git a/modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RankEvalRequestBuilder.java b/modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RankEvalRequestBuilder.java index 1bfb576c37911..d24d0397f575a 100644 --- a/modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RankEvalRequestBuilder.java +++ b/modules/rank-eval/src/main/java/org/elasticsearch/index/rankeval/RankEvalRequestBuilder.java @@ -21,12 +21,12 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class RankEvalRequestBuilder extends ActionRequestBuilder { - public RankEvalRequestBuilder(ElasticsearchClient client, ActionType action, - RankEvalRequest request) { + public RankEvalRequestBuilder(OpenSearchClient client, ActionType action, + RankEvalRequest request) { super(client, action, request); } diff --git a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RethrottleRequestBuilder.java b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RethrottleRequestBuilder.java index 648eb6e441b1a..81c08fd0ba512 100644 --- a/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RethrottleRequestBuilder.java +++ b/modules/reindex/src/main/java/org/elasticsearch/index/reindex/RethrottleRequestBuilder.java @@ -22,14 +22,14 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse; import org.elasticsearch.action.support.tasks.TasksRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Java API support for changing the throttle on reindex tasks while they are running. */ public class RethrottleRequestBuilder extends TasksRequestBuilder { - public RethrottleRequestBuilder(ElasticsearchClient client, - ActionType action) { + public RethrottleRequestBuilder(OpenSearchClient client, + ActionType action) { super(client, action, new RethrottleRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/ActionRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/ActionRequestBuilder.java index 166bec9e065b0..dda184daab49c 100644 --- a/server/src/main/java/org/elasticsearch/action/ActionRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/ActionRequestBuilder.java @@ -19,7 +19,7 @@ package org.elasticsearch.action; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; import java.util.Objects; @@ -28,9 +28,9 @@ public abstract class ActionRequestBuilder action; protected final Request request; - protected final ElasticsearchClient client; + protected final OpenSearchClient client; - protected ActionRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected ActionRequestBuilder(OpenSearchClient client, ActionType action, Request request) { Objects.requireNonNull(action, "action must not be null"); this.action = action; this.request = request; diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestBuilder.java index 038657a277cd5..fc6b30a5284ee 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.allocation; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Builder for requests to explain the allocation of a shard in the cluster @@ -30,7 +30,7 @@ public class ClusterAllocationExplainRequestBuilder ClusterAllocationExplainResponse, ClusterAllocationExplainRequestBuilder> { - public ClusterAllocationExplainRequestBuilder(ElasticsearchClient client, ClusterAllocationExplainAction action) { + public ClusterAllocationExplainRequestBuilder(OpenSearchClient client, ClusterAllocationExplainAction action) { super(client, action, new ClusterAllocationExplainRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java index 21bf3357d5be4..88bea85c41699 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/health/ClusterHealthRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.health.ClusterHealthStatus; import org.elasticsearch.common.Priority; import org.elasticsearch.common.unit.TimeValue; @@ -30,7 +30,7 @@ public class ClusterHealthRequestBuilder extends MasterNodeReadOperationRequestBuilder { - public ClusterHealthRequestBuilder(ElasticsearchClient client, ClusterHealthAction action) { + public ClusterHealthRequestBuilder(OpenSearchClient client, ClusterHealthAction action) { super(client, action, new ClusterHealthRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequestBuilder.java index 02a7cf3ebdde4..94f924951715a 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/hotthreads/NodesHotThreadsRequestBuilder.java @@ -20,13 +20,13 @@ package org.elasticsearch.action.admin.cluster.node.hotthreads; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; public class NodesHotThreadsRequestBuilder extends NodesOperationRequestBuilder { - public NodesHotThreadsRequestBuilder(ElasticsearchClient client, NodesHotThreadsAction action) { + public NodesHotThreadsRequestBuilder(OpenSearchClient client, NodesHotThreadsAction action) { super(client, action, new NodesHotThreadsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java index a73c0e82b2d2f..95e51d687b534 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodesInfoRequestBuilder.java @@ -20,11 +20,11 @@ package org.elasticsearch.action.admin.cluster.node.info; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class NodesInfoRequestBuilder extends NodesOperationRequestBuilder { - public NodesInfoRequestBuilder(ElasticsearchClient client, NodesInfoAction action) { + public NodesInfoRequestBuilder(OpenSearchClient client, NodesInfoAction action) { super(client, action, new NodesInfoRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequestBuilder.java index c3c0401efdf17..2236eac42177b 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.node.reload; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.settings.SecureString; /** @@ -29,7 +29,7 @@ public class NodesReloadSecureSettingsRequestBuilder extends NodesOperationRequestBuilder { - public NodesReloadSecureSettingsRequestBuilder(ElasticsearchClient client, NodesReloadSecureSettingsAction action) { + public NodesReloadSecureSettingsRequestBuilder(OpenSearchClient client, NodesReloadSecureSettingsAction action) { super(client, action, new NodesReloadSecureSettingsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java index cc6b74dbc5a11..adc3fc0bb7c08 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/stats/NodesStatsRequestBuilder.java @@ -21,12 +21,12 @@ import org.elasticsearch.action.admin.indices.stats.CommonStatsFlags; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class NodesStatsRequestBuilder extends NodesOperationRequestBuilder { - public NodesStatsRequestBuilder(ElasticsearchClient client, NodesStatsAction action) { + public NodesStatsRequestBuilder(OpenSearchClient client, NodesStatsAction action) { super(client, action, new NodesStatsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequestBuilder.java index 4fc722125b8e7..3d877ec9e9f97 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/cancel/CancelTasksRequestBuilder.java @@ -20,14 +20,14 @@ package org.elasticsearch.action.admin.cluster.node.tasks.cancel; import org.elasticsearch.action.support.tasks.TasksRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Builder for the request to cancel tasks running on the specified nodes */ public class CancelTasksRequestBuilder extends TasksRequestBuilder { - public CancelTasksRequestBuilder(ElasticsearchClient client, CancelTasksAction action) { + public CancelTasksRequestBuilder(OpenSearchClient client, CancelTasksAction action) { super(client, action, new CancelTasksRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/get/GetTaskRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/get/GetTaskRequestBuilder.java index 348c4c7a69ba5..875a80cada14a 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/get/GetTaskRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/get/GetTaskRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.node.tasks.get; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.tasks.TaskId; @@ -28,7 +28,7 @@ * Builder for the request to retrieve the list of tasks running on the specified nodes */ public class GetTaskRequestBuilder extends ActionRequestBuilder { - public GetTaskRequestBuilder(ElasticsearchClient client, GetTaskAction action) { + public GetTaskRequestBuilder(OpenSearchClient client, GetTaskAction action) { super(client, action, new GetTaskRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/list/ListTasksRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/list/ListTasksRequestBuilder.java index 1385781125a33..a3654f55cf1b7 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/list/ListTasksRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/tasks/list/ListTasksRequestBuilder.java @@ -20,14 +20,14 @@ package org.elasticsearch.action.admin.cluster.node.tasks.list; import org.elasticsearch.action.support.tasks.TasksRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Builder for the request to retrieve the list of tasks running on the specified nodes */ public class ListTasksRequestBuilder extends TasksRequestBuilder { - public ListTasksRequestBuilder(ElasticsearchClient client, ListTasksAction action) { + public ListTasksRequestBuilder(OpenSearchClient client, ListTasksAction action) { super(client, action, new ListTasksRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/usage/NodesUsageRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/usage/NodesUsageRequestBuilder.java index 3133a6a18947b..94528c5ab57bc 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/node/usage/NodesUsageRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/node/usage/NodesUsageRequestBuilder.java @@ -21,12 +21,12 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class NodesUsageRequestBuilder extends NodesOperationRequestBuilder { - public NodesUsageRequestBuilder(ElasticsearchClient client, ActionType action) { + public NodesUsageRequestBuilder(OpenSearchClient client, ActionType action) { super(client, action, new NodesUsageRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/remote/RemoteInfoRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/remote/RemoteInfoRequestBuilder.java index bd55377ade766..30a8f2b96f030 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/remote/RemoteInfoRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/remote/RemoteInfoRequestBuilder.java @@ -20,11 +20,11 @@ package org.elasticsearch.action.admin.cluster.remote; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public final class RemoteInfoRequestBuilder extends ActionRequestBuilder { - public RemoteInfoRequestBuilder(ElasticsearchClient client, RemoteInfoAction action) { + public RemoteInfoRequestBuilder(OpenSearchClient client, RemoteInfoAction action) { super(client, action, new RemoteInfoRequest()); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequestBuilder.java index 2f7e6aefdcc94..cd32533c16d5e 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/cleanup/CleanupRepositoryRequestBuilder.java @@ -20,14 +20,14 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class CleanupRepositoryRequestBuilder extends MasterNodeOperationRequestBuilder { - public CleanupRepositoryRequestBuilder(ElasticsearchClient client, ActionType action, - String repository) { + public CleanupRepositoryRequestBuilder(OpenSearchClient client, ActionType action, + String repository) { super(client, action, new CleanupRepositoryRequest(repository)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequestBuilder.java index 6b1fc0a8ed13e..9cc4e7129760b 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/delete/DeleteRepositoryRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Builder for unregister repository request @@ -32,14 +32,14 @@ public class DeleteRepositoryRequestBuilder /** * Constructs unregister repository request builder */ - public DeleteRepositoryRequestBuilder(ElasticsearchClient client, DeleteRepositoryAction action) { + public DeleteRepositoryRequestBuilder(OpenSearchClient client, DeleteRepositoryAction action) { super(client, action, new DeleteRepositoryRequest()); } /** * Constructs unregister repository request builder with specified repository name */ - public DeleteRepositoryRequestBuilder(ElasticsearchClient client, DeleteRepositoryAction action, String name) { + public DeleteRepositoryRequestBuilder(OpenSearchClient client, DeleteRepositoryAction action, String name) { super(client, action, new DeleteRepositoryRequest(name)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequestBuilder.java index d20915e617b3a..7e361f874e685 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/get/GetRepositoriesRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.repositories.get; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.util.ArrayUtils; /** @@ -32,14 +32,14 @@ public class GetRepositoriesRequestBuilder /** * Creates new get repository request builder */ - public GetRepositoriesRequestBuilder(ElasticsearchClient client, GetRepositoriesAction action) { + public GetRepositoriesRequestBuilder(OpenSearchClient client, GetRepositoriesAction action) { super(client, action, new GetRepositoriesRequest()); } /** * Creates new get repository request builder */ - public GetRepositoriesRequestBuilder(ElasticsearchClient client, GetRepositoriesAction action, String... repositories) { + public GetRepositoriesRequestBuilder(OpenSearchClient client, GetRepositoriesAction action, String... repositories) { super(client, action, new GetRepositoriesRequest(repositories)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequestBuilder.java index 9f17a6ac43a3c..2e64bc17a5a21 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/put/PutRepositoryRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; @@ -36,14 +36,14 @@ public class PutRepositoryRequestBuilder /** * Constructs register repository request */ - public PutRepositoryRequestBuilder(ElasticsearchClient client, PutRepositoryAction action) { + public PutRepositoryRequestBuilder(OpenSearchClient client, PutRepositoryAction action) { super(client, action, new PutRepositoryRequest()); } /** * Constructs register repository request for the repository with a given name */ - public PutRepositoryRequestBuilder(ElasticsearchClient client, PutRepositoryAction action, String name) { + public PutRepositoryRequestBuilder(OpenSearchClient client, PutRepositoryAction action, String name) { super(client, action, new PutRepositoryRequest(name)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequestBuilder.java index 6f7067ecbb653..6ed428e0c6baf 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/repositories/verify/VerifyRepositoryRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.repositories.verify; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Builder for verify repository request @@ -31,14 +31,14 @@ public class VerifyRepositoryRequestBuilder /** * Constructs unregister repository request builder */ - public VerifyRepositoryRequestBuilder(ElasticsearchClient client, VerifyRepositoryAction action) { + public VerifyRepositoryRequestBuilder(OpenSearchClient client, VerifyRepositoryAction action) { super(client, action, new VerifyRepositoryRequest()); } /** * Constructs unregister repository request builder with specified repository name */ - public VerifyRepositoryRequestBuilder(ElasticsearchClient client, VerifyRepositoryAction action, String name) { + public VerifyRepositoryRequestBuilder(OpenSearchClient client, VerifyRepositoryAction action, String name) { super(client, action, new VerifyRepositoryRequest(name)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java index 7cdbe3c62b2f7..3b95c008e3cce 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.reroute; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.routing.allocation.command.AllocationCommand; /** @@ -28,7 +28,7 @@ */ public class ClusterRerouteRequestBuilder extends AcknowledgedRequestBuilder { - public ClusterRerouteRequestBuilder(ElasticsearchClient client, ClusterRerouteAction action) { + public ClusterRerouteRequestBuilder(OpenSearchClient client, ClusterRerouteAction action) { super(client, action, new ClusterRerouteRequest()); } @@ -67,4 +67,4 @@ public ClusterRerouteRequestBuilder setRetryFailed(boolean retryFailed) { request.setRetryFailed(retryFailed); return this; } -} \ No newline at end of file +} diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/settings/ClusterUpdateSettingsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/settings/ClusterUpdateSettingsRequestBuilder.java index b7aa57cd6e87a..24b27cbb3840f 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/settings/ClusterUpdateSettingsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/settings/ClusterUpdateSettingsRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.settings; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; @@ -32,7 +32,7 @@ public class ClusterUpdateSettingsRequestBuilder extends AcknowledgedRequestBuilder { - public ClusterUpdateSettingsRequestBuilder(ElasticsearchClient client, ClusterUpdateSettingsAction action) { + public ClusterUpdateSettingsRequestBuilder(OpenSearchClient client, ClusterUpdateSettingsAction action) { super(client, action, new ClusterUpdateSettingsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java index df1028a32b977..8a827101627d5 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/shards/ClusterSearchShardsRequestBuilder.java @@ -21,12 +21,12 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class ClusterSearchShardsRequestBuilder extends MasterNodeReadOperationRequestBuilder { - public ClusterSearchShardsRequestBuilder(ElasticsearchClient client, ClusterSearchShardsAction action) { + public ClusterSearchShardsRequestBuilder(OpenSearchClient client, ClusterSearchShardsAction action) { super(client, action, new ClusterSearchShardsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequestBuilder.java index 5139633fc2d26..309c79a37bece 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/clone/CloneSnapshotRequestBuilder.java @@ -23,18 +23,18 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Strings; public class CloneSnapshotRequestBuilder extends MasterNodeOperationRequestBuilder { - protected CloneSnapshotRequestBuilder(ElasticsearchClient client, ActionType action, + protected CloneSnapshotRequestBuilder(OpenSearchClient client, ActionType action, CloneSnapshotRequest request) { super(client, action, request); } - public CloneSnapshotRequestBuilder(ElasticsearchClient client, ActionType action, + public CloneSnapshotRequestBuilder(OpenSearchClient client, ActionType action, String repository, String source, String target) { this(client, action, new CloneSnapshotRequest(repository, source, target, Strings.EMPTY_ARRAY)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequestBuilder.java index 909b0a6360bc3..f5ab02598f786 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/create/CreateSnapshotRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; @@ -36,14 +36,14 @@ public class CreateSnapshotRequestBuilder extends MasterNodeOperationRequestBuil /** * Constructs a new create snapshot request builder */ - public CreateSnapshotRequestBuilder(ElasticsearchClient client, CreateSnapshotAction action) { + public CreateSnapshotRequestBuilder(OpenSearchClient client, CreateSnapshotAction action) { super(client, action, new CreateSnapshotRequest()); } /** * Constructs a new create snapshot request builder with specified repository and snapshot names */ - public CreateSnapshotRequestBuilder(ElasticsearchClient client, CreateSnapshotAction action, String repository, String snapshot) { + public CreateSnapshotRequestBuilder(OpenSearchClient client, CreateSnapshotAction action, String repository, String snapshot) { super(client, action, new CreateSnapshotRequest(repository, snapshot)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequestBuilder.java index ac429d85269e4..4de443ca34527 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/delete/DeleteSnapshotRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Delete snapshot request builder @@ -32,14 +32,14 @@ public class DeleteSnapshotRequestBuilder extends MasterNodeOperationRequestBuil /** * Constructs delete snapshot request builder */ - public DeleteSnapshotRequestBuilder(ElasticsearchClient client, DeleteSnapshotAction action) { + public DeleteSnapshotRequestBuilder(OpenSearchClient client, DeleteSnapshotAction action) { super(client, action, new DeleteSnapshotRequest()); } /** * Constructs delete snapshot request builder with specified repository and snapshot names */ - public DeleteSnapshotRequestBuilder(ElasticsearchClient client, DeleteSnapshotAction action, String repository, String... snapshots) { + public DeleteSnapshotRequestBuilder(OpenSearchClient client, DeleteSnapshotAction action, String repository, String... snapshots) { super(client, action, new DeleteSnapshotRequest(repository, snapshots)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsRequestBuilder.java index 052f8da0c7508..f5396606568ad 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/get/GetSnapshotsRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.get; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.util.ArrayUtils; /** @@ -32,14 +32,14 @@ public class GetSnapshotsRequestBuilder extends MasterNodeOperationRequestBuilde /** * Constructs the new get snapshot request */ - public GetSnapshotsRequestBuilder(ElasticsearchClient client, GetSnapshotsAction action) { + public GetSnapshotsRequestBuilder(OpenSearchClient client, GetSnapshotsAction action) { super(client, action, new GetSnapshotsRequest()); } /** * Constructs the new get snapshot request with specified repository */ - public GetSnapshotsRequestBuilder(ElasticsearchClient client, GetSnapshotsAction action, String repository) { + public GetSnapshotsRequestBuilder(OpenSearchClient client, GetSnapshotsAction action, String repository) { super(client, action, new GetSnapshotsRequest(repository)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java index 08d509ce3ac74..7e99667c94c4a 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/restore/RestoreSnapshotRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; @@ -37,14 +37,14 @@ public class RestoreSnapshotRequestBuilder extends MasterNodeOperationRequestBui /** * Constructs new restore snapshot request builder */ - public RestoreSnapshotRequestBuilder(ElasticsearchClient client, RestoreSnapshotAction action) { + public RestoreSnapshotRequestBuilder(OpenSearchClient client, RestoreSnapshotAction action) { super(client, action, new RestoreSnapshotRequest()); } /** * Constructs new restore snapshot request builder with specified repository and snapshot names */ - public RestoreSnapshotRequestBuilder(ElasticsearchClient client, RestoreSnapshotAction action, String repository, String name) { + public RestoreSnapshotRequestBuilder(OpenSearchClient client, RestoreSnapshotAction action, String repository, String name) { super(client, action, new RestoreSnapshotRequest(repository, name)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequestBuilder.java index 0424f858d3388..27dc4b434fa25 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/snapshots/status/SnapshotsStatusRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.status; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.util.ArrayUtils; /** @@ -32,14 +32,14 @@ public class SnapshotsStatusRequestBuilder extends MasterNodeOperationRequestBui /** * Constructs the new snapshot status request */ - public SnapshotsStatusRequestBuilder(ElasticsearchClient client, SnapshotsStatusAction action) { + public SnapshotsStatusRequestBuilder(OpenSearchClient client, SnapshotsStatusAction action) { super(client, action, new SnapshotsStatusRequest()); } /** * Constructs the new snapshot status request with specified repository */ - public SnapshotsStatusRequestBuilder(ElasticsearchClient client, SnapshotsStatusAction action, String repository) { + public SnapshotsStatusRequestBuilder(OpenSearchClient client, SnapshotsStatusAction action, String repository) { super(client, action, new SnapshotsStatusRequest(repository)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestBuilder.java index 2c5f73c9b51c9..091636f9a11e4 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/state/ClusterStateRequestBuilder.java @@ -21,13 +21,13 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; public class ClusterStateRequestBuilder extends MasterNodeReadOperationRequestBuilder { - public ClusterStateRequestBuilder(ElasticsearchClient client, ClusterStateAction action) { + public ClusterStateRequestBuilder(OpenSearchClient client, ClusterStateAction action) { super(client, action, new ClusterStateRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsRequestBuilder.java index bda418cdf0df0..7adb4c95ba6c3 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsRequestBuilder.java @@ -20,12 +20,12 @@ package org.elasticsearch.action.admin.cluster.stats; import org.elasticsearch.action.support.nodes.NodesOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class ClusterStatsRequestBuilder extends NodesOperationRequestBuilder { - public ClusterStatsRequestBuilder(ElasticsearchClient client, ClusterStatsAction action) { + public ClusterStatsRequestBuilder(OpenSearchClient client, ClusterStatsAction action) { super(client, action, new ClusterStatsRequest()); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequestBuilder.java index 132f9dc08a330..98d4b1bb5d87e 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/DeleteStoredScriptRequestBuilder.java @@ -21,12 +21,12 @@ import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class DeleteStoredScriptRequestBuilder extends AcknowledgedRequestBuilder { - public DeleteStoredScriptRequestBuilder(ElasticsearchClient client, DeleteStoredScriptAction action) { + public DeleteStoredScriptRequestBuilder(OpenSearchClient client, DeleteStoredScriptAction action) { super(client, action, new DeleteStoredScriptRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/GetStoredScriptRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/GetStoredScriptRequestBuilder.java index 75708c929f584..58fd475b9ecea 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/GetStoredScriptRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/GetStoredScriptRequestBuilder.java @@ -20,13 +20,13 @@ package org.elasticsearch.action.admin.cluster.storedscripts; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class GetStoredScriptRequestBuilder extends MasterNodeReadOperationRequestBuilder { - public GetStoredScriptRequestBuilder(ElasticsearchClient client, GetStoredScriptAction action) { + public GetStoredScriptRequestBuilder(OpenSearchClient client, GetStoredScriptAction action) { super(client, action, new GetStoredScriptRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/PutStoredScriptRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/PutStoredScriptRequestBuilder.java index dc505596607b7..64ce842bbed06 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/PutStoredScriptRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/storedscripts/PutStoredScriptRequestBuilder.java @@ -21,14 +21,14 @@ import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; public class PutStoredScriptRequestBuilder extends AcknowledgedRequestBuilder { - public PutStoredScriptRequestBuilder(ElasticsearchClient client, PutStoredScriptAction action) { + public PutStoredScriptRequestBuilder(OpenSearchClient client, PutStoredScriptAction action) { super(client, action, new PutStoredScriptRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/cluster/tasks/PendingClusterTasksRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/cluster/tasks/PendingClusterTasksRequestBuilder.java index 062b21cd4cd85..efcf1cc21ef1a 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/cluster/tasks/PendingClusterTasksRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/cluster/tasks/PendingClusterTasksRequestBuilder.java @@ -20,12 +20,12 @@ package org.elasticsearch.action.admin.cluster.tasks; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class PendingClusterTasksRequestBuilder extends MasterNodeReadOperationRequestBuilder { - public PendingClusterTasksRequestBuilder(ElasticsearchClient client, PendingClusterTasksAction action) { + public PendingClusterTasksRequestBuilder(OpenSearchClient client, PendingClusterTasksAction action) { super(client, action, new PendingClusterTasksRequest()); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/alias/IndicesAliasesRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/alias/IndicesAliasesRequestBuilder.java index 6608da9189bdc..7d7d85507d8f4 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/alias/IndicesAliasesRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/alias/IndicesAliasesRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest.AliasActions; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.index.query.QueryBuilder; import java.util.Map; @@ -33,7 +33,7 @@ public class IndicesAliasesRequestBuilder extends AcknowledgedRequestBuilder { - public IndicesAliasesRequestBuilder(ElasticsearchClient client, IndicesAliasesAction action) { + public IndicesAliasesRequestBuilder(OpenSearchClient client, IndicesAliasesAction action) { super(client, action, new IndicesAliasesRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java index d889d15ce9c70..8f0692e2a2728 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/alias/exists/AliasesExistRequestBuilder.java @@ -20,11 +20,11 @@ package org.elasticsearch.action.admin.indices.alias.exists; import org.elasticsearch.action.admin.indices.alias.get.BaseAliasesRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class AliasesExistRequestBuilder extends BaseAliasesRequestBuilder { - public AliasesExistRequestBuilder(ElasticsearchClient client, AliasesExistAction action, String... aliases) { + public AliasesExistRequestBuilder(OpenSearchClient client, AliasesExistAction action, String... aliases) { super(client, action, aliases); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/BaseAliasesRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/BaseAliasesRequestBuilder.java index 57aa9cb468e5e..5125bd7c9147e 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/BaseAliasesRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/BaseAliasesRequestBuilder.java @@ -23,14 +23,14 @@ import org.elasticsearch.action.ActionResponse; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.util.ArrayUtils; public abstract class BaseAliasesRequestBuilder> extends MasterNodeReadOperationRequestBuilder { - public BaseAliasesRequestBuilder(ElasticsearchClient client, ActionType action, String... aliases) { + public BaseAliasesRequestBuilder(OpenSearchClient client, ActionType action, String... aliases) { super(client, action, new GetAliasesRequest(aliases)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/GetAliasesRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/GetAliasesRequestBuilder.java index fa7101eba5ad6..8a1aab148851b 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/GetAliasesRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/alias/get/GetAliasesRequestBuilder.java @@ -19,11 +19,11 @@ package org.elasticsearch.action.admin.indices.alias.get; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class GetAliasesRequestBuilder extends BaseAliasesRequestBuilder { - public GetAliasesRequestBuilder(ElasticsearchClient client, GetAliasesAction action, String... aliases) { + public GetAliasesRequestBuilder(OpenSearchClient client, GetAliasesAction action, String... aliases) { super(client, action, aliases); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/AnalyzeRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/AnalyzeRequestBuilder.java index 2bd1724c5e69f..44dc8cec35b0c 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/AnalyzeRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/analyze/AnalyzeRequestBuilder.java @@ -19,18 +19,18 @@ package org.elasticsearch.action.admin.indices.analyze; import org.elasticsearch.action.support.single.shard.SingleShardOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import java.util.Map; public class AnalyzeRequestBuilder extends SingleShardOperationRequestBuilder { - public AnalyzeRequestBuilder(ElasticsearchClient client, AnalyzeAction action) { + public AnalyzeRequestBuilder(OpenSearchClient client, AnalyzeAction action) { super(client, action, new AnalyzeAction.Request()); } - public AnalyzeRequestBuilder(ElasticsearchClient client, AnalyzeAction action, String index, String... text) { + public AnalyzeRequestBuilder(OpenSearchClient client, AnalyzeAction action, String index, String... text) { super(client, action, new AnalyzeAction.Request(index).text(text)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequestBuilder.java index 7a2bd9fd0f484..21ad9bd3e2121 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/cache/clear/ClearIndicesCacheRequestBuilder.java @@ -20,12 +20,12 @@ package org.elasticsearch.action.admin.indices.cache.clear; import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class ClearIndicesCacheRequestBuilder extends BroadcastOperationRequestBuilder { - public ClearIndicesCacheRequestBuilder(ElasticsearchClient client, ClearIndicesCacheAction action) { + public ClearIndicesCacheRequestBuilder(OpenSearchClient client, ClearIndicesCacheAction action) { super(client, action, new ClearIndicesCacheRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequestBuilder.java index 7db79e0c3e550..1163e2c95ce5f 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/close/CloseIndexRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Builder for close index request @@ -30,11 +30,11 @@ public class CloseIndexRequestBuilder extends AcknowledgedRequestBuilder { - public CloseIndexRequestBuilder(ElasticsearchClient client, CloseIndexAction action) { + public CloseIndexRequestBuilder(OpenSearchClient client, CloseIndexAction action) { super(client, action, new CloseIndexRequest()); } - public CloseIndexRequestBuilder(ElasticsearchClient client, CloseIndexAction action, String... indices) { + public CloseIndexRequestBuilder(OpenSearchClient client, CloseIndexAction action, String... indices) { super(client, action, new CloseIndexRequest(indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequestBuilder.java index 93b4184f958bc..3a2a5213fbc92 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.admin.indices.alias.Alias; import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.LoggingDeprecationHandler; @@ -37,11 +37,11 @@ public class CreateIndexRequestBuilder extends AcknowledgedRequestBuilder { - public CreateIndexRequestBuilder(ElasticsearchClient client, CreateIndexAction action) { + public CreateIndexRequestBuilder(OpenSearchClient client, CreateIndexAction action) { super(client, action, new CreateIndexRequest()); } - public CreateIndexRequestBuilder(ElasticsearchClient client, CreateIndexAction action, String index) { + public CreateIndexRequestBuilder(OpenSearchClient client, CreateIndexAction action, String index) { super(client, action, new CreateIndexRequest(index)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequestBuilder.java index 10663a8dece39..5eb6c8169d469 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/delete/DeleteIndexRequestBuilder.java @@ -22,12 +22,12 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class DeleteIndexRequestBuilder extends AcknowledgedRequestBuilder { - public DeleteIndexRequestBuilder(ElasticsearchClient client, DeleteIndexAction action, String... indices) { + public DeleteIndexRequestBuilder(OpenSearchClient client, DeleteIndexAction action, String... indices) { super(client, action, new DeleteIndexRequest(indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/IndicesExistsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/IndicesExistsRequestBuilder.java index 39a2ca7ef0a13..41cdb908aa0c2 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/IndicesExistsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/exists/indices/IndicesExistsRequestBuilder.java @@ -20,12 +20,12 @@ package org.elasticsearch.action.admin.indices.exists.indices; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class IndicesExistsRequestBuilder extends MasterNodeReadOperationRequestBuilder { - public IndicesExistsRequestBuilder(ElasticsearchClient client, IndicesExistsAction action, String... indices) { + public IndicesExistsRequestBuilder(OpenSearchClient client, IndicesExistsAction action, String... indices) { super(client, action, new IndicesExistsRequest(indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TypesExistsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TypesExistsRequestBuilder.java index 607a423605bfc..e9162ce890023 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TypesExistsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/exists/types/TypesExistsRequestBuilder.java @@ -20,7 +20,7 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Strings; /** @@ -33,11 +33,11 @@ public class TypesExistsRequestBuilder /** * @param indices What indices to check for types */ - public TypesExistsRequestBuilder(ElasticsearchClient client, TypesExistsAction action, String... indices) { + public TypesExistsRequestBuilder(OpenSearchClient client, TypesExistsAction action, String... indices) { super(client, action, new TypesExistsRequest(indices, Strings.EMPTY_ARRAY)); } - TypesExistsRequestBuilder(ElasticsearchClient client, TypesExistsAction action) { + TypesExistsRequestBuilder(OpenSearchClient client, TypesExistsAction action) { super(client, action, new TypesExistsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequestBuilder.java index bddf5ce044949..cebcd7b11f880 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/flush/FlushRequestBuilder.java @@ -20,11 +20,11 @@ package org.elasticsearch.action.admin.indices.flush; import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class FlushRequestBuilder extends BroadcastOperationRequestBuilder { - public FlushRequestBuilder(ElasticsearchClient client, FlushAction action) { + public FlushRequestBuilder(OpenSearchClient client, FlushAction action) { super(client, action, new FlushRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/flush/SyncedFlushRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/flush/SyncedFlushRequestBuilder.java index aee7c4688bb6c..535add35953d1 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/flush/SyncedFlushRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/flush/SyncedFlushRequestBuilder.java @@ -21,11 +21,11 @@ import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class SyncedFlushRequestBuilder extends ActionRequestBuilder { - public SyncedFlushRequestBuilder(ElasticsearchClient client, SyncedFlushAction action) { + public SyncedFlushRequestBuilder(OpenSearchClient client, SyncedFlushAction action) { super(client, action, new SyncedFlushRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java index 29f6891fd4bc2..332595a18d85f 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/forcemerge/ForceMergeRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.forcemerge; import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * A request to force merge one or more indices. In order to force merge all @@ -32,7 +32,7 @@ public class ForceMergeRequestBuilder extends BroadcastOperationRequestBuilder { - public ForceMergeRequestBuilder(ElasticsearchClient client, ForceMergeAction action) { + public ForceMergeRequestBuilder(OpenSearchClient client, ForceMergeAction action) { super(client, action, new ForceMergeRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/get/GetIndexRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/get/GetIndexRequestBuilder.java index 677bbeee48531..3977130e6d320 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/get/GetIndexRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/get/GetIndexRequestBuilder.java @@ -21,11 +21,11 @@ import org.elasticsearch.action.admin.indices.get.GetIndexRequest.Feature; import org.elasticsearch.action.support.master.info.ClusterInfoRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class GetIndexRequestBuilder extends ClusterInfoRequestBuilder { - public GetIndexRequestBuilder(ElasticsearchClient client, GetIndexAction action, String... indices) { + public GetIndexRequestBuilder(OpenSearchClient client, GetIndexAction action, String... indices) { super(client, action, new GetIndexRequest().indices(indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/get/GetFieldMappingsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/get/GetFieldMappingsRequestBuilder.java index cbd0539c24485..3fd50d25024b0 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/get/GetFieldMappingsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/get/GetFieldMappingsRequestBuilder.java @@ -21,14 +21,14 @@ import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.util.ArrayUtils; /** A helper class to build {@link GetFieldMappingsRequest} objects */ public class GetFieldMappingsRequestBuilder extends ActionRequestBuilder { - public GetFieldMappingsRequestBuilder(ElasticsearchClient client, GetFieldMappingsAction action, String... indices) { + public GetFieldMappingsRequestBuilder(OpenSearchClient client, GetFieldMappingsAction action, String... indices) { super(client, action, new GetFieldMappingsRequest().indices(indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/get/GetMappingsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/get/GetMappingsRequestBuilder.java index f2e49ece9ea14..a707d0c75406e 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/get/GetMappingsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/get/GetMappingsRequestBuilder.java @@ -20,12 +20,12 @@ package org.elasticsearch.action.admin.indices.mapping.get; import org.elasticsearch.action.support.master.info.ClusterInfoRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class GetMappingsRequestBuilder extends ClusterInfoRequestBuilder { - public GetMappingsRequestBuilder(ElasticsearchClient client, GetMappingsAction action, String... indices) { + public GetMappingsRequestBuilder(OpenSearchClient client, GetMappingsAction action, String... indices) { super(client, action, new GetMappingsRequest().indices(indices)); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequestBuilder.java index f0f39303c241d..d3ebc7a651f95 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/mapping/put/PutMappingRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.Index; @@ -35,7 +35,7 @@ public class PutMappingRequestBuilder extends AcknowledgedRequestBuilder { - public PutMappingRequestBuilder(ElasticsearchClient client, PutMappingAction action) { + public PutMappingRequestBuilder(OpenSearchClient client, PutMappingAction action) { super(client, action, new PutMappingRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/open/OpenIndexRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/open/OpenIndexRequestBuilder.java index ab962fe34663b..3462c74d4a589 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/open/OpenIndexRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/open/OpenIndexRequestBuilder.java @@ -22,18 +22,18 @@ import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Builder for for open index request */ public class OpenIndexRequestBuilder extends AcknowledgedRequestBuilder { - public OpenIndexRequestBuilder(ElasticsearchClient client, OpenIndexAction action) { + public OpenIndexRequestBuilder(OpenSearchClient client, OpenIndexAction action) { super(client, action, new OpenIndexRequest()); } - public OpenIndexRequestBuilder(ElasticsearchClient client, OpenIndexAction action, String... indices) { + public OpenIndexRequestBuilder(OpenSearchClient client, OpenIndexAction action, String... indices) { super(client, action, new OpenIndexRequest(indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/readonly/AddIndexBlockRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/readonly/AddIndexBlockRequestBuilder.java index ba2ba5434d7cb..d7d0cd939f9f6 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/readonly/AddIndexBlockRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/readonly/AddIndexBlockRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.metadata.IndexMetadata.APIBlock; /** @@ -30,7 +30,7 @@ public class AddIndexBlockRequestBuilder extends AcknowledgedRequestBuilder { - public AddIndexBlockRequestBuilder(ElasticsearchClient client, AddIndexBlockAction action, APIBlock block, String... indices) { + public AddIndexBlockRequestBuilder(OpenSearchClient client, AddIndexBlockAction action, APIBlock block, String... indices) { super(client, action, new AddIndexBlockRequest(block, indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryRequestBuilder.java index 42b6dae859d7b..1648bfd622b9d 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/recovery/RecoveryRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.recovery; import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Recovery information request builder. @@ -30,7 +30,7 @@ public class RecoveryRequestBuilder extends BroadcastOperationRequestBuilder { - public RefreshRequestBuilder(ElasticsearchClient client, RefreshAction action) { + public RefreshRequestBuilder(OpenSearchClient client, RefreshAction action) { super(client, action, new RefreshRequest()); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/rollover/RolloverRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/rollover/RolloverRequestBuilder.java index b06c8f35f94e5..b82abcc0790e9 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/rollover/RolloverRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/rollover/RolloverRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.admin.indices.alias.Alias; import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.ByteSizeValue; import org.elasticsearch.common.unit.TimeValue; @@ -30,7 +30,7 @@ public class RolloverRequestBuilder extends MasterNodeOperationRequestBuilder { - public RolloverRequestBuilder(ElasticsearchClient client, RolloverAction action) { + public RolloverRequestBuilder(OpenSearchClient client, RolloverAction action) { super(client, action, new RolloverRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestBuilder.java index 27ec8fb6a716e..be9abe9e9c4a4 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/segments/IndicesSegmentsRequestBuilder.java @@ -20,12 +20,12 @@ package org.elasticsearch.action.admin.indices.segments; import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class IndicesSegmentsRequestBuilder extends BroadcastOperationRequestBuilder { - public IndicesSegmentsRequestBuilder(ElasticsearchClient client, IndicesSegmentsAction action) { + public IndicesSegmentsRequestBuilder(OpenSearchClient client, IndicesSegmentsAction action) { super(client, action, new IndicesSegmentsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsRequestBuilder.java index c4b58e90e6ebf..76d9482554e10 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsRequestBuilder.java @@ -21,13 +21,13 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.util.ArrayUtils; public class GetSettingsRequestBuilder extends MasterNodeReadOperationRequestBuilder { - public GetSettingsRequestBuilder(ElasticsearchClient client, GetSettingsAction action, String... indices) { + public GetSettingsRequestBuilder(OpenSearchClient client, GetSettingsAction action, String... indices) { super(client, action, new GetSettingsRequest().indices(indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/settings/put/UpdateSettingsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/settings/put/UpdateSettingsRequestBuilder.java index af29429785b19..f06c69a7d91e4 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/settings/put/UpdateSettingsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/settings/put/UpdateSettingsRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentType; @@ -34,7 +34,7 @@ public class UpdateSettingsRequestBuilder extends AcknowledgedRequestBuilder { - public UpdateSettingsRequestBuilder(ElasticsearchClient client, UpdateSettingsAction action, String... indices) { + public UpdateSettingsRequestBuilder(OpenSearchClient client, UpdateSettingsAction action, String... indices) { super(client, action, new UpdateSettingsRequest(indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestBuilder.java index 6146dcf87d691..66f3de775baae 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/shards/IndicesShardStoreRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.health.ClusterHealthStatus; /** @@ -33,7 +33,7 @@ public class IndicesShardStoreRequestBuilder extends MasterNodeReadOperationRequ IndicesShardStoresResponse, IndicesShardStoreRequestBuilder> { - public IndicesShardStoreRequestBuilder(ElasticsearchClient client, ActionType action, String... indices) { + public IndicesShardStoreRequestBuilder(OpenSearchClient client, ActionType action, String... indices) { super(client, action, new IndicesShardStoresRequest(indices)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/shrink/ResizeRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/shrink/ResizeRequestBuilder.java index eddd3a0da203a..bf824509966bb 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/shrink/ResizeRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/shrink/ResizeRequestBuilder.java @@ -22,12 +22,12 @@ import org.elasticsearch.action.admin.indices.create.CreateIndexRequest; import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.settings.Settings; public class ResizeRequestBuilder extends AcknowledgedRequestBuilder { - public ResizeRequestBuilder(ElasticsearchClient client, ActionType action) { + public ResizeRequestBuilder(OpenSearchClient client, ActionType action) { super(client, action, new ResizeRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java index 525e6f13a908d..85ada850f9719 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/stats/IndicesStatsRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.stats; import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * A request to get indices level stats. Allow to enable different stats to be returned. @@ -34,7 +34,7 @@ public class IndicesStatsRequestBuilder extends BroadcastOperationRequestBuilder { - public IndicesStatsRequestBuilder(ElasticsearchClient client, IndicesStatsAction action) { + public IndicesStatsRequestBuilder(OpenSearchClient client, IndicesStatsAction action) { super(client, action, new IndicesStatsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateRequestBuilder.java index 9826404c598d9..790ff60c7c07f 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/template/delete/DeleteIndexTemplateRequestBuilder.java @@ -20,16 +20,16 @@ import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class DeleteIndexTemplateRequestBuilder extends MasterNodeOperationRequestBuilder { - public DeleteIndexTemplateRequestBuilder(ElasticsearchClient client, DeleteIndexTemplateAction action) { + public DeleteIndexTemplateRequestBuilder(OpenSearchClient client, DeleteIndexTemplateAction action) { super(client, action, new DeleteIndexTemplateRequest()); } - public DeleteIndexTemplateRequestBuilder(ElasticsearchClient client, DeleteIndexTemplateAction action, String name) { + public DeleteIndexTemplateRequestBuilder(OpenSearchClient client, DeleteIndexTemplateAction action, String name) { super(client, action, new DeleteIndexTemplateRequest(name)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesRequestBuilder.java index 58d3587518c09..804fc125c9859 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/template/get/GetIndexTemplatesRequestBuilder.java @@ -19,18 +19,18 @@ package org.elasticsearch.action.admin.indices.template.get; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class GetIndexTemplatesRequestBuilder extends MasterNodeReadOperationRequestBuilder< GetIndexTemplatesRequest, GetIndexTemplatesResponse, GetIndexTemplatesRequestBuilder> { - public GetIndexTemplatesRequestBuilder(ElasticsearchClient client, GetIndexTemplatesAction action) { + public GetIndexTemplatesRequestBuilder(OpenSearchClient client, GetIndexTemplatesAction action) { super(client, action, new GetIndexTemplatesRequest()); } - public GetIndexTemplatesRequestBuilder(ElasticsearchClient client, GetIndexTemplatesAction action, String... names) { + public GetIndexTemplatesRequestBuilder(OpenSearchClient client, GetIndexTemplatesAction action, String... names) { super(client, action, new GetIndexTemplatesRequest(names)); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java index d4d1e9f299e69..3c0eb6e07b622 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.admin.indices.alias.Alias; import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -33,11 +33,11 @@ public class PutIndexTemplateRequestBuilder extends MasterNodeOperationRequestBuilder { - public PutIndexTemplateRequestBuilder(ElasticsearchClient client, PutIndexTemplateAction action) { + public PutIndexTemplateRequestBuilder(OpenSearchClient client, PutIndexTemplateAction action) { super(client, action, new PutIndexTemplateRequest()); } - public PutIndexTemplateRequestBuilder(ElasticsearchClient client, PutIndexTemplateAction action, String name) { + public PutIndexTemplateRequestBuilder(OpenSearchClient client, PutIndexTemplateAction action, String name) { super(client, action, new PutIndexTemplateRequest(name)); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java index e359b191ffdba..c08b38c3d31b0 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/get/UpgradeStatusRequestBuilder.java @@ -20,12 +20,12 @@ package org.elasticsearch.action.admin.indices.upgrade.get; import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class UpgradeStatusRequestBuilder extends BroadcastOperationRequestBuilder { - public UpgradeStatusRequestBuilder(ElasticsearchClient client, UpgradeStatusAction action) { + public UpgradeStatusRequestBuilder(OpenSearchClient client, UpgradeStatusAction action) { super(client, action, new UpgradeStatusRequest()); } } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java index e2c20a0e508ba..7ec1ec1a6a3d4 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.upgrade.post; import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * A request to upgrade one or more indices. In order to optimize on all the indices, pass an empty array or @@ -28,7 +28,7 @@ */ public class UpgradeRequestBuilder extends BroadcastOperationRequestBuilder { - public UpgradeRequestBuilder(ElasticsearchClient client, UpgradeAction action) { + public UpgradeRequestBuilder(OpenSearchClient client, UpgradeAction action) { super(client, action, new UpgradeRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeSettingsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeSettingsRequestBuilder.java index 853077a67a752..2831b791c1b3a 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeSettingsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/upgrade/post/UpgradeSettingsRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.Version; import org.elasticsearch.action.support.master.AcknowledgedRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.collect.Tuple; import java.util.Map; @@ -33,7 +33,7 @@ public class UpgradeSettingsRequestBuilder extends AcknowledgedRequestBuilder { - public UpgradeSettingsRequestBuilder(ElasticsearchClient client, UpgradeSettingsAction action) { + public UpgradeSettingsRequestBuilder(OpenSearchClient client, UpgradeSettingsAction action) { super(client, action, new UpgradeSettingsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryRequestBuilder.java index bf34f8b27b4fa..3032a160b8d7f 100644 --- a/server/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/admin/indices/validate/query/ValidateQueryRequestBuilder.java @@ -20,13 +20,13 @@ package org.elasticsearch.action.admin.indices.validate.query; import org.elasticsearch.action.support.broadcast.BroadcastOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.index.query.QueryBuilder; public class ValidateQueryRequestBuilder extends BroadcastOperationRequestBuilder { - public ValidateQueryRequestBuilder(ElasticsearchClient client, ValidateQueryAction action) { + public ValidateQueryRequestBuilder(OpenSearchClient client, ValidateQueryAction action) { super(client, action, new ValidateQueryRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestBuilder.java index 34837d0e696db..28cc2fd8d2f02 100644 --- a/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/bulk/BulkRequestBuilder.java @@ -29,7 +29,7 @@ import org.elasticsearch.action.support.replication.ReplicationRequest; import org.elasticsearch.action.update.UpdateRequest; import org.elasticsearch.action.update.UpdateRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.xcontent.XContentType; @@ -43,18 +43,18 @@ public class BulkRequestBuilder extends ActionRequestBuilder { /** - * @deprecated use {@link #BulkRequestBuilder(ElasticsearchClient, BulkAction, String)} instead + * @deprecated use {@link #BulkRequestBuilder(OpenSearchClient, BulkAction, String)} instead */ @Deprecated - public BulkRequestBuilder(ElasticsearchClient client, BulkAction action, @Nullable String globalIndex, @Nullable String globalType) { + public BulkRequestBuilder(OpenSearchClient client, BulkAction action, @Nullable String globalIndex, @Nullable String globalType) { super(client, action, new BulkRequest(globalIndex, globalType)); } - public BulkRequestBuilder(ElasticsearchClient client, BulkAction action, @Nullable String globalIndex) { + public BulkRequestBuilder(OpenSearchClient client, BulkAction action, @Nullable String globalIndex) { super(client, action, new BulkRequest(globalIndex)); } - public BulkRequestBuilder(ElasticsearchClient client, BulkAction action) { + public BulkRequestBuilder(OpenSearchClient client, BulkAction action) { super(client, action, new BulkRequest()); } @@ -121,7 +121,7 @@ public BulkRequestBuilder add(byte[] data, int from, int length, XContentType xC * Adds a framed data in binary format * @deprecated use {@link #add(byte[], int, int, String, XContentType)} instead */ - @Deprecated + @Deprecated public BulkRequestBuilder add(byte[] data, int from, int length, @Nullable String defaultIndex, @Nullable String defaultType, XContentType xContentType) throws Exception { request.add(data, from, length, defaultIndex, defaultType, xContentType); @@ -135,7 +135,7 @@ public BulkRequestBuilder add(byte[] data, int from, int length, @Nullable Strin XContentType xContentType) throws Exception { request.add(data, from, length, defaultIndex, MapperService.SINGLE_MAPPING_NAME, xContentType); return this; - } + } /** * Sets the number of shard copies that must be active before proceeding with the write. diff --git a/server/src/main/java/org/elasticsearch/action/delete/DeleteRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/delete/DeleteRequestBuilder.java index 71a971111c0d7..150132c37bdaf 100644 --- a/server/src/main/java/org/elasticsearch/action/delete/DeleteRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/delete/DeleteRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.support.WriteRequestBuilder; import org.elasticsearch.action.support.replication.ReplicationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Nullable; import org.elasticsearch.index.VersionType; @@ -31,11 +31,11 @@ public class DeleteRequestBuilder extends ReplicationRequestBuilder implements WriteRequestBuilder { - public DeleteRequestBuilder(ElasticsearchClient client, DeleteAction action) { + public DeleteRequestBuilder(OpenSearchClient client, DeleteAction action) { super(client, action, new DeleteRequest()); } - public DeleteRequestBuilder(ElasticsearchClient client, DeleteAction action, @Nullable String index) { + public DeleteRequestBuilder(OpenSearchClient client, DeleteAction action, @Nullable String index) { super(client, action, new DeleteRequest(index)); } diff --git a/server/src/main/java/org/elasticsearch/action/explain/ExplainRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/explain/ExplainRequestBuilder.java index d2d9bb3b820a8..272b01b24a55f 100644 --- a/server/src/main/java/org/elasticsearch/action/explain/ExplainRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/explain/ExplainRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.explain; import org.elasticsearch.action.support.single.shard.SingleShardOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.index.query.QueryBuilder; @@ -31,11 +31,11 @@ */ public class ExplainRequestBuilder extends SingleShardOperationRequestBuilder { - ExplainRequestBuilder(ElasticsearchClient client, ExplainAction action) { + ExplainRequestBuilder(OpenSearchClient client, ExplainAction action) { super(client, action, new ExplainRequest()); } - public ExplainRequestBuilder(ElasticsearchClient client, ExplainAction action, String index, String type, String id) { + public ExplainRequestBuilder(OpenSearchClient client, ExplainAction action, String index, String type, String id) { super(client, action, new ExplainRequest().index(index).type(type).id(id)); } diff --git a/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequestBuilder.java index b83a6eb426d9e..d575c776fcc99 100644 --- a/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/fieldcaps/FieldCapabilitiesRequestBuilder.java @@ -20,11 +20,11 @@ package org.elasticsearch.action.fieldcaps; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.index.query.QueryBuilder; public class FieldCapabilitiesRequestBuilder extends ActionRequestBuilder { - public FieldCapabilitiesRequestBuilder(ElasticsearchClient client, + public FieldCapabilitiesRequestBuilder(OpenSearchClient client, FieldCapabilitiesAction action, String... indices) { super(client, action, new FieldCapabilitiesRequest().indices(indices)); diff --git a/server/src/main/java/org/elasticsearch/action/get/GetRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/get/GetRequestBuilder.java index 37b9dbe79dfe4..abc5050cdac89 100644 --- a/server/src/main/java/org/elasticsearch/action/get/GetRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/get/GetRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.get; import org.elasticsearch.action.support.single.shard.SingleShardOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Strings; import org.elasticsearch.index.VersionType; @@ -31,11 +31,11 @@ */ public class GetRequestBuilder extends SingleShardOperationRequestBuilder { - public GetRequestBuilder(ElasticsearchClient client, GetAction action) { + public GetRequestBuilder(OpenSearchClient client, GetAction action) { super(client, action, new GetRequest()); } - public GetRequestBuilder(ElasticsearchClient client, GetAction action, @Nullable String index) { + public GetRequestBuilder(OpenSearchClient client, GetAction action, @Nullable String index) { super(client, action, new GetRequest(index)); } diff --git a/server/src/main/java/org/elasticsearch/action/get/MultiGetRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/get/MultiGetRequestBuilder.java index 4385447846b83..621a69aa619cf 100644 --- a/server/src/main/java/org/elasticsearch/action/get/MultiGetRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/get/MultiGetRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.get; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Nullable; /** @@ -28,7 +28,7 @@ */ public class MultiGetRequestBuilder extends ActionRequestBuilder { - public MultiGetRequestBuilder(ElasticsearchClient client, MultiGetAction action) { + public MultiGetRequestBuilder(OpenSearchClient client, MultiGetAction action) { super(client, action, new MultiGetRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java index a7a7e556b7c73..1cb22c8183620 100644 --- a/server/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.DocWriteRequest; import org.elasticsearch.action.support.WriteRequestBuilder; import org.elasticsearch.action.support.replication.ReplicationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentBuilder; @@ -37,11 +37,11 @@ public class IndexRequestBuilder extends ReplicationRequestBuilder implements WriteRequestBuilder { - public IndexRequestBuilder(ElasticsearchClient client, IndexAction action) { + public IndexRequestBuilder(OpenSearchClient client, IndexAction action) { super(client, action, new IndexRequest()); } - public IndexRequestBuilder(ElasticsearchClient client, IndexAction action, @Nullable String index) { + public IndexRequestBuilder(OpenSearchClient client, IndexAction action, @Nullable String index) { super(client, action, new IndexRequest(index)); } diff --git a/server/src/main/java/org/elasticsearch/action/ingest/DeletePipelineRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/ingest/DeletePipelineRequestBuilder.java index b08e0cb247205..ee46c48d896f4 100644 --- a/server/src/main/java/org/elasticsearch/action/ingest/DeletePipelineRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/ingest/DeletePipelineRequestBuilder.java @@ -21,15 +21,15 @@ import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class DeletePipelineRequestBuilder extends ActionRequestBuilder { - public DeletePipelineRequestBuilder(ElasticsearchClient client, DeletePipelineAction action) { + public DeletePipelineRequestBuilder(OpenSearchClient client, DeletePipelineAction action) { super(client, action, new DeletePipelineRequest()); } - public DeletePipelineRequestBuilder(ElasticsearchClient client, DeletePipelineAction action, String id) { + public DeletePipelineRequestBuilder(OpenSearchClient client, DeletePipelineAction action, String id) { super(client, action, new DeletePipelineRequest(id)); } diff --git a/server/src/main/java/org/elasticsearch/action/ingest/GetPipelineRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/ingest/GetPipelineRequestBuilder.java index 1073086998b45..e1b5691326b45 100644 --- a/server/src/main/java/org/elasticsearch/action/ingest/GetPipelineRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/ingest/GetPipelineRequestBuilder.java @@ -20,16 +20,16 @@ package org.elasticsearch.action.ingest; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class GetPipelineRequestBuilder extends MasterNodeReadOperationRequestBuilder { - public GetPipelineRequestBuilder(ElasticsearchClient client, GetPipelineAction action) { + public GetPipelineRequestBuilder(OpenSearchClient client, GetPipelineAction action) { super(client, action, new GetPipelineRequest()); } - public GetPipelineRequestBuilder(ElasticsearchClient client, GetPipelineAction action, String[] ids) { + public GetPipelineRequestBuilder(OpenSearchClient client, GetPipelineAction action, String[] ids) { super(client, action, new GetPipelineRequest(ids)); } diff --git a/server/src/main/java/org/elasticsearch/action/ingest/PutPipelineRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/ingest/PutPipelineRequestBuilder.java index aa2aff8bb9915..1d261d1b8b96d 100644 --- a/server/src/main/java/org/elasticsearch/action/ingest/PutPipelineRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/ingest/PutPipelineRequestBuilder.java @@ -21,17 +21,17 @@ import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; public class PutPipelineRequestBuilder extends ActionRequestBuilder { - public PutPipelineRequestBuilder(ElasticsearchClient client, PutPipelineAction action) { + public PutPipelineRequestBuilder(OpenSearchClient client, PutPipelineAction action) { super(client, action, new PutPipelineRequest()); } - public PutPipelineRequestBuilder(ElasticsearchClient client, PutPipelineAction action, String id, BytesReference source, + public PutPipelineRequestBuilder(OpenSearchClient client, PutPipelineAction action, String id, BytesReference source, XContentType xContentType) { super(client, action, new PutPipelineRequest(id, source, xContentType)); } diff --git a/server/src/main/java/org/elasticsearch/action/ingest/SimulatePipelineRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/ingest/SimulatePipelineRequestBuilder.java index 1a5e863bd55ee..16489d71337bd 100644 --- a/server/src/main/java/org/elasticsearch/action/ingest/SimulatePipelineRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/ingest/SimulatePipelineRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.ingest; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentType; @@ -29,14 +29,14 @@ public class SimulatePipelineRequestBuilder extends ActionRequestBuilder { - public MainRequestBuilder(ElasticsearchClient client, MainAction action) { + public MainRequestBuilder(OpenSearchClient client, MainAction action) { super(client, action, new MainRequest()); } } diff --git a/server/src/main/java/org/elasticsearch/action/search/ClearScrollRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/search/ClearScrollRequestBuilder.java index 6c5d7bba496d6..5774978c9f52d 100644 --- a/server/src/main/java/org/elasticsearch/action/search/ClearScrollRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/search/ClearScrollRequestBuilder.java @@ -20,13 +20,13 @@ package org.elasticsearch.action.search; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import java.util.List; public class ClearScrollRequestBuilder extends ActionRequestBuilder { - public ClearScrollRequestBuilder(ElasticsearchClient client, ClearScrollAction action) { + public ClearScrollRequestBuilder(OpenSearchClient client, ClearScrollAction action) { super(client, action, new ClearScrollRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/search/MultiSearchRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/search/MultiSearchRequestBuilder.java index ce43f47a4979b..201dc5f09837e 100644 --- a/server/src/main/java/org/elasticsearch/action/search/MultiSearchRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/search/MultiSearchRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * A request builder for multiple search requests. @@ -29,7 +29,7 @@ public class MultiSearchRequestBuilder extends ActionRequestBuilder { - public MultiSearchRequestBuilder(ElasticsearchClient client, MultiSearchAction action) { + public MultiSearchRequestBuilder(OpenSearchClient client, MultiSearchAction action) { super(client, action, new MultiSearchRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java index 4b59ccb81ac26..c624f1d64fe3f 100644 --- a/server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.QueryBuilder; @@ -47,7 +47,7 @@ */ public class SearchRequestBuilder extends ActionRequestBuilder { - public SearchRequestBuilder(ElasticsearchClient client, SearchAction action) { + public SearchRequestBuilder(OpenSearchClient client, SearchAction action) { super(client, action, new SearchRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/search/SearchScrollRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/search/SearchScrollRequestBuilder.java index 4afb8d86fbfad..b264a3d7d9838 100644 --- a/server/src/main/java/org/elasticsearch/action/search/SearchScrollRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/search/SearchScrollRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.search; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.search.Scroll; @@ -29,11 +29,11 @@ */ public class SearchScrollRequestBuilder extends ActionRequestBuilder { - public SearchScrollRequestBuilder(ElasticsearchClient client, SearchScrollAction action) { + public SearchScrollRequestBuilder(OpenSearchClient client, SearchScrollAction action) { super(client, action, new SearchScrollRequest()); } - public SearchScrollRequestBuilder(ElasticsearchClient client, SearchScrollAction action, String scrollId) { + public SearchScrollRequestBuilder(OpenSearchClient client, SearchScrollAction action, String scrollId) { super(client, action, new SearchScrollRequest(scrollId)); } diff --git a/server/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequestBuilder.java index dfcca19883e50..f51ad993feb9c 100644 --- a/server/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/broadcast/BroadcastOperationRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.support.IndicesOptions; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public abstract class BroadcastOperationRequestBuilder< Request extends BroadcastRequest, @@ -30,7 +30,7 @@ public abstract class BroadcastOperationRequestBuilder< RequestBuilder extends BroadcastOperationRequestBuilder > extends ActionRequestBuilder { - protected BroadcastOperationRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected BroadcastOperationRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } diff --git a/server/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequestBuilder.java index d37d2d45917fe..cf6f7d1cdad0e 100644 --- a/server/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/master/AcknowledgedRequestBuilder.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.support.master; import org.elasticsearch.action.ActionType; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; /** @@ -29,7 +29,7 @@ public abstract class AcknowledgedRequestBuilder> extends MasterNodeOperationRequestBuilder { - protected AcknowledgedRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected AcknowledgedRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } diff --git a/server/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequestBuilder.java index 08c59b72e0919..9669db75cce42 100644 --- a/server/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/master/MasterNodeOperationRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; /** @@ -32,7 +32,7 @@ public abstract class MasterNodeOperationRequestBuilder> extends ActionRequestBuilder { - protected MasterNodeOperationRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected MasterNodeOperationRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } diff --git a/server/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequestBuilder.java index f385746365e9a..0626fdde94f3e 100644 --- a/server/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/master/MasterNodeReadOperationRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; /** * Base request builder for master node read operations that can be executed on the local node as well @@ -30,7 +30,7 @@ public abstract class MasterNodeReadOperationRequestBuilder> extends MasterNodeOperationRequestBuilder { - protected MasterNodeReadOperationRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected MasterNodeReadOperationRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } diff --git a/server/src/main/java/org/elasticsearch/action/support/master/info/ClusterInfoRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/master/info/ClusterInfoRequestBuilder.java index 41833a563c4e4..4e61c13425966 100644 --- a/server/src/main/java/org/elasticsearch/action/support/master/info/ClusterInfoRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/master/info/ClusterInfoRequestBuilder.java @@ -22,7 +22,7 @@ import org.elasticsearch.action.ActionResponse; import org.elasticsearch.action.support.IndicesOptions; import org.elasticsearch.action.support.master.MasterNodeReadOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.util.ArrayUtils; public abstract class ClusterInfoRequestBuilder, Response extends ActionResponse, @@ -30,7 +30,7 @@ public abstract class ClusterInfoRequestBuilder { - protected ClusterInfoRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected ClusterInfoRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } diff --git a/server/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequestBuilder.java index ca31a956224f3..d9f5221283963 100644 --- a/server/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/nodes/NodesOperationRequestBuilder.java @@ -21,14 +21,14 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; public abstract class NodesOperationRequestBuilder, Response extends BaseNodesResponse, RequestBuilder extends NodesOperationRequestBuilder> extends ActionRequestBuilder { - protected NodesOperationRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected NodesOperationRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } diff --git a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequestBuilder.java index d83319f62f0de..7a5be73a326ad 100644 --- a/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/replication/ReplicationRequestBuilder.java @@ -23,14 +23,14 @@ import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionResponse; import org.elasticsearch.action.support.ActiveShardCount; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; public abstract class ReplicationRequestBuilder, Response extends ActionResponse, RequestBuilder extends ReplicationRequestBuilder> extends ActionRequestBuilder { - protected ReplicationRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected ReplicationRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } diff --git a/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java index 722826615ae21..0acc1b0eab143 100644 --- a/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/single/instance/InstanceShardOperationRequestBuilder.java @@ -22,14 +22,14 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; public abstract class InstanceShardOperationRequestBuilder, Response extends ActionResponse, RequestBuilder extends InstanceShardOperationRequestBuilder> extends ActionRequestBuilder { - protected InstanceShardOperationRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected InstanceShardOperationRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } diff --git a/server/src/main/java/org/elasticsearch/action/support/single/shard/SingleShardOperationRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/single/shard/SingleShardOperationRequestBuilder.java index 197b7e57bfeea..863fb09db57a1 100644 --- a/server/src/main/java/org/elasticsearch/action/support/single/shard/SingleShardOperationRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/single/shard/SingleShardOperationRequestBuilder.java @@ -22,13 +22,13 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.ActionRequestBuilder; import org.elasticsearch.action.ActionResponse; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public abstract class SingleShardOperationRequestBuilder, Response extends ActionResponse, RequestBuilder extends SingleShardOperationRequestBuilder> extends ActionRequestBuilder { - protected SingleShardOperationRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected SingleShardOperationRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } diff --git a/server/src/main/java/org/elasticsearch/action/support/tasks/TasksRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/support/tasks/TasksRequestBuilder.java index 9fba027e751a0..12d2ff702351e 100644 --- a/server/src/main/java/org/elasticsearch/action/support/tasks/TasksRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/support/tasks/TasksRequestBuilder.java @@ -20,7 +20,7 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.tasks.TaskId; @@ -33,7 +33,7 @@ public class TasksRequestBuilder< RequestBuilder extends TasksRequestBuilder > extends ActionRequestBuilder { - protected TasksRequestBuilder(ElasticsearchClient client, ActionType action, Request request) { + protected TasksRequestBuilder(OpenSearchClient client, ActionType action, Request request) { super(client, action, request); } @@ -65,7 +65,7 @@ public final RequestBuilder setTimeout(TimeValue timeout) { } /** - * Match all children of the provided task. + * Match all children of the provided task. */ @SuppressWarnings("unchecked") public final RequestBuilder setParentTaskId(TaskId taskId) { diff --git a/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsRequestBuilder.java index b982c4f720930..68ad23177ae4b 100644 --- a/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/termvectors/MultiTermVectorsRequestBuilder.java @@ -20,12 +20,12 @@ package org.elasticsearch.action.termvectors; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Nullable; public class MultiTermVectorsRequestBuilder extends ActionRequestBuilder { - public MultiTermVectorsRequestBuilder(ElasticsearchClient client, MultiTermVectorsAction action) { + public MultiTermVectorsRequestBuilder(OpenSearchClient client, MultiTermVectorsAction action) { super(client, action, new MultiTermVectorsRequest()); } diff --git a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequestBuilder.java index 80bf769b9714e..71d4bdf479aae 100644 --- a/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequestBuilder.java @@ -20,7 +20,7 @@ package org.elasticsearch.action.termvectors; import org.elasticsearch.action.ActionRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.VersionType; @@ -35,7 +35,7 @@ */ public class TermVectorsRequestBuilder extends ActionRequestBuilder { - public TermVectorsRequestBuilder(ElasticsearchClient client, TermVectorsAction action) { + public TermVectorsRequestBuilder(OpenSearchClient client, TermVectorsAction action) { super(client, action, new TermVectorsRequest()); } @@ -44,7 +44,7 @@ public TermVectorsRequestBuilder(ElasticsearchClient client, TermVectorsAction a * from the provided index. Use {@code index}, {@code type} and * {@code id} to specify the document to load. */ - public TermVectorsRequestBuilder(ElasticsearchClient client, TermVectorsAction action, String index, String type, String id) { + public TermVectorsRequestBuilder(OpenSearchClient client, TermVectorsAction action, String index, String type, String id) { super(client, action, new TermVectorsRequest(index, type, id)); } diff --git a/server/src/main/java/org/elasticsearch/action/update/UpdateRequestBuilder.java b/server/src/main/java/org/elasticsearch/action/update/UpdateRequestBuilder.java index 919f460e8c07b..1848538b9fa75 100644 --- a/server/src/main/java/org/elasticsearch/action/update/UpdateRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/action/update/UpdateRequestBuilder.java @@ -24,7 +24,7 @@ import org.elasticsearch.action.support.WriteRequestBuilder; import org.elasticsearch.action.support.replication.ReplicationRequest; import org.elasticsearch.action.support.single.instance.InstanceShardOperationRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType; @@ -36,11 +36,11 @@ public class UpdateRequestBuilder extends InstanceShardOperationRequestBuilder implements WriteRequestBuilder { - public UpdateRequestBuilder(ElasticsearchClient client, UpdateAction action) { + public UpdateRequestBuilder(OpenSearchClient client, UpdateAction action) { super(client, action, new UpdateRequest()); } - public UpdateRequestBuilder(ElasticsearchClient client, UpdateAction action, String index, String type, String id) { + public UpdateRequestBuilder(OpenSearchClient client, UpdateAction action, String index, String type, String id) { super(client, action, new UpdateRequest(index, type, id)); } diff --git a/server/src/main/java/org/elasticsearch/client/Client.java b/server/src/main/java/org/elasticsearch/client/Client.java index 07871709f5726..088fc3f1fdafc 100644 --- a/server/src/main/java/org/elasticsearch/client/Client.java +++ b/server/src/main/java/org/elasticsearch/client/Client.java @@ -83,7 +83,7 @@ * @see org.elasticsearch.node.Node#client() * @see org.elasticsearch.client.transport.TransportClient */ -public interface Client extends ElasticsearchClient, Releasable { +public interface Client extends OpenSearchClient, Releasable { Setting CLIENT_TYPE_SETTING_S = new Setting<>("client.type", "node", (s) -> { switch (s) { diff --git a/server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java b/server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java index 4701c67987f9b..b70883393b5d7 100644 --- a/server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java +++ b/server/src/main/java/org/elasticsearch/client/ClusterAdminClient.java @@ -127,7 +127,7 @@ * * @see AdminClient#cluster() */ -public interface ClusterAdminClient extends ElasticsearchClient { +public interface ClusterAdminClient extends OpenSearchClient { /** * The health of the cluster. diff --git a/server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java b/server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java index f63ecd4d39e7e..3c083350e542d 100644 --- a/server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java +++ b/server/src/main/java/org/elasticsearch/client/IndicesAdminClient.java @@ -128,7 +128,7 @@ * * @see AdminClient#indices() */ -public interface IndicesAdminClient extends ElasticsearchClient { +public interface IndicesAdminClient extends OpenSearchClient { /** * Indices Exists. diff --git a/server/src/main/java/org/elasticsearch/client/ElasticsearchClient.java b/server/src/main/java/org/elasticsearch/client/OpenSearchClient.java similarity index 98% rename from server/src/main/java/org/elasticsearch/client/ElasticsearchClient.java rename to server/src/main/java/org/elasticsearch/client/OpenSearchClient.java index f59da77d88408..4e35a2db833bf 100644 --- a/server/src/main/java/org/elasticsearch/client/ElasticsearchClient.java +++ b/server/src/main/java/org/elasticsearch/client/OpenSearchClient.java @@ -27,7 +27,7 @@ import org.elasticsearch.action.ActionResponse; import org.elasticsearch.threadpool.ThreadPool; -public interface ElasticsearchClient { +public interface OpenSearchClient { /** * Executes a generic action, denoted by an {@link ActionType}. diff --git a/server/src/main/java/org/elasticsearch/client/support/AbstractClient.java b/server/src/main/java/org/elasticsearch/client/support/AbstractClient.java index d5ad6d73e1bf7..7ea837c3f7c53 100644 --- a/server/src/main/java/org/elasticsearch/client/support/AbstractClient.java +++ b/server/src/main/java/org/elasticsearch/client/support/AbstractClient.java @@ -351,7 +351,7 @@ import org.elasticsearch.client.AdminClient; import org.elasticsearch.client.Client; import org.elasticsearch.client.ClusterAdminClient; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.client.FilterClient; import org.elasticsearch.client.IndicesAdminClient; import org.elasticsearch.cluster.metadata.IndexMetadata.APIBlock; @@ -668,7 +668,7 @@ static class Admin implements AdminClient { private final ClusterAdmin clusterAdmin; private final IndicesAdmin indicesAdmin; - Admin(ElasticsearchClient client) { + Admin(OpenSearchClient client) { this.clusterAdmin = new ClusterAdmin(client); this.indicesAdmin = new IndicesAdmin(client); } @@ -686,9 +686,9 @@ public IndicesAdminClient indices() { static class ClusterAdmin implements ClusterAdminClient { - private final ElasticsearchClient client; + private final OpenSearchClient client; - ClusterAdmin(ElasticsearchClient client) { + ClusterAdmin(OpenSearchClient client) { this.client = client; } @@ -1277,9 +1277,9 @@ public DeleteStoredScriptRequestBuilder prepareDeleteStoredScript(String id){ static class IndicesAdmin implements IndicesAdminClient { - private final ElasticsearchClient client; + private final OpenSearchClient client; - IndicesAdmin(ElasticsearchClient client) { + IndicesAdmin(OpenSearchClient client) { this.client = client; } diff --git a/server/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByScrollRequestBuilder.java b/server/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByScrollRequestBuilder.java index f6b025c8265a5..c8e1a1536a630 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByScrollRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/AbstractBulkByScrollRequestBuilder.java @@ -24,7 +24,7 @@ import org.elasticsearch.action.search.SearchRequestBuilder; import org.elasticsearch.action.support.ActiveShardCount; import org.elasticsearch.action.support.replication.ReplicationRequest; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.QueryBuilder; @@ -34,7 +34,7 @@ public abstract class AbstractBulkByScrollRequestBuilder< extends ActionRequestBuilder { private final SearchRequestBuilder source; - protected AbstractBulkByScrollRequestBuilder(ElasticsearchClient client, + protected AbstractBulkByScrollRequestBuilder(OpenSearchClient client, ActionType action, SearchRequestBuilder source, Request request) { super(client, action, request); this.source = source; diff --git a/server/src/main/java/org/elasticsearch/index/reindex/AbstractBulkIndexByScrollRequestBuilder.java b/server/src/main/java/org/elasticsearch/index/reindex/AbstractBulkIndexByScrollRequestBuilder.java index 0e0382e146da4..9ef84e5ef5afb 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/AbstractBulkIndexByScrollRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/AbstractBulkIndexByScrollRequestBuilder.java @@ -21,7 +21,7 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.script.Script; public abstract class AbstractBulkIndexByScrollRequestBuilder< @@ -29,7 +29,7 @@ public abstract class AbstractBulkIndexByScrollRequestBuilder< Self extends AbstractBulkIndexByScrollRequestBuilder> extends AbstractBulkByScrollRequestBuilder { - protected AbstractBulkIndexByScrollRequestBuilder(ElasticsearchClient client, ActionType action, + protected AbstractBulkIndexByScrollRequestBuilder(OpenSearchClient client, ActionType action, SearchRequestBuilder search, Request request) { super(client, action, search, request); } diff --git a/server/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequestBuilder.java b/server/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequestBuilder.java index 77d304f4c17af..0b98f57222375 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/DeleteByQueryRequestBuilder.java @@ -22,16 +22,16 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.search.SearchAction; import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class DeleteByQueryRequestBuilder extends AbstractBulkByScrollRequestBuilder { - public DeleteByQueryRequestBuilder(ElasticsearchClient client, ActionType action) { + public DeleteByQueryRequestBuilder(OpenSearchClient client, ActionType action) { this(client, action, new SearchRequestBuilder(client, SearchAction.INSTANCE)); } - private DeleteByQueryRequestBuilder(ElasticsearchClient client, + private DeleteByQueryRequestBuilder(OpenSearchClient client, ActionType action, SearchRequestBuilder search) { super(client, action, search, new DeleteByQueryRequest(search.request())); diff --git a/server/src/main/java/org/elasticsearch/index/reindex/ReindexRequestBuilder.java b/server/src/main/java/org/elasticsearch/index/reindex/ReindexRequestBuilder.java index a934584bc9724..075e5409af792 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/ReindexRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/ReindexRequestBuilder.java @@ -24,21 +24,21 @@ import org.elasticsearch.action.index.IndexRequestBuilder; import org.elasticsearch.action.search.SearchAction; import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class ReindexRequestBuilder extends AbstractBulkIndexByScrollRequestBuilder { private final IndexRequestBuilder destination; - public ReindexRequestBuilder(ElasticsearchClient client, - ActionType action) { + public ReindexRequestBuilder(OpenSearchClient client, + ActionType action) { this(client, action, new SearchRequestBuilder(client, SearchAction.INSTANCE), new IndexRequestBuilder(client, IndexAction.INSTANCE)); } - private ReindexRequestBuilder(ElasticsearchClient client, - ActionType action, - SearchRequestBuilder search, IndexRequestBuilder destination) { + private ReindexRequestBuilder(OpenSearchClient client, + ActionType action, + SearchRequestBuilder search, IndexRequestBuilder destination) { super(client, action, search, new ReindexRequest(search.request(), destination.request())); this.destination = destination; } diff --git a/server/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequestBuilder.java b/server/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequestBuilder.java index 91a77e988a881..a0dfed5875081 100644 --- a/server/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequestBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/reindex/UpdateByQueryRequestBuilder.java @@ -22,18 +22,18 @@ import org.elasticsearch.action.ActionType; import org.elasticsearch.action.search.SearchAction; import org.elasticsearch.action.search.SearchRequestBuilder; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; public class UpdateByQueryRequestBuilder extends AbstractBulkIndexByScrollRequestBuilder { - public UpdateByQueryRequestBuilder(ElasticsearchClient client, ActionType action) { + public UpdateByQueryRequestBuilder(OpenSearchClient client, ActionType action) { this(client, action, new SearchRequestBuilder(client, SearchAction.INSTANCE)); } - private UpdateByQueryRequestBuilder(ElasticsearchClient client, - ActionType action, - SearchRequestBuilder search) { + private UpdateByQueryRequestBuilder(OpenSearchClient client, + ActionType action, + SearchRequestBuilder search) { super(client, action, search, new UpdateByQueryRequest(search.request())); } diff --git a/server/src/main/java/org/elasticsearch/persistent/CompletionPersistentTaskAction.java b/server/src/main/java/org/elasticsearch/persistent/CompletionPersistentTaskAction.java index 5b0c79c34e398..e2f01c96ad750 100644 --- a/server/src/main/java/org/elasticsearch/persistent/CompletionPersistentTaskAction.java +++ b/server/src/main/java/org/elasticsearch/persistent/CompletionPersistentTaskAction.java @@ -25,7 +25,7 @@ import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.action.support.master.TransportMasterNodeAction; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.cluster.block.ClusterBlockLevel; @@ -117,7 +117,7 @@ public int hashCode() { public static class RequestBuilder extends MasterNodeOperationRequestBuilder { - protected RequestBuilder(ElasticsearchClient client, CompletionPersistentTaskAction action) { + protected RequestBuilder(OpenSearchClient client, CompletionPersistentTaskAction action) { super(client, action, new Request()); } } diff --git a/server/src/main/java/org/elasticsearch/persistent/RemovePersistentTaskAction.java b/server/src/main/java/org/elasticsearch/persistent/RemovePersistentTaskAction.java index bc66e62431533..2825b0aac02be 100644 --- a/server/src/main/java/org/elasticsearch/persistent/RemovePersistentTaskAction.java +++ b/server/src/main/java/org/elasticsearch/persistent/RemovePersistentTaskAction.java @@ -25,7 +25,7 @@ import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.action.support.master.TransportMasterNodeAction; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.cluster.block.ClusterBlockLevel; @@ -96,7 +96,7 @@ public int hashCode() { public static class RequestBuilder extends MasterNodeOperationRequestBuilder { - protected RequestBuilder(ElasticsearchClient client, RemovePersistentTaskAction action) { + protected RequestBuilder(OpenSearchClient client, RemovePersistentTaskAction action) { super(client, action, new Request()); } diff --git a/server/src/main/java/org/elasticsearch/persistent/StartPersistentTaskAction.java b/server/src/main/java/org/elasticsearch/persistent/StartPersistentTaskAction.java index 9b68aa25ee642..1f9ad2b449972 100644 --- a/server/src/main/java/org/elasticsearch/persistent/StartPersistentTaskAction.java +++ b/server/src/main/java/org/elasticsearch/persistent/StartPersistentTaskAction.java @@ -26,7 +26,7 @@ import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.action.support.master.TransportMasterNodeAction; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.cluster.block.ClusterBlockLevel; @@ -157,7 +157,7 @@ public void setParams(PersistentTaskParams params) { public static class RequestBuilder extends MasterNodeOperationRequestBuilder { - protected RequestBuilder(ElasticsearchClient client, StartPersistentTaskAction action) { + protected RequestBuilder(OpenSearchClient client, StartPersistentTaskAction action) { super(client, action, new Request()); } diff --git a/server/src/main/java/org/elasticsearch/persistent/UpdatePersistentTaskStatusAction.java b/server/src/main/java/org/elasticsearch/persistent/UpdatePersistentTaskStatusAction.java index d90abbbe8f242..ddef7be9e041f 100644 --- a/server/src/main/java/org/elasticsearch/persistent/UpdatePersistentTaskStatusAction.java +++ b/server/src/main/java/org/elasticsearch/persistent/UpdatePersistentTaskStatusAction.java @@ -25,7 +25,7 @@ import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder; import org.elasticsearch.action.support.master.MasterNodeRequest; import org.elasticsearch.action.support.master.TransportMasterNodeAction; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.block.ClusterBlockException; import org.elasticsearch.cluster.block.ClusterBlockLevel; @@ -123,7 +123,7 @@ public int hashCode() { public static class RequestBuilder extends MasterNodeOperationRequestBuilder { - protected RequestBuilder(ElasticsearchClient client, UpdatePersistentTaskStatusAction action) { + protected RequestBuilder(OpenSearchClient client, UpdatePersistentTaskStatusAction action) { super(client, action, new Request()); } diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java b/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java index 065471e237485..f65b0a3a85e5a 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java +++ b/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java @@ -35,7 +35,7 @@ import org.elasticsearch.action.support.tasks.BaseTasksRequest; import org.elasticsearch.action.support.tasks.BaseTasksResponse; import org.elasticsearch.action.support.tasks.TransportTasksAction; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.cluster.service.ClusterService; @@ -433,7 +433,7 @@ private UnblockTestTasksAction() { public static class UnblockTestTasksRequestBuilder extends ActionRequestBuilder { - protected UnblockTestTasksRequestBuilder(ElasticsearchClient client, + protected UnblockTestTasksRequestBuilder(OpenSearchClient client, ActionType action) { super(client, action, new UnblockTestTasksRequest()); } diff --git a/server/src/test/java/org/elasticsearch/persistent/TestPersistentTasksPlugin.java b/server/src/test/java/org/elasticsearch/persistent/TestPersistentTasksPlugin.java index 11031eb4b1797..c91ff5b5ec9f1 100644 --- a/server/src/test/java/org/elasticsearch/persistent/TestPersistentTasksPlugin.java +++ b/server/src/test/java/org/elasticsearch/persistent/TestPersistentTasksPlugin.java @@ -34,7 +34,7 @@ import org.elasticsearch.action.support.tasks.TasksRequestBuilder; import org.elasticsearch.action.support.tasks.TransportTasksAction; import org.elasticsearch.client.Client; -import org.elasticsearch.client.ElasticsearchClient; +import org.elasticsearch.client.OpenSearchClient; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; import org.elasticsearch.cluster.node.DiscoveryNode; @@ -480,7 +480,7 @@ public String getOperation() { public static class TestTasksRequestBuilder extends TasksRequestBuilder { - protected TestTasksRequestBuilder(ElasticsearchClient client) { + protected TestTasksRequestBuilder(OpenSearchClient client) { super(client, TestTaskAction.INSTANCE, new TestTasksRequest()); }