From c17b34c1dcc94b823c289e7a9a52c88bd39ea043 Mon Sep 17 00:00:00 2001 From: Harold Wang <74381974+harold-wang@users.noreply.github.com> Date: Thu, 11 Mar 2021 15:10:27 -0800 Subject: [PATCH] [Rename] plugins and persistent under server folder (#272) * Refactor persistent&plugin folder under server Signed-off-by: Harold Wang --- .../persistent/AllocatedPersistentTask.java | 6 +- .../CompletionPersistentTaskAction.java | 28 ++++---- .../NodePersistentTasksExecutor.java | 6 +- .../persistent/PersistentTaskParams.java | 6 +- .../persistent/PersistentTaskResponse.java | 8 +-- .../persistent/PersistentTaskState.java | 6 +- .../PersistentTasksClusterService.java | 30 ++++---- .../PersistentTasksCustomMetadata.java | 41 +++++------ .../persistent/PersistentTasksExecutor.java | 10 +-- .../PersistentTasksExecutorRegistry.java | 2 +- .../PersistentTasksNodeService.java | 14 ++-- .../persistent/PersistentTasksService.java | 16 ++--- .../RemovePersistentTaskAction.java | 28 ++++---- .../persistent/StartPersistentTaskAction.java | 32 ++++----- .../UpdatePersistentTaskStatusAction.java | 28 ++++---- .../decider/AssignmentDecision.java | 2 +- .../decider/EnableAssignmentDecider.java | 12 ++-- .../persistent/package-info.java | 18 ++--- .../plugins/ActionPlugin.java | 18 ++--- .../plugins/AnalysisPlugin.java | 30 ++++---- .../plugins/CircuitBreakerPlugin.java | 10 +-- .../plugins/ClusterPlugin.java | 14 ++-- .../plugins/DiscoveryPlugin.java | 24 +++---- .../plugins/EnginePlugin.java | 6 +- .../plugins/ExtensiblePlugin.java | 2 +- .../plugins/IndexStorePlugin.java | 18 ++--- .../plugins/IngestPlugin.java | 6 +- .../plugins/MapperPlugin.java | 6 +- .../plugins/MetadataUpgrader.java | 6 +- .../plugins/NetworkPlugin.java | 30 ++++---- .../plugins/PersistentTaskPlugin.java | 13 ++-- .../plugins/Platforms.java | 2 +- .../plugins/Plugin.java | 48 ++++++------- .../plugins/PluginInfo.java | 48 ++++++------- .../plugins/PluginLoaderIndirection.java | 2 +- .../plugins/PluginSecurity.java | 4 +- .../plugins/PluginsService.java | 48 ++++++------- .../plugins/ReloadablePlugin.java | 6 +- .../plugins/RepositoryPlugin.java | 12 ++-- .../plugins/ScriptPlugin.java | 6 +- .../plugins/SearchPlugin.java | 70 +++++++++---------- .../plugins/SystemIndexPlugin.java | 6 +- .../plugins/package-info.java | 6 +- .../plugins/spi/NamedXContentProvider.java | 4 +- .../plugins/spi/package-info.java | 4 +- 45 files changed, 371 insertions(+), 371 deletions(-) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/AllocatedPersistentTask.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/CompletionPersistentTaskAction.java (88%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/NodePersistentTasksExecutor.java (93%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/PersistentTaskParams.java (86%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/PersistentTaskResponse.java (88%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/PersistentTaskState.java (86%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/PersistentTasksClusterService.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/PersistentTasksCustomMetadata.java (95%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/PersistentTasksExecutor.java (93%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/PersistentTasksExecutorRegistry.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/PersistentTasksNodeService.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/PersistentTasksService.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/RemovePersistentTaskAction.java (85%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/StartPersistentTaskAction.java (89%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/UpdatePersistentTaskStatusAction.java (88%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/decider/AssignmentDecision.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/decider/EnableAssignmentDecider.java (91%) rename server/src/main/java/org/{elasticsearch => opensearch}/persistent/package-info.java (63%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/ActionPlugin.java (94%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/AnalysisPlugin.java (83%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/CircuitBreakerPlugin.java (90%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/ClusterPlugin.java (84%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/DiscoveryPlugin.java (80%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/EnginePlugin.java (92%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/ExtensiblePlugin.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/IndexStorePlugin.java (84%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/IngestPlugin.java (92%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/MapperPlugin.java (95%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/MetadataUpgrader.java (91%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/NetworkPlugin.java (76%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/PersistentTaskPlugin.java (83%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/Platforms.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/Plugin.java (87%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/PluginInfo.java (90%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/PluginLoaderIndirection.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/PluginSecurity.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/PluginsService.java (95%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/ReloadablePlugin.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/RepositoryPlugin.java (88%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/ScriptPlugin.java (92%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/SearchPlugin.java (92%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/SystemIndexPlugin.java (91%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/package-info.java (81%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/spi/NamedXContentProvider.java (91%) rename server/src/main/java/org/{elasticsearch => opensearch}/plugins/spi/package-info.java (90%) diff --git a/server/src/main/java/org/elasticsearch/persistent/AllocatedPersistentTask.java b/server/src/main/java/org/opensearch/persistent/AllocatedPersistentTask.java similarity index 98% rename from server/src/main/java/org/elasticsearch/persistent/AllocatedPersistentTask.java rename to server/src/main/java/org/opensearch/persistent/AllocatedPersistentTask.java index c53962f8b88..1dbf89ef83e 100644 --- a/server/src/main/java/org/elasticsearch/persistent/AllocatedPersistentTask.java +++ b/server/src/main/java/org/opensearch/persistent/AllocatedPersistentTask.java @@ -16,15 +16,15 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.opensearch.action.ActionListener; import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.unit.TimeValue; +import org.opensearch.common.Nullable; +import org.opensearch.common.unit.TimeValue; import org.opensearch.tasks.CancellableTask; import org.opensearch.tasks.TaskId; import org.opensearch.tasks.TaskManager; diff --git a/server/src/main/java/org/elasticsearch/persistent/CompletionPersistentTaskAction.java b/server/src/main/java/org/opensearch/persistent/CompletionPersistentTaskAction.java similarity index 88% rename from server/src/main/java/org/elasticsearch/persistent/CompletionPersistentTaskAction.java rename to server/src/main/java/org/opensearch/persistent/CompletionPersistentTaskAction.java index feea2ac827c..6c9f14b8238 100644 --- a/server/src/main/java/org/elasticsearch/persistent/CompletionPersistentTaskAction.java +++ b/server/src/main/java/org/opensearch/persistent/CompletionPersistentTaskAction.java @@ -16,26 +16,26 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.ActionType; -import org.elasticsearch.action.support.ActionFilters; -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.OpenSearchClient; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.action.support.master.MasterNodeOperationRequestBuilder; +import org.opensearch.action.support.master.MasterNodeRequest; +import org.opensearch.action.support.master.TransportMasterNodeAction; +import org.opensearch.client.OpenSearchClient; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.block.ClusterBlockLevel; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.block.ClusterBlockLevel; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.inject.Inject; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportService; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/persistent/NodePersistentTasksExecutor.java b/server/src/main/java/org/opensearch/persistent/NodePersistentTasksExecutor.java similarity index 93% rename from server/src/main/java/org/elasticsearch/persistent/NodePersistentTasksExecutor.java rename to server/src/main/java/org/opensearch/persistent/NodePersistentTasksExecutor.java index 8663b245508..9f0a6027b3a 100644 --- a/server/src/main/java/org/elasticsearch/persistent/NodePersistentTasksExecutor.java +++ b/server/src/main/java/org/opensearch/persistent/NodePersistentTasksExecutor.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.util.concurrent.AbstractRunnable; +import org.opensearch.common.Nullable; +import org.opensearch.common.util.concurrent.AbstractRunnable; import org.opensearch.threadpool.ThreadPool; /** diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTaskParams.java b/server/src/main/java/org/opensearch/persistent/PersistentTaskParams.java similarity index 86% rename from server/src/main/java/org/elasticsearch/persistent/PersistentTaskParams.java rename to server/src/main/java/org/opensearch/persistent/PersistentTaskParams.java index a01b32d1a45..a2949f83a1e 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTaskParams.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTaskParams.java @@ -17,11 +17,11 @@ * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.common.io.stream.VersionedNamedWriteable; -import org.elasticsearch.common.xcontent.ToXContentObject; +import org.opensearch.common.io.stream.VersionedNamedWriteable; +import org.opensearch.common.xcontent.ToXContentObject; /** * Parameters used to start persistent task diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTaskResponse.java b/server/src/main/java/org/opensearch/persistent/PersistentTaskResponse.java similarity index 88% rename from server/src/main/java/org/elasticsearch/persistent/PersistentTaskResponse.java rename to server/src/main/java/org/opensearch/persistent/PersistentTaskResponse.java index de4ea1ae884..e46e4c808e6 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTaskResponse.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTaskResponse.java @@ -16,12 +16,12 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.opensearch.action.ActionResponse; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask; import java.io.IOException; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTaskState.java b/server/src/main/java/org/opensearch/persistent/PersistentTaskState.java similarity index 86% rename from server/src/main/java/org/elasticsearch/persistent/PersistentTaskState.java rename to server/src/main/java/org/opensearch/persistent/PersistentTaskState.java index 57c913f51bb..290ddf59878 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTaskState.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTaskState.java @@ -16,10 +16,10 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; -import org.elasticsearch.common.io.stream.NamedWriteable; -import org.elasticsearch.common.xcontent.ToXContentObject; +import org.opensearch.common.io.stream.NamedWriteable; +import org.opensearch.common.xcontent.ToXContentObject; /** * {@link PersistentTaskState} represents the state of the persistent tasks, as it diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksClusterService.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java similarity index 96% rename from server/src/main/java/org/elasticsearch/persistent/PersistentTasksClusterService.java rename to server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java index 9a0704a84a1..4cff10f1588 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksClusterService.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksClusterService.java @@ -17,30 +17,30 @@ * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.ResourceAlreadyExistsException; -import org.elasticsearch.ResourceNotFoundException; +import org.opensearch.ResourceAlreadyExistsException; +import org.opensearch.ResourceNotFoundException; import org.opensearch.action.ActionListener; import org.opensearch.cluster.ClusterChangedEvent; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterStateListener; import org.opensearch.cluster.ClusterStateUpdateTask; import org.opensearch.cluster.NotMasterException; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.concurrent.AbstractAsyncTask; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata.Assignment; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask; -import org.elasticsearch.persistent.decider.AssignmentDecision; -import org.elasticsearch.persistent.decider.EnableAssignmentDecider; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.concurrent.AbstractAsyncTask; +import org.opensearch.persistent.PersistentTasksCustomMetadata.Assignment; +import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask; +import org.opensearch.persistent.decider.AssignmentDecision; +import org.opensearch.persistent.decider.EnableAssignmentDecider; import org.opensearch.threadpool.ThreadPool; import java.io.Closeable; diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetadata.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksCustomMetadata.java similarity index 95% rename from server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetadata.java rename to server/src/main/java/org/opensearch/persistent/PersistentTasksCustomMetadata.java index c3860d51633..b1b19547090 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksCustomMetadata.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksCustomMetadata.java @@ -16,28 +16,29 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; -import org.elasticsearch.ResourceAlreadyExistsException; -import org.elasticsearch.ResourceNotFoundException; -import org.elasticsearch.Version; +package org.opensearch.persistent; + +import org.opensearch.ResourceAlreadyExistsException; +import org.opensearch.ResourceNotFoundException; +import org.opensearch.Version; import org.opensearch.cluster.AbstractNamedDiffable; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.NamedDiff; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.ParseField; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.io.stream.Writeable; -import org.elasticsearch.common.xcontent.ConstructingObjectParser; -import org.elasticsearch.common.xcontent.ObjectParser; -import org.elasticsearch.common.xcontent.ObjectParser.NamedObjectParser; -import org.elasticsearch.common.xcontent.ToXContent; -import org.elasticsearch.common.xcontent.ToXContentObject; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentParser; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.Nullable; +import org.opensearch.common.ParseField; +import org.opensearch.common.Strings; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.io.stream.Writeable; +import org.opensearch.common.xcontent.ConstructingObjectParser; +import org.opensearch.common.xcontent.ObjectParser; +import org.opensearch.common.xcontent.ObjectParser.NamedObjectParser; +import org.opensearch.common.xcontent.ToXContent; +import org.opensearch.common.xcontent.ToXContentObject; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentParser; import java.io.IOException; import java.util.Collection; @@ -52,8 +53,8 @@ import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; -import static org.elasticsearch.cluster.metadata.Metadata.ALL_CONTEXTS; -import static org.elasticsearch.common.xcontent.ConstructingObjectParser.constructorArg; +import static org.opensearch.cluster.metadata.Metadata.ALL_CONTEXTS; +import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg; /** * A cluster state record that contains a list of all running persistent tasks diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutor.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksExecutor.java similarity index 93% rename from server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutor.java rename to server/src/main/java/org/opensearch/persistent/PersistentTasksExecutor.java index b12aaaa65dd..211297295ef 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutor.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksExecutor.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata.Assignment; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.Nullable; +import org.opensearch.persistent.PersistentTasksCustomMetadata.Assignment; +import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask; import org.opensearch.tasks.TaskId; import java.util.Map; diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutorRegistry.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksExecutorRegistry.java similarity index 98% rename from server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutorRegistry.java rename to server/src/main/java/org/opensearch/persistent/PersistentTasksExecutorRegistry.java index 6d26431bc95..c5a41a7f1da 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksExecutorRegistry.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksExecutorRegistry.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import java.util.Collection; import java.util.Collections; diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksNodeService.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksNodeService.java similarity index 97% rename from server/src/main/java/org/elasticsearch/persistent/PersistentTasksNodeService.java rename to server/src/main/java/org/opensearch/persistent/PersistentTasksNodeService.java index b7589a0d497..af5ea20d413 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksNodeService.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksNodeService.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -25,12 +25,12 @@ import org.opensearch.action.ActionListener; import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse; import org.opensearch.cluster.ClusterChangedEvent; import org.opensearch.cluster.ClusterStateListener; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.gateway.GatewayService; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask; +import org.opensearch.common.Strings; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.gateway.GatewayService; +import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask; import org.opensearch.tasks.Task; import org.opensearch.tasks.TaskAwareRequest; import org.opensearch.tasks.TaskId; diff --git a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksService.java b/server/src/main/java/org/opensearch/persistent/PersistentTasksService.java similarity index 96% rename from server/src/main/java/org/elasticsearch/persistent/PersistentTasksService.java rename to server/src/main/java/org/opensearch/persistent/PersistentTasksService.java index c3ffd6adb85..24a4df8ea61 100644 --- a/server/src/main/java/org/elasticsearch/persistent/PersistentTasksService.java +++ b/server/src/main/java/org/opensearch/persistent/PersistentTasksService.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -25,15 +25,15 @@ import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequest; import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest; import org.opensearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.client.OriginSettingClient; +import org.opensearch.client.Client; +import org.opensearch.client.OriginSettingClient; import org.opensearch.cluster.ClusterState; import org.opensearch.cluster.ClusterStateObserver; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.node.NodeClosedException; -import org.elasticsearch.persistent.PersistentTasksCustomMetadata.PersistentTask; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Nullable; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.node.NodeClosedException; +import org.opensearch.persistent.PersistentTasksCustomMetadata.PersistentTask; import org.opensearch.tasks.TaskId; import org.opensearch.threadpool.ThreadPool; diff --git a/server/src/main/java/org/elasticsearch/persistent/RemovePersistentTaskAction.java b/server/src/main/java/org/opensearch/persistent/RemovePersistentTaskAction.java similarity index 85% rename from server/src/main/java/org/elasticsearch/persistent/RemovePersistentTaskAction.java rename to server/src/main/java/org/opensearch/persistent/RemovePersistentTaskAction.java index f871fb050b5..39579e45387 100644 --- a/server/src/main/java/org/elasticsearch/persistent/RemovePersistentTaskAction.java +++ b/server/src/main/java/org/opensearch/persistent/RemovePersistentTaskAction.java @@ -16,26 +16,26 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.ActionType; -import org.elasticsearch.action.support.ActionFilters; -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.OpenSearchClient; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.action.support.master.MasterNodeOperationRequestBuilder; +import org.opensearch.action.support.master.MasterNodeRequest; +import org.opensearch.action.support.master.TransportMasterNodeAction; +import org.opensearch.client.OpenSearchClient; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.block.ClusterBlockLevel; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.block.ClusterBlockLevel; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.inject.Inject; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportService; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/persistent/StartPersistentTaskAction.java b/server/src/main/java/org/opensearch/persistent/StartPersistentTaskAction.java similarity index 89% rename from server/src/main/java/org/elasticsearch/persistent/StartPersistentTaskAction.java rename to server/src/main/java/org/opensearch/persistent/StartPersistentTaskAction.java index 6552d998641..9e4b328cf5e 100644 --- a/server/src/main/java/org/elasticsearch/persistent/StartPersistentTaskAction.java +++ b/server/src/main/java/org/opensearch/persistent/StartPersistentTaskAction.java @@ -16,28 +16,28 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; -import org.elasticsearch.Version; +import org.opensearch.Version; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.ActionType; -import org.elasticsearch.action.support.ActionFilters; -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.OpenSearchClient; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.action.support.master.MasterNodeOperationRequestBuilder; +import org.opensearch.action.support.master.MasterNodeRequest; +import org.opensearch.action.support.master.TransportMasterNodeAction; +import org.opensearch.client.OpenSearchClient; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.block.ClusterBlockLevel; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.block.ClusterBlockLevel; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.Nullable; +import org.opensearch.common.inject.Inject; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportService; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/persistent/UpdatePersistentTaskStatusAction.java b/server/src/main/java/org/opensearch/persistent/UpdatePersistentTaskStatusAction.java similarity index 88% rename from server/src/main/java/org/elasticsearch/persistent/UpdatePersistentTaskStatusAction.java rename to server/src/main/java/org/opensearch/persistent/UpdatePersistentTaskStatusAction.java index 3aa27de70e0..026cf94a4e0 100644 --- a/server/src/main/java/org/elasticsearch/persistent/UpdatePersistentTaskStatusAction.java +++ b/server/src/main/java/org/opensearch/persistent/UpdatePersistentTaskStatusAction.java @@ -16,26 +16,26 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; import org.opensearch.action.ActionListener; import org.opensearch.action.ActionRequestValidationException; import org.opensearch.action.ActionType; -import org.elasticsearch.action.support.ActionFilters; -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.OpenSearchClient; +import org.opensearch.action.support.ActionFilters; +import org.opensearch.action.support.master.MasterNodeOperationRequestBuilder; +import org.opensearch.action.support.master.MasterNodeRequest; +import org.opensearch.action.support.master.TransportMasterNodeAction; +import org.opensearch.client.OpenSearchClient; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.block.ClusterBlockException; -import org.elasticsearch.cluster.block.ClusterBlockLevel; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.inject.Inject; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; +import org.opensearch.cluster.block.ClusterBlockException; +import org.opensearch.cluster.block.ClusterBlockLevel; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.inject.Inject; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; import org.opensearch.threadpool.ThreadPool; -import org.elasticsearch.transport.TransportService; +import org.opensearch.transport.TransportService; import java.io.IOException; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/persistent/decider/AssignmentDecision.java b/server/src/main/java/org/opensearch/persistent/decider/AssignmentDecision.java similarity index 97% rename from server/src/main/java/org/elasticsearch/persistent/decider/AssignmentDecision.java rename to server/src/main/java/org/opensearch/persistent/decider/AssignmentDecision.java index eb8f851a68d..7ce94dc34c9 100644 --- a/server/src/main/java/org/elasticsearch/persistent/decider/AssignmentDecision.java +++ b/server/src/main/java/org/opensearch/persistent/decider/AssignmentDecision.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent.decider; +package org.opensearch.persistent.decider; import java.util.Locale; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/persistent/decider/EnableAssignmentDecider.java b/server/src/main/java/org/opensearch/persistent/decider/EnableAssignmentDecider.java similarity index 91% rename from server/src/main/java/org/elasticsearch/persistent/decider/EnableAssignmentDecider.java rename to server/src/main/java/org/opensearch/persistent/decider/EnableAssignmentDecider.java index a33f3628743..4186f3254c7 100644 --- a/server/src/main/java/org/elasticsearch/persistent/decider/EnableAssignmentDecider.java +++ b/server/src/main/java/org/opensearch/persistent/decider/EnableAssignmentDecider.java @@ -16,16 +16,16 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.persistent.decider; +package org.opensearch.persistent.decider; -import org.elasticsearch.common.settings.ClusterSettings; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; +import org.opensearch.common.settings.ClusterSettings; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; import java.util.Locale; -import static org.elasticsearch.common.settings.Setting.Property.Dynamic; -import static org.elasticsearch.common.settings.Setting.Property.NodeScope; +import static org.opensearch.common.settings.Setting.Property.Dynamic; +import static org.opensearch.common.settings.Setting.Property.NodeScope; /** * {@link EnableAssignmentDecider} is used to allow/disallow the persistent tasks diff --git a/server/src/main/java/org/elasticsearch/persistent/package-info.java b/server/src/main/java/org/opensearch/persistent/package-info.java similarity index 63% rename from server/src/main/java/org/elasticsearch/persistent/package-info.java rename to server/src/main/java/org/opensearch/persistent/package-info.java index c62b73faf30..34dbb69407c 100644 --- a/server/src/main/java/org/elasticsearch/persistent/package-info.java +++ b/server/src/main/java/org/opensearch/persistent/package-info.java @@ -25,23 +25,23 @@ * requests and responses. The execution is done in six phases: *

* 1. The coordinating node sends an ordinary transport request to the master node to start a new persistent task. This task is handled - * by the {@link org.elasticsearch.persistent.PersistentTasksService}, which is using - * {@link org.elasticsearch.persistent.PersistentTasksClusterService} to update cluster state with the record about running persistent + * by the {@link org.opensearch.persistent.PersistentTasksService}, which is using + * {@link org.opensearch.persistent.PersistentTasksClusterService} to update cluster state with the record about running persistent * task. *

- * 2. The master node updates the {@link org.elasticsearch.persistent.PersistentTasksCustomMetadata} in the cluster state to indicate + * 2. The master node updates the {@link org.opensearch.persistent.PersistentTasksCustomMetadata} in the cluster state to indicate * that there is a new persistent task running in the system. *

- * 3. The {@link org.elasticsearch.persistent.PersistentTasksNodeService} running on every node in the cluster monitors changes in + * 3. The {@link org.opensearch.persistent.PersistentTasksNodeService} running on every node in the cluster monitors changes in * the cluster state and starts execution of all new tasks assigned to the node it is running on. *

- * 4. If the task fails to start on the node, the {@link org.elasticsearch.persistent.PersistentTasksNodeService} uses the - * {@link org.elasticsearch.persistent.PersistentTasksCustomMetadata} to notify the - * {@link org.elasticsearch.persistent.PersistentTasksService}, which reassigns the action to another node in the cluster. + * 4. If the task fails to start on the node, the {@link org.opensearch.persistent.PersistentTasksNodeService} uses the + * {@link org.opensearch.persistent.PersistentTasksCustomMetadata} to notify the + * {@link org.opensearch.persistent.PersistentTasksService}, which reassigns the action to another node in the cluster. *

* 5. If a task finishes successfully on the node and calls listener.onResponse(), the corresponding persistent action is removed from the * cluster state unless removeOnCompletion flag for this task is set to false. *

- * 6. The {@link org.elasticsearch.persistent.RemovePersistentTaskAction} action can be also used to remove the persistent task. + * 6. The {@link org.opensearch.persistent.RemovePersistentTaskAction} action can be also used to remove the persistent task. */ -package org.elasticsearch.persistent; +package org.opensearch.persistent; diff --git a/server/src/main/java/org/elasticsearch/plugins/ActionPlugin.java b/server/src/main/java/org/opensearch/plugins/ActionPlugin.java similarity index 94% rename from server/src/main/java/org/elasticsearch/plugins/ActionPlugin.java rename to server/src/main/java/org/opensearch/plugins/ActionPlugin.java index 514c3d19493..d3a7fcbc22d 100644 --- a/server/src/main/java/org/elasticsearch/plugins/ActionPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/ActionPlugin.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; import org.opensearch.action.ActionType; import org.opensearch.action.ActionRequest; @@ -28,14 +28,14 @@ import org.opensearch.action.admin.indices.mapping.put.PutMappingRequest; import org.opensearch.action.support.ActionFilter; import org.opensearch.action.support.TransportAction; import org.opensearch.action.support.TransportActions; -import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver; -import org.elasticsearch.cluster.node.DiscoveryNodes; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.ClusterSettings; -import org.elasticsearch.common.settings.IndexScopedSettings; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.settings.SettingsFilter; -import org.elasticsearch.common.util.concurrent.ThreadContext; +import org.opensearch.cluster.metadata.IndexNameExpressionResolver; +import org.opensearch.cluster.node.DiscoveryNodes; +import org.opensearch.common.Strings; +import org.opensearch.common.settings.ClusterSettings; +import org.opensearch.common.settings.IndexScopedSettings; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.settings.SettingsFilter; +import org.opensearch.common.util.concurrent.ThreadContext; import org.opensearch.rest.RestController; import org.opensearch.rest.RestHandler; import org.opensearch.rest.RestHeaderDefinition; diff --git a/server/src/main/java/org/elasticsearch/plugins/AnalysisPlugin.java b/server/src/main/java/org/opensearch/plugins/AnalysisPlugin.java similarity index 83% rename from server/src/main/java/org/elasticsearch/plugins/AnalysisPlugin.java rename to server/src/main/java/org/opensearch/plugins/AnalysisPlugin.java index c85981f8dcb..9cb515331ba 100644 --- a/server/src/main/java/org/elasticsearch/plugins/AnalysisPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/AnalysisPlugin.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CharFilter; import org.apache.lucene.analysis.TokenFilter; import org.apache.lucene.analysis.Tokenizer; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.Environment; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.analysis.AnalyzerProvider; -import org.elasticsearch.index.analysis.CharFilterFactory; -import org.elasticsearch.index.analysis.PreBuiltAnalyzerProviderFactory; -import org.elasticsearch.index.analysis.PreConfiguredCharFilter; -import org.elasticsearch.index.analysis.PreConfiguredTokenFilter; -import org.elasticsearch.index.analysis.PreConfiguredTokenizer; -import org.elasticsearch.index.analysis.TokenFilterFactory; -import org.elasticsearch.index.analysis.TokenizerFactory; -import org.elasticsearch.indices.analysis.AnalysisModule.AnalysisProvider; +import org.opensearch.common.settings.Settings; +import org.opensearch.env.Environment; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.analysis.AnalyzerProvider; +import org.opensearch.index.analysis.CharFilterFactory; +import org.opensearch.index.analysis.PreBuiltAnalyzerProviderFactory; +import org.opensearch.index.analysis.PreConfiguredCharFilter; +import org.opensearch.index.analysis.PreConfiguredTokenFilter; +import org.opensearch.index.analysis.PreConfiguredTokenizer; +import org.opensearch.index.analysis.TokenFilterFactory; +import org.opensearch.index.analysis.TokenizerFactory; +import org.opensearch.indices.analysis.AnalysisModule.AnalysisProvider; import java.io.IOException; import java.util.List; @@ -44,7 +44,7 @@ import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; /** - * An additional extension point for {@link Plugin}s that extends Elasticsearch's analysis functionality. To add an additional + * An additional extension point for {@link Plugin}s that extends OpenSearch's analysis functionality. To add an additional * {@link TokenFilter} just implement the interface and implement the {@link #getTokenFilters()} method: * *

{@code
@@ -56,7 +56,7 @@ import static java.util.Collections.emptyMap;
  * }
  * }
* - * Elasticsearch doesn't have any automatic mechanism to share these components between indexes. If any component is heavy enough to warrant + * OpenSearch doesn't have any automatic mechanism to share these components between indexes. If any component is heavy enough to warrant * such sharing then it is the Plugin's responsibility to do it in their {@link AnalysisProvider} implementation. We recommend against doing * this unless absolutely necessary because it can be difficult to get the caching right given things like behavior changes across versions. */ diff --git a/server/src/main/java/org/elasticsearch/plugins/CircuitBreakerPlugin.java b/server/src/main/java/org/opensearch/plugins/CircuitBreakerPlugin.java similarity index 90% rename from server/src/main/java/org/elasticsearch/plugins/CircuitBreakerPlugin.java rename to server/src/main/java/org/opensearch/plugins/CircuitBreakerPlugin.java index d7682a4667e..580d34cfa57 100644 --- a/server/src/main/java/org/elasticsearch/plugins/CircuitBreakerPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/CircuitBreakerPlugin.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; -import org.elasticsearch.common.breaker.CircuitBreaker; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.indices.breaker.BreakerSettings; -import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.opensearch.common.breaker.CircuitBreaker; +import org.opensearch.common.settings.Settings; +import org.opensearch.indices.breaker.BreakerSettings; +import org.opensearch.indices.breaker.CircuitBreakerService; /** diff --git a/server/src/main/java/org/elasticsearch/plugins/ClusterPlugin.java b/server/src/main/java/org/opensearch/plugins/ClusterPlugin.java similarity index 84% rename from server/src/main/java/org/elasticsearch/plugins/ClusterPlugin.java rename to server/src/main/java/org/opensearch/plugins/ClusterPlugin.java index b04874b4e65..76deced6a31 100644 --- a/server/src/main/java/org/elasticsearch/plugins/ClusterPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/ClusterPlugin.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; -import org.elasticsearch.cluster.routing.allocation.ExistingShardsAllocator; -import org.elasticsearch.cluster.routing.allocation.allocator.ShardsAllocator; -import org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider; -import org.elasticsearch.common.settings.ClusterSettings; -import org.elasticsearch.common.settings.Settings; +import org.opensearch.cluster.routing.allocation.ExistingShardsAllocator; +import org.opensearch.cluster.routing.allocation.allocator.ShardsAllocator; +import org.opensearch.cluster.routing.allocation.decider.AllocationDecider; +import org.opensearch.common.settings.ClusterSettings; +import org.opensearch.common.settings.Settings; import java.util.Collection; import java.util.Collections; @@ -63,7 +63,7 @@ public interface ClusterPlugin { /** * Return {@link ExistingShardsAllocator} implementations added by this plugin; the index setting * {@link ExistingShardsAllocator#EXISTING_SHARDS_ALLOCATOR_SETTING} sets the key of the allocator to use to allocate its shards. The - * default allocator is {@link org.elasticsearch.gateway.GatewayAllocator}. + * default allocator is {@link org.opensearch.gateway.GatewayAllocator}. */ default Map getExistingShardsAllocators() { return Collections.emptyMap(); diff --git a/server/src/main/java/org/elasticsearch/plugins/DiscoveryPlugin.java b/server/src/main/java/org/opensearch/plugins/DiscoveryPlugin.java similarity index 80% rename from server/src/main/java/org/elasticsearch/plugins/DiscoveryPlugin.java rename to server/src/main/java/org/opensearch/plugins/DiscoveryPlugin.java index d6cc222ba54..558ef7cb967 100644 --- a/server/src/main/java/org/elasticsearch/plugins/DiscoveryPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/DiscoveryPlugin.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; import org.opensearch.cluster.ClusterState; -import org.elasticsearch.cluster.coordination.ElectionStrategy; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.common.network.NetworkService; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.discovery.SeedHostsProvider; -import org.elasticsearch.transport.TransportService; +import org.opensearch.cluster.coordination.ElectionStrategy; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.common.network.NetworkService; +import org.opensearch.common.settings.Settings; +import org.opensearch.discovery.SeedHostsProvider; +import org.opensearch.transport.TransportService; import java.util.Collections; import java.util.Map; @@ -33,7 +33,7 @@ import java.util.function.BiConsumer; import java.util.function.Supplier; /** - * An additional extension point for {@link Plugin}s that extends Elasticsearch's discovery functionality. To add an additional + * An additional extension point for {@link Plugin}s that extends OpenSearch's discovery functionality. To add an additional * {@link NetworkService.CustomNameResolver} just implement the interface and implement the {@link #getCustomNameResolver(Settings)} method: * *
{@code
@@ -54,7 +54,7 @@ public interface DiscoveryPlugin {
      * name.
      *
      * For example: you could call a third party service (an API) to resolve _mycard_.
-     * Then you could define in elasticsearch.yml settings like:
+     * Then you could define in opensearch.yml settings like:
      *
      * 
{@code
      * network.host: _mycard_
@@ -68,11 +68,11 @@ public interface DiscoveryPlugin {
      * Returns providers of seed hosts for discovery.
      *
      * The key of the returned map is the name of the host provider
-     * (see {@link org.elasticsearch.discovery.DiscoveryModule#DISCOVERY_SEED_PROVIDERS_SETTING}), and
+     * (see {@link org.opensearch.discovery.DiscoveryModule#DISCOVERY_SEED_PROVIDERS_SETTING}), and
      * the value is a supplier to construct the host provider when it is selected for use.
      *
-     * @param transportService Use to form the {@link org.elasticsearch.common.transport.TransportAddress} portion
-     *                         of a {@link org.elasticsearch.cluster.node.DiscoveryNode}
+     * @param transportService Use to form the {@link org.opensearch.common.transport.TransportAddress} portion
+     *                         of a {@link org.opensearch.cluster.node.DiscoveryNode}
      * @param networkService Use to find the publish host address of the current node
      */
     default Map> getSeedHostProviders(TransportService transportService,
diff --git a/server/src/main/java/org/elasticsearch/plugins/EnginePlugin.java b/server/src/main/java/org/opensearch/plugins/EnginePlugin.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/plugins/EnginePlugin.java
rename to server/src/main/java/org/opensearch/plugins/EnginePlugin.java
index 59312945871..8cab439f6d6 100644
--- a/server/src/main/java/org/elasticsearch/plugins/EnginePlugin.java
+++ b/server/src/main/java/org/opensearch/plugins/EnginePlugin.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.plugins;
+package org.opensearch.plugins;
 
-import org.elasticsearch.index.IndexSettings;
-import org.elasticsearch.index.engine.EngineFactory;
+import org.opensearch.index.IndexSettings;
+import org.opensearch.index.engine.EngineFactory;
 
 import java.util.Optional;
 
diff --git a/server/src/main/java/org/elasticsearch/plugins/ExtensiblePlugin.java b/server/src/main/java/org/opensearch/plugins/ExtensiblePlugin.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/plugins/ExtensiblePlugin.java
rename to server/src/main/java/org/opensearch/plugins/ExtensiblePlugin.java
index 503ebbbf251..909273b9710 100644
--- a/server/src/main/java/org/elasticsearch/plugins/ExtensiblePlugin.java
+++ b/server/src/main/java/org/opensearch/plugins/ExtensiblePlugin.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.plugins;
+package org.opensearch.plugins;
 
 import java.util.List;
 
diff --git a/server/src/main/java/org/elasticsearch/plugins/IndexStorePlugin.java b/server/src/main/java/org/opensearch/plugins/IndexStorePlugin.java
similarity index 84%
rename from server/src/main/java/org/elasticsearch/plugins/IndexStorePlugin.java
rename to server/src/main/java/org/opensearch/plugins/IndexStorePlugin.java
index ae12112eca9..1fbf8cc299a 100644
--- a/server/src/main/java/org/elasticsearch/plugins/IndexStorePlugin.java
+++ b/server/src/main/java/org/opensearch/plugins/IndexStorePlugin.java
@@ -17,15 +17,15 @@
  * under the License.
  */
 
-package org.elasticsearch.plugins;
+package org.opensearch.plugins;
 
 import org.apache.lucene.store.Directory;
-import org.elasticsearch.cluster.node.DiscoveryNode;
-import org.elasticsearch.cluster.routing.ShardRouting;
-import org.elasticsearch.common.Nullable;
-import org.elasticsearch.index.IndexSettings;
-import org.elasticsearch.index.shard.ShardPath;
-import org.elasticsearch.indices.recovery.RecoveryState;
+import org.opensearch.cluster.node.DiscoveryNode;
+import org.opensearch.cluster.routing.ShardRouting;
+import org.opensearch.common.Nullable;
+import org.opensearch.index.IndexSettings;
+import org.opensearch.index.shard.ShardPath;
+import org.opensearch.indices.recovery.RecoveryState;
 
 import java.io.IOException;
 import java.util.Collections;
@@ -53,7 +53,7 @@ public interface IndexStorePlugin {
 
     /**
      * The {@link DirectoryFactory} mappings for this plugin. When an index is created the store type setting
-     * {@link org.elasticsearch.index.IndexModule#INDEX_STORE_TYPE_SETTING} on the index will be examined and either use the default or a
+     * {@link org.opensearch.index.IndexModule#INDEX_STORE_TYPE_SETTING} on the index will be examined and either use the default or a
      * built-in type, or looked up among all the directory factories from {@link IndexStorePlugin} plugins.
      *
      * @return a map from store type to an directory factory
@@ -74,7 +74,7 @@ public interface IndexStorePlugin {
 
     /**
      * The {@link RecoveryStateFactory} mappings for this plugin. When an index is created the recovery type setting
-     * {@link org.elasticsearch.index.IndexModule#INDEX_RECOVERY_TYPE_SETTING} on the index will be examined and either use the default
+     * {@link org.opensearch.index.IndexModule#INDEX_RECOVERY_TYPE_SETTING} on the index will be examined and either use the default
      * or looked up among all the recovery state factories from {@link IndexStorePlugin} plugins.
      *
      * @return a map from recovery type to an recovery state factory
diff --git a/server/src/main/java/org/elasticsearch/plugins/IngestPlugin.java b/server/src/main/java/org/opensearch/plugins/IngestPlugin.java
similarity index 92%
rename from server/src/main/java/org/elasticsearch/plugins/IngestPlugin.java
rename to server/src/main/java/org/opensearch/plugins/IngestPlugin.java
index 74c83a67d51..faf9d98b9ec 100644
--- a/server/src/main/java/org/elasticsearch/plugins/IngestPlugin.java
+++ b/server/src/main/java/org/opensearch/plugins/IngestPlugin.java
@@ -17,12 +17,12 @@
  * under the License.
  */
 
-package org.elasticsearch.plugins;
+package org.opensearch.plugins;
 
 import java.util.Collections;
 import java.util.Map;
 
-import org.elasticsearch.ingest.Processor;
+import org.opensearch.ingest.Processor;
 
 /**
  * An extension point for {@link Plugin} implementations to add custom ingest processors
@@ -33,7 +33,7 @@ public interface IngestPlugin {
      * Returns additional ingest processor types added by this plugin.
      *
      * The key of the returned {@link Map} is the unique name for the processor which is specified
-     * in pipeline configurations, and the value is a {@link org.elasticsearch.ingest.Processor.Factory}
+     * in pipeline configurations, and the value is a {@link org.opensearch.ingest.Processor.Factory}
      * to create the processor from a given pipeline configuration.
      */
     default Map getProcessors(Processor.Parameters parameters) {
diff --git a/server/src/main/java/org/elasticsearch/plugins/MapperPlugin.java b/server/src/main/java/org/opensearch/plugins/MapperPlugin.java
similarity index 95%
rename from server/src/main/java/org/elasticsearch/plugins/MapperPlugin.java
rename to server/src/main/java/org/opensearch/plugins/MapperPlugin.java
index 5edf994b32e..d24e6c30c99 100644
--- a/server/src/main/java/org/elasticsearch/plugins/MapperPlugin.java
+++ b/server/src/main/java/org/opensearch/plugins/MapperPlugin.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.plugins;
+package org.opensearch.plugins;
 
-import org.elasticsearch.index.mapper.Mapper;
-import org.elasticsearch.index.mapper.MetadataFieldMapper;
+import org.opensearch.index.mapper.Mapper;
+import org.opensearch.index.mapper.MetadataFieldMapper;
 
 import java.util.Collections;
 import java.util.Map;
diff --git a/server/src/main/java/org/elasticsearch/plugins/MetadataUpgrader.java b/server/src/main/java/org/opensearch/plugins/MetadataUpgrader.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/plugins/MetadataUpgrader.java
rename to server/src/main/java/org/opensearch/plugins/MetadataUpgrader.java
index f568e99f76c..bfbcf0b1eb7 100644
--- a/server/src/main/java/org/elasticsearch/plugins/MetadataUpgrader.java
+++ b/server/src/main/java/org/opensearch/plugins/MetadataUpgrader.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.plugins;
+package org.opensearch.plugins;
 
-import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
-import org.elasticsearch.cluster.metadata.Metadata;
+import org.opensearch.cluster.metadata.IndexTemplateMetadata;
+import org.opensearch.cluster.metadata.Metadata;
 
 import java.util.Collection;
 import java.util.HashMap;
diff --git a/server/src/main/java/org/elasticsearch/plugins/NetworkPlugin.java b/server/src/main/java/org/opensearch/plugins/NetworkPlugin.java
similarity index 76%
rename from server/src/main/java/org/elasticsearch/plugins/NetworkPlugin.java
rename to server/src/main/java/org/opensearch/plugins/NetworkPlugin.java
index a504d2034c3..f704890d8c1 100644
--- a/server/src/main/java/org/elasticsearch/plugins/NetworkPlugin.java
+++ b/server/src/main/java/org/opensearch/plugins/NetworkPlugin.java
@@ -16,26 +16,26 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.plugins;
+package org.opensearch.plugins;
 
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.function.Supplier;
 
-import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
-import org.elasticsearch.common.network.NetworkService;
-import org.elasticsearch.common.settings.ClusterSettings;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.util.BigArrays;
-import org.elasticsearch.common.util.PageCacheRecycler;
-import org.elasticsearch.common.util.concurrent.ThreadContext;
-import org.elasticsearch.common.xcontent.NamedXContentRegistry;
-import org.elasticsearch.http.HttpServerTransport;
-import org.elasticsearch.indices.breaker.CircuitBreakerService;
+import org.opensearch.common.io.stream.NamedWriteableRegistry;
+import org.opensearch.common.network.NetworkService;
+import org.opensearch.common.settings.ClusterSettings;
+import org.opensearch.common.settings.Settings;
+import org.opensearch.common.util.BigArrays;
+import org.opensearch.common.util.PageCacheRecycler;
+import org.opensearch.common.util.concurrent.ThreadContext;
+import org.opensearch.common.xcontent.NamedXContentRegistry;
+import org.opensearch.http.HttpServerTransport;
+import org.opensearch.indices.breaker.CircuitBreakerService;
 import org.opensearch.threadpool.ThreadPool;
-import org.elasticsearch.transport.Transport;
-import org.elasticsearch.transport.TransportInterceptor;
+import org.opensearch.transport.Transport;
+import org.opensearch.transport.TransportInterceptor;
 
 /**
  * Plugin for extending network and transport related classes
@@ -57,7 +57,7 @@ public interface NetworkPlugin {
 
     /**
      * Returns a map of {@link Transport} suppliers.
-     * See {@link org.elasticsearch.common.network.NetworkModule#TRANSPORT_TYPE_KEY} to configure a specific implementation.
+     * See {@link org.opensearch.common.network.NetworkModule#TRANSPORT_TYPE_KEY} to configure a specific implementation.
      */
     default Map> getTransports(Settings settings, ThreadPool threadPool, PageCacheRecycler pageCacheRecycler,
                                                            CircuitBreakerService circuitBreakerService,
@@ -67,7 +67,7 @@ public interface NetworkPlugin {
 
     /**
      * Returns a map of {@link HttpServerTransport} suppliers.
-     * See {@link org.elasticsearch.common.network.NetworkModule#HTTP_TYPE_SETTING} to configure a specific implementation.
+     * See {@link org.opensearch.common.network.NetworkModule#HTTP_TYPE_SETTING} to configure a specific implementation.
      */
     default Map> getHttpTransports(Settings settings, ThreadPool threadPool, BigArrays bigArrays,
                                                                          PageCacheRecycler pageCacheRecycler,
diff --git a/server/src/main/java/org/elasticsearch/plugins/PersistentTaskPlugin.java b/server/src/main/java/org/opensearch/plugins/PersistentTaskPlugin.java
similarity index 83%
rename from server/src/main/java/org/elasticsearch/plugins/PersistentTaskPlugin.java
rename to server/src/main/java/org/opensearch/plugins/PersistentTaskPlugin.java
index 46675477a89..5cc6bc2593e 100644
--- a/server/src/main/java/org/elasticsearch/plugins/PersistentTaskPlugin.java
+++ b/server/src/main/java/org/opensearch/plugins/PersistentTaskPlugin.java
@@ -16,13 +16,12 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.elasticsearch.plugins;
-
-import org.elasticsearch.client.Client;
-import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
-import org.elasticsearch.cluster.service.ClusterService;
-import org.elasticsearch.common.settings.SettingsModule;
-import org.elasticsearch.persistent.PersistentTasksExecutor;
+package org.opensearch.plugins;
+import org.opensearch.client.Client;
+import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
+import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.common.settings.SettingsModule;
+import org.opensearch.persistent.PersistentTasksExecutor;
 import org.opensearch.threadpool.ThreadPool;
 
 import java.util.Collections;
diff --git a/server/src/main/java/org/elasticsearch/plugins/Platforms.java b/server/src/main/java/org/opensearch/plugins/Platforms.java
similarity index 98%
rename from server/src/main/java/org/elasticsearch/plugins/Platforms.java
rename to server/src/main/java/org/opensearch/plugins/Platforms.java
index 57186acceee..2d9156e7d9e 100644
--- a/server/src/main/java/org/elasticsearch/plugins/Platforms.java
+++ b/server/src/main/java/org/opensearch/plugins/Platforms.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.plugins;
+package org.opensearch.plugins;
 
 import org.apache.lucene.util.Constants;
 
diff --git a/server/src/main/java/org/elasticsearch/plugins/Plugin.java b/server/src/main/java/org/opensearch/plugins/Plugin.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/plugins/Plugin.java
rename to server/src/main/java/org/opensearch/plugins/Plugin.java
index 7c34822bbda..af297f1079d 100644
--- a/server/src/main/java/org/elasticsearch/plugins/Plugin.java
+++ b/server/src/main/java/org/opensearch/plugins/Plugin.java
@@ -17,34 +17,34 @@
  * under the License.
  */
 
-package org.elasticsearch.plugins;
+package org.opensearch.plugins;
 
-import org.elasticsearch.bootstrap.BootstrapCheck;
-import org.elasticsearch.client.Client;
+import org.opensearch.bootstrap.BootstrapCheck;
+import org.opensearch.client.Client;
 import org.opensearch.cluster.ClusterState;
-import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
-import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
-import org.elasticsearch.cluster.metadata.Metadata;
-import org.elasticsearch.cluster.node.DiscoveryNodeRole;
-import org.elasticsearch.cluster.service.ClusterService;
-import org.elasticsearch.common.component.LifecycleComponent;
-import org.elasticsearch.common.inject.Module;
-import org.elasticsearch.common.io.stream.NamedWriteable;
-import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
-import org.elasticsearch.common.settings.Setting;
-import org.elasticsearch.common.settings.SettingUpgrader;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.xcontent.NamedXContentRegistry;
-import org.elasticsearch.common.xcontent.XContentParser;
-import org.elasticsearch.env.Environment;
-import org.elasticsearch.env.NodeEnvironment;
-import org.elasticsearch.index.IndexModule;
-import org.elasticsearch.index.shard.IndexSettingProvider;
-import org.elasticsearch.repositories.RepositoriesService;
+import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
+import org.opensearch.cluster.metadata.IndexTemplateMetadata;
+import org.opensearch.cluster.metadata.Metadata;
+import org.opensearch.cluster.node.DiscoveryNodeRole;
+import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.common.component.LifecycleComponent;
+import org.opensearch.common.inject.Module;
+import org.opensearch.common.io.stream.NamedWriteable;
+import org.opensearch.common.io.stream.NamedWriteableRegistry;
+import org.opensearch.common.settings.Setting;
+import org.opensearch.common.settings.SettingUpgrader;
+import org.opensearch.common.settings.Settings;
+import org.opensearch.common.xcontent.NamedXContentRegistry;
+import org.opensearch.common.xcontent.XContentParser;
+import org.opensearch.env.Environment;
+import org.opensearch.env.NodeEnvironment;
+import org.opensearch.index.IndexModule;
+import org.opensearch.index.shard.IndexSettingProvider;
+import org.opensearch.repositories.RepositoriesService;
 import org.opensearch.script.ScriptService;
 import org.opensearch.threadpool.ExecutorBuilder;
 import org.opensearch.threadpool.ThreadPool;
-import org.elasticsearch.watcher.ResourceWatcherService;
+import org.opensearch.watcher.ResourceWatcherService;
 
 import java.io.Closeable;
 import java.io.IOException;
@@ -59,7 +59,7 @@ import java.util.function.UnaryOperator;
 
 /**
  * An extension point allowing to plug in custom functionality. This class has a number of extension points that are available to all
- * plugins, in addition you can implement any of the following interfaces to further customize Elasticsearch:
+ * plugins, in addition you can implement any of the following interfaces to further customize OpenSearch:
  * 
    *
  • {@link ActionPlugin} *
  • {@link AnalysisPlugin} diff --git a/server/src/main/java/org/elasticsearch/plugins/PluginInfo.java b/server/src/main/java/org/opensearch/plugins/PluginInfo.java similarity index 90% rename from server/src/main/java/org/elasticsearch/plugins/PluginInfo.java rename to server/src/main/java/org/opensearch/plugins/PluginInfo.java index 3efd149be19..36ece11009c 100644 --- a/server/src/main/java/org/elasticsearch/plugins/PluginInfo.java +++ b/server/src/main/java/org/opensearch/plugins/PluginInfo.java @@ -17,16 +17,16 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; -import org.elasticsearch.Version; -import org.elasticsearch.bootstrap.JarHell; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.io.stream.Writeable; -import org.elasticsearch.common.xcontent.ToXContentObject; -import org.elasticsearch.common.xcontent.XContentBuilder; +import org.opensearch.Version; +import org.opensearch.bootstrap.JarHell; +import org.opensearch.common.Strings; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.io.stream.Writeable; +import org.opensearch.common.xcontent.ToXContentObject; +import org.opensearch.common.xcontent.XContentBuilder; import java.io.IOException; import java.io.InputStream; @@ -52,7 +52,7 @@ public class PluginInfo implements Writeable, ToXContentObject { private final String name; private final String description; private final String version; - private final Version elasticsearchVersion; + private final Version opensearchVersion; private final String javaVersion; private final String classname; private final List extendedPlugins; @@ -64,18 +64,18 @@ public class PluginInfo implements Writeable, ToXContentObject { * @param name the name of the plugin * @param description a description of the plugin * @param version an opaque version identifier for the plugin - * @param elasticsearchVersion the version of Elasticsearch the plugin was built for + * @param opensearchVersion the version of OpenSearch the plugin was built for * @param javaVersion the version of Java the plugin was built with * @param classname the entry point to the plugin * @param extendedPlugins other plugins this plugin extends through SPI * @param hasNativeController whether or not the plugin has a native controller */ - public PluginInfo(String name, String description, String version, Version elasticsearchVersion, String javaVersion, + public PluginInfo(String name, String description, String version, Version opensearchVersion, String javaVersion, String classname, List extendedPlugins, boolean hasNativeController) { this.name = name; this.description = description; this.version = version; - this.elasticsearchVersion = elasticsearchVersion; + this.opensearchVersion = opensearchVersion; this.javaVersion = javaVersion; this.classname = classname; this.extendedPlugins = Collections.unmodifiableList(extendedPlugins); @@ -93,11 +93,11 @@ public class PluginInfo implements Writeable, ToXContentObject { this.description = in.readString(); this.version = in.readString(); if (in.getVersion().onOrAfter(Version.V_6_3_0)) { - elasticsearchVersion = Version.readVersion(in); + opensearchVersion = Version.readVersion(in); javaVersion = in.readString(); } else { // the plugin must have the version of whichever node we are talking to, since this is enforced on startup - elasticsearchVersion = in.getVersion(); + opensearchVersion = in.getVersion(); // this might not be true, but it is not important, we just need something here for bwc that is a valid java version string javaVersion = "1.8"; } @@ -123,7 +123,7 @@ public class PluginInfo implements Writeable, ToXContentObject { out.writeString(description); out.writeString(version); if (out.getVersion().onOrAfter(Version.V_6_3_0)) { - Version.writeVersion(elasticsearchVersion, out); + Version.writeVersion(opensearchVersion, out); out.writeString(javaVersion); } out.writeString(classname); @@ -175,10 +175,10 @@ public class PluginInfo implements Writeable, ToXContentObject { "property [version] is missing for plugin [" + name + "]"); } - final String esVersionString = propsMap.remove("elasticsearch.version"); + final String esVersionString = propsMap.remove("opensearch.version"); if (esVersionString == null) { throw new IllegalArgumentException( - "property [elasticsearch.version] is missing for plugin [" + name + "]"); + "property [opensearch.version] is missing for plugin [" + name + "]"); } final Version esVersion = Version.fromString(esVersionString); final String javaVersionString = propsMap.remove("java.version"); @@ -283,12 +283,12 @@ public class PluginInfo implements Writeable, ToXContentObject { } /** - * The version of Elasticsearch the plugin was built for. + * The version of OpenSearch the plugin was built for. * - * @return an Elasticsearch version + * @return an OpenSearch version */ - public Version getElasticsearchVersion() { - return elasticsearchVersion; + public Version getOpenSearchVersion() { + return opensearchVersion; } /** @@ -315,7 +315,7 @@ public class PluginInfo implements Writeable, ToXContentObject { { builder.field("name", name); builder.field("version", version); - builder.field("elasticsearch_version", elasticsearchVersion); + builder.field("opensearch_version", opensearchVersion); builder.field("java_version", javaVersion); builder.field("description", description); builder.field("classname", classname); @@ -357,7 +357,7 @@ public class PluginInfo implements Writeable, ToXContentObject { .append(prefix).append("Name: ").append(name).append("\n") .append(prefix).append("Description: ").append(description).append("\n") .append(prefix).append("Version: ").append(version).append("\n") - .append(prefix).append("Elasticsearch Version: ").append(elasticsearchVersion).append("\n") + .append(prefix).append("OpenSearch version: ").append(opensearchVersion).append("\n") .append(prefix).append("Java Version: ").append(javaVersion).append("\n") .append(prefix).append("Native Controller: ").append(hasNativeController).append("\n") .append(prefix).append("Extended Plugins: ").append(extendedPlugins).append("\n") diff --git a/server/src/main/java/org/elasticsearch/plugins/PluginLoaderIndirection.java b/server/src/main/java/org/opensearch/plugins/PluginLoaderIndirection.java similarity index 97% rename from server/src/main/java/org/elasticsearch/plugins/PluginLoaderIndirection.java rename to server/src/main/java/org/opensearch/plugins/PluginLoaderIndirection.java index 4574e5fd309..e0aa7d52a5c 100644 --- a/server/src/main/java/org/elasticsearch/plugins/PluginLoaderIndirection.java +++ b/server/src/main/java/org/opensearch/plugins/PluginLoaderIndirection.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; import org.opensearch.plugins.ExtendedPluginsClassLoader; diff --git a/server/src/main/java/org/elasticsearch/plugins/PluginSecurity.java b/server/src/main/java/org/opensearch/plugins/PluginSecurity.java similarity index 98% rename from server/src/main/java/org/elasticsearch/plugins/PluginSecurity.java rename to server/src/main/java/org/opensearch/plugins/PluginSecurity.java index ae0123b1468..adff463f9b5 100644 --- a/server/src/main/java/org/elasticsearch/plugins/PluginSecurity.java +++ b/server/src/main/java/org/opensearch/plugins/PluginSecurity.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; import org.opensearch.cli.ExitCodes; import org.opensearch.cli.Terminal; import org.opensearch.cli.Terminal.Verbosity; import org.opensearch.cli.UserException; -import org.elasticsearch.core.internal.io.IOUtils; +import org.opensearch.core.internal.io.IOUtils; import java.io.IOException; import java.nio.file.Files; diff --git a/server/src/main/java/org/elasticsearch/plugins/PluginsService.java b/server/src/main/java/org/opensearch/plugins/PluginsService.java similarity index 95% rename from server/src/main/java/org/elasticsearch/plugins/PluginsService.java rename to server/src/main/java/org/opensearch/plugins/PluginsService.java index ebd323d2e6a..9ffadd712df 100644 --- a/server/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/server/src/main/java/org/opensearch/plugins/PluginsService.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -28,23 +28,23 @@ import org.apache.lucene.codecs.Codec; import org.apache.lucene.codecs.DocValuesFormat; import org.apache.lucene.codecs.PostingsFormat; import org.apache.lucene.util.SPIClassIterator; -import org.elasticsearch.Build; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.Version; +import org.opensearch.Build; +import org.opensearch.OpenSearchException; +import org.opensearch.Version; import org.opensearch.action.admin.cluster.node.info.PluginsAndModules; -import org.elasticsearch.bootstrap.JarHell; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.common.component.LifecycleComponent; -import org.elasticsearch.common.inject.Module; -import org.elasticsearch.common.io.FileSystemUtils; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.index.IndexModule; -import org.elasticsearch.node.ReportingService; +import org.opensearch.bootstrap.JarHell; +import org.opensearch.common.Strings; +import org.opensearch.common.collect.Tuple; +import org.opensearch.common.component.LifecycleComponent; +import org.opensearch.common.inject.Module; +import org.opensearch.common.io.FileSystemUtils; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.index.IndexModule; +import org.opensearch.node.ReportingService; import org.opensearch.threadpool.ExecutorBuilder; -import org.elasticsearch.transport.TransportSettings; +import org.opensearch.transport.TransportSettings; import java.io.IOException; import java.lang.reflect.Constructor; @@ -72,7 +72,7 @@ import java.util.TreeMap; import java.util.function.Function; import java.util.stream.Collectors; -import static org.elasticsearch.common.io.FileSystemUtils.isAccessibleDirectory; +import static org.opensearch.common.io.FileSystemUtils.isAccessibleDirectory; public class PluginsService implements ReportingService { @@ -344,12 +344,12 @@ public class PluginsService implements ReportingService { } /** - * Verify the given plugin is compatible with the current Elasticsearch installation. + * Verify the given plugin is compatible with the current OpenSearch installation. */ static void verifyCompatibility(PluginInfo info) { - if (info.getElasticsearchVersion().equals(Version.CURRENT) == false) { - throw new IllegalArgumentException("Plugin [" + info.getName() + "] was built for Elasticsearch version " - + info.getElasticsearchVersion() + " but version " + Version.CURRENT + " is running"); + if (info.getOpenSearchVersion().equals(Version.CURRENT) == false) { + throw new IllegalArgumentException("Plugin [" + info.getName() + "] was built for OpenSearch version " + + info.getOpenSearchVersion() + " but version " + Version.CURRENT + " is running"); } JarHell.checkJavaVersion(info.getName(), info.getJavaVersion()); } @@ -367,7 +367,7 @@ public class PluginsService implements ReportingService { final String name = fileName.substring(1 + fileName.indexOf("-")); final String message = String.format( Locale.ROOT, - "found file [%s] from a failed attempt to remove the plugin [%s]; execute [elasticsearch-plugin remove %2$s]", + "found file [%s] from a failed attempt to remove the plugin [%s]; execute [opensearch-plugin remove %2$s]", removing, name); throw new IllegalStateException(message); @@ -728,8 +728,8 @@ public class PluginsService implements ReportingService { Locale.ROOT, "no public constructor of correct signature for [%s]; must be [%s], [%s], or [%s]", clazz.getName(), - "(org.elasticsearch.common.settings.Settings,java.nio.file.Path)", - "(org.elasticsearch.common.settings.Settings)", + "(org.opensearch.common.settings.Settings,java.nio.file.Path)", + "(org.opensearch.common.settings.Settings)", "()"); } diff --git a/server/src/main/java/org/elasticsearch/plugins/ReloadablePlugin.java b/server/src/main/java/org/opensearch/plugins/ReloadablePlugin.java similarity index 96% rename from server/src/main/java/org/elasticsearch/plugins/ReloadablePlugin.java rename to server/src/main/java/org/opensearch/plugins/ReloadablePlugin.java index 86d7759185e..c1737d786cc 100644 --- a/server/src/main/java/org/elasticsearch/plugins/ReloadablePlugin.java +++ b/server/src/main/java/org/opensearch/plugins/ReloadablePlugin.java @@ -17,9 +17,9 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; -import org.elasticsearch.common.settings.Settings; +import org.opensearch.common.settings.Settings; /** * An extension point for {@link Plugin}s that can be reloaded. There is no @@ -51,4 +51,4 @@ public interface ReloadablePlugin { * if the offending call didn't happen. */ void reload(Settings settings) throws Exception; -} \ No newline at end of file +} diff --git a/server/src/main/java/org/elasticsearch/plugins/RepositoryPlugin.java b/server/src/main/java/org/opensearch/plugins/RepositoryPlugin.java similarity index 88% rename from server/src/main/java/org/elasticsearch/plugins/RepositoryPlugin.java rename to server/src/main/java/org/opensearch/plugins/RepositoryPlugin.java index 4f15a352c1d..f381e108f7d 100644 --- a/server/src/main/java/org/elasticsearch/plugins/RepositoryPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/RepositoryPlugin.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.env.Environment; -import org.elasticsearch.indices.recovery.RecoverySettings; -import org.elasticsearch.repositories.Repository; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.env.Environment; +import org.opensearch.indices.recovery.RecoverySettings; +import org.opensearch.repositories.Repository; import java.util.Collections; import java.util.Map; diff --git a/server/src/main/java/org/elasticsearch/plugins/ScriptPlugin.java b/server/src/main/java/org/opensearch/plugins/ScriptPlugin.java similarity index 92% rename from server/src/main/java/org/elasticsearch/plugins/ScriptPlugin.java rename to server/src/main/java/org/opensearch/plugins/ScriptPlugin.java index de86240e0ab..4037837e6f6 100644 --- a/server/src/main/java/org/elasticsearch/plugins/ScriptPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/ScriptPlugin.java @@ -16,19 +16,19 @@ * specific language governing permissions and limitations * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.Map; -import org.elasticsearch.common.settings.Settings; +import org.opensearch.common.settings.Settings; import org.opensearch.script.ScriptContext; import org.opensearch.script.ScriptEngine; /** - * An additional extension point for {@link Plugin}s that extends Elasticsearch's scripting functionality. + * An additional extension point for {@link Plugin}s that extends OpenSearch's scripting functionality. */ public interface ScriptPlugin { diff --git a/server/src/main/java/org/elasticsearch/plugins/SearchPlugin.java b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java similarity index 92% rename from server/src/main/java/org/elasticsearch/plugins/SearchPlugin.java rename to server/src/main/java/org/opensearch/plugins/SearchPlugin.java index f36796f540a..b227358c997 100644 --- a/server/src/main/java/org/elasticsearch/plugins/SearchPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/SearchPlugin.java @@ -17,41 +17,41 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; import org.apache.lucene.search.Query; -import org.elasticsearch.common.CheckedFunction; -import org.elasticsearch.common.ParseField; -import org.elasticsearch.common.io.stream.NamedWriteable; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.Writeable; -import org.elasticsearch.common.lucene.search.function.ScoreFunction; -import org.elasticsearch.common.xcontent.ContextParser; -import org.elasticsearch.common.xcontent.XContent; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.index.query.QueryBuilder; -import org.elasticsearch.index.query.QueryParser; -import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilder; -import org.elasticsearch.index.query.functionscore.ScoreFunctionParser; -import org.elasticsearch.search.SearchExtBuilder; -import org.elasticsearch.search.aggregations.Aggregation; -import org.elasticsearch.search.aggregations.AggregationBuilder; -import org.elasticsearch.search.aggregations.Aggregator; -import org.elasticsearch.search.aggregations.InternalAggregation; -import org.elasticsearch.search.aggregations.PipelineAggregationBuilder; -import org.elasticsearch.search.aggregations.bucket.terms.SignificantTerms; -import org.elasticsearch.search.aggregations.bucket.terms.heuristic.SignificanceHeuristic; -import org.elasticsearch.search.aggregations.pipeline.MovAvgModel; -import org.elasticsearch.search.aggregations.pipeline.MovAvgPipelineAggregator; -import org.elasticsearch.search.aggregations.pipeline.PipelineAggregator; -import org.elasticsearch.search.aggregations.support.ValuesSourceRegistry; -import org.elasticsearch.search.fetch.FetchSubPhase; -import org.elasticsearch.search.fetch.subphase.highlight.Highlighter; -import org.elasticsearch.search.rescore.Rescorer; -import org.elasticsearch.search.rescore.RescorerBuilder; -import org.elasticsearch.search.suggest.Suggest; -import org.elasticsearch.search.suggest.Suggester; -import org.elasticsearch.search.suggest.SuggestionBuilder; +import org.opensearch.common.CheckedFunction; +import org.opensearch.common.ParseField; +import org.opensearch.common.io.stream.NamedWriteable; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.Writeable; +import org.opensearch.common.lucene.search.function.ScoreFunction; +import org.opensearch.common.xcontent.ContextParser; +import org.opensearch.common.xcontent.XContent; +import org.opensearch.common.xcontent.XContentParser; +import org.opensearch.index.query.QueryBuilder; +import org.opensearch.index.query.QueryParser; +import org.opensearch.index.query.functionscore.ScoreFunctionBuilder; +import org.opensearch.index.query.functionscore.ScoreFunctionParser; +import org.opensearch.search.SearchExtBuilder; +import org.opensearch.search.aggregations.Aggregation; +import org.opensearch.search.aggregations.AggregationBuilder; +import org.opensearch.search.aggregations.Aggregator; +import org.opensearch.search.aggregations.InternalAggregation; +import org.opensearch.search.aggregations.PipelineAggregationBuilder; +import org.opensearch.search.aggregations.bucket.terms.SignificantTerms; +import org.opensearch.search.aggregations.bucket.terms.heuristic.SignificanceHeuristic; +import org.opensearch.search.aggregations.pipeline.MovAvgModel; +import org.opensearch.search.aggregations.pipeline.MovAvgPipelineAggregator; +import org.opensearch.search.aggregations.pipeline.PipelineAggregator; +import org.opensearch.search.aggregations.support.ValuesSourceRegistry; +import org.opensearch.search.fetch.FetchSubPhase; +import org.opensearch.search.fetch.subphase.highlight.Highlighter; +import org.opensearch.search.rescore.Rescorer; +import org.opensearch.search.rescore.RescorerBuilder; +import org.opensearch.search.suggest.Suggest; +import org.opensearch.search.suggest.Suggester; +import org.opensearch.search.suggest.SuggestionBuilder; import java.io.IOException; import java.util.List; @@ -354,7 +354,7 @@ public interface SearchPlugin { } /** - * Get the function to register the {@link org.elasticsearch.search.aggregations.support.ValuesSource} to aggregator mappings for + * Get the function to register the {@link org.opensearch.search.aggregations.support.ValuesSource} to aggregator mappings for * this aggregation */ public Consumer getAggregatorRegistrar() { @@ -362,7 +362,7 @@ public interface SearchPlugin { } /** - * Set the function to register the {@link org.elasticsearch.search.aggregations.support.ValuesSource} to aggregator mappings for + * Set the function to register the {@link org.opensearch.search.aggregations.support.ValuesSource} to aggregator mappings for * this aggregation */ public AggregationSpec setAggregatorRegistrar(Consumer aggregatorRegistrar) { diff --git a/server/src/main/java/org/elasticsearch/plugins/SystemIndexPlugin.java b/server/src/main/java/org/opensearch/plugins/SystemIndexPlugin.java similarity index 91% rename from server/src/main/java/org/elasticsearch/plugins/SystemIndexPlugin.java rename to server/src/main/java/org/opensearch/plugins/SystemIndexPlugin.java index 821f141b3ea..3409e42a71e 100644 --- a/server/src/main/java/org/elasticsearch/plugins/SystemIndexPlugin.java +++ b/server/src/main/java/org/opensearch/plugins/SystemIndexPlugin.java @@ -17,10 +17,10 @@ * under the License. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.indices.SystemIndexDescriptor; +import org.opensearch.common.settings.Settings; +import org.opensearch.indices.SystemIndexDescriptor; import java.util.Collection; import java.util.Collections; diff --git a/server/src/main/java/org/elasticsearch/plugins/package-info.java b/server/src/main/java/org/opensearch/plugins/package-info.java similarity index 81% rename from server/src/main/java/org/elasticsearch/plugins/package-info.java rename to server/src/main/java/org/opensearch/plugins/package-info.java index a6ade87b3b5..24137109a2c 100644 --- a/server/src/main/java/org/elasticsearch/plugins/package-info.java +++ b/server/src/main/java/org/opensearch/plugins/package-info.java @@ -18,7 +18,7 @@ */ /** - * Support for extending Elasticsearch by providing java code that is loaded by a child classloader. See - * {@link org.elasticsearch.plugins.Plugin}. + * Support for extending OpenSearch by providing java code that is loaded by a child classloader. See + * {@link org.opensearch.plugins.Plugin}. */ -package org.elasticsearch.plugins; +package org.opensearch.plugins; diff --git a/server/src/main/java/org/elasticsearch/plugins/spi/NamedXContentProvider.java b/server/src/main/java/org/opensearch/plugins/spi/NamedXContentProvider.java similarity index 91% rename from server/src/main/java/org/elasticsearch/plugins/spi/NamedXContentProvider.java rename to server/src/main/java/org/opensearch/plugins/spi/NamedXContentProvider.java index ef511fcfeae..0e9aa4e8dc7 100644 --- a/server/src/main/java/org/elasticsearch/plugins/spi/NamedXContentProvider.java +++ b/server/src/main/java/org/opensearch/plugins/spi/NamedXContentProvider.java @@ -17,9 +17,9 @@ * under the License. */ -package org.elasticsearch.plugins.spi; +package org.opensearch.plugins.spi; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.common.xcontent.NamedXContentRegistry; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/plugins/spi/package-info.java b/server/src/main/java/org/opensearch/plugins/spi/package-info.java similarity index 90% rename from server/src/main/java/org/elasticsearch/plugins/spi/package-info.java rename to server/src/main/java/org/opensearch/plugins/spi/package-info.java index 7740e1424fb..298425edbb3 100644 --- a/server/src/main/java/org/elasticsearch/plugins/spi/package-info.java +++ b/server/src/main/java/org/opensearch/plugins/spi/package-info.java @@ -19,7 +19,7 @@ /** * This package contains interfaces for services provided by - * Elasticsearch plugins to external applications like the + * OpenSearch plugins to external applications like the * Java High Level Rest Client. */ -package org.elasticsearch.plugins.spi; +package org.opensearch.plugins.spi;