From 49d2eeae53450831f71c40aecfaf6b4fd1d13314 Mon Sep 17 00:00:00 2001 From: Harold Wang <74381974+harold-wang@users.noreply.github.com> Date: Thu, 11 Mar 2021 10:09:06 -0800 Subject: [PATCH] Refactor ingest, monitor and node under server folder (#273) Signed-off-by: Harold Wang --- .../ingest/AbstractProcessor.java | 2 +- .../ingest/CompoundProcessor.java | 6 +- .../ingest/ConditionalProcessor.java | 20 +- .../ingest/ConfigurationUtils.java | 32 +- .../ingest/DropProcessor.java | 2 +- .../ingest/IngestDocument.java | 22 +- .../ingest/IngestInfo.java | 10 +- .../ingest/IngestMetadata.java | 24 +- .../ingest/IngestMetric.java | 6 +- .../ingest/IngestProcessorException.java | 8 +- .../ingest/IngestService.java | 68 ++--- .../ingest/IngestStats.java | 16 +- .../ingest/Pipeline.java | 8 +- .../ingest/PipelineConfiguration.java | 28 +- .../ingest/PipelineProcessor.java | 4 +- .../ingest/Processor.java | 16 +- .../ingest/ProcessorInfo.java | 14 +- .../ingest/TrackingResultProcessor.java | 10 +- .../ingest/ValueSource.java | 12 +- .../ingest/WrappingProcessor.java | 2 +- .../monitor/MonitorService.java | 18 +- .../monitor/NodeHealthService.java | 2 +- .../monitor/Probes.java | 2 +- .../monitor/StatusInfo.java | 2 +- .../monitor/fs/FsHealthService.java | 29 +- .../monitor/fs/FsInfo.java | 22 +- .../monitor/fs/FsProbe.java | 12 +- .../monitor/fs/FsService.java | 14 +- .../monitor/jvm/DeadlockAnalyzer.java | 2 +- .../monitor/jvm/GcNames.java | 2 +- .../monitor/jvm/HotThreads.java | 10 +- .../monitor/jvm/JvmGcMonitorService.java | 16 +- .../monitor/jvm/JvmInfo.java | 22 +- .../monitor/jvm/JvmPid.java | 2 +- .../monitor/jvm/JvmService.java | 12 +- .../monitor/jvm/JvmStats.java | 16 +- .../monitor/os/OsInfo.java | 14 +- .../monitor/os/OsProbe.java | 68 ++--- .../monitor/os/OsService.java | 16 +- .../monitor/os/OsStats.java | 20 +- .../monitor/package-info.java | 4 +- .../monitor/process/ProcessInfo.java | 12 +- .../monitor/process/ProcessProbe.java | 8 +- .../monitor/process/ProcessService.java | 14 +- .../monitor/process/ProcessStats.java | 18 +- .../node/AdaptiveSelectionStats.java | 18 +- .../node/InternalSettingsPreparer.java | 28 +- .../node/Node.java | 284 +++++++++--------- .../node/NodeClosedException.java | 8 +- .../node/NodeRoleSettings.java | 10 +- .../node/NodeService.java | 40 +-- .../node/NodeValidationException.java | 6 +- .../node/ReportingService.java | 6 +- .../node/ResponseCollectorService.java | 20 +- .../node/package-info.java | 4 +- 55 files changed, 546 insertions(+), 545 deletions(-) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/AbstractProcessor.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/CompoundProcessor.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/ConditionalProcessor.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/ConfigurationUtils.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/DropProcessor.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/IngestDocument.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/IngestInfo.java (91%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/IngestMetadata.java (90%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/IngestMetric.java (95%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/IngestProcessorException.java (87%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/IngestService.java (95%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/IngestStats.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/Pipeline.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/PipelineConfiguration.java (87%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/PipelineProcessor.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/Processor.java (91%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/ProcessorInfo.java (84%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/TrackingResultProcessor.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/ValueSource.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/ingest/WrappingProcessor.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/MonitorService.java (82%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/NodeHealthService.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/Probes.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/StatusInfo.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/fs/FsHealthService.java (91%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/fs/FsInfo.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/fs/FsProbe.java (95%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/fs/FsService.java (90%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/jvm/DeadlockAnalyzer.java (99%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/jvm/GcNames.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/jvm/HotThreads.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/jvm/JvmGcMonitorService.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/jvm/JvmInfo.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/jvm/JvmPid.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/jvm/JvmService.java (86%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/jvm/JvmStats.java (98%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/os/OsInfo.java (93%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/os/OsProbe.java (90%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/os/OsService.java (84%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/os/OsStats.java (97%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/package-info.java (82%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/process/ProcessInfo.java (89%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/process/ProcessProbe.java (96%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/process/ProcessService.java (86%) rename server/src/main/java/org/{elasticsearch => opensearch}/monitor/process/ProcessStats.java (91%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/AdaptiveSelectionStats.java (90%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/InternalSettingsPreparer.java (86%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/Node.java (88%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/NodeClosedException.java (85%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/NodeRoleSettings.java (84%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/NodeService.java (87%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/NodeValidationException.java (86%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/ReportingService.java (87%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/ResponseCollectorService.java (94%) rename server/src/main/java/org/{elasticsearch => opensearch}/node/package-info.java (89%) diff --git a/server/src/main/java/org/elasticsearch/ingest/AbstractProcessor.java b/server/src/main/java/org/opensearch/ingest/AbstractProcessor.java similarity index 97% rename from server/src/main/java/org/elasticsearch/ingest/AbstractProcessor.java rename to server/src/main/java/org/opensearch/ingest/AbstractProcessor.java index ddcf1e23e3c..aedf16f62e7 100644 --- a/server/src/main/java/org/elasticsearch/ingest/AbstractProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/AbstractProcessor.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; /** * An Abstract Processor that holds tag and description information diff --git a/server/src/main/java/org/elasticsearch/ingest/CompoundProcessor.java b/server/src/main/java/org/opensearch/ingest/CompoundProcessor.java similarity index 98% rename from server/src/main/java/org/elasticsearch/ingest/CompoundProcessor.java rename to server/src/main/java/org/opensearch/ingest/CompoundProcessor.java index 075b989b703..e76d2f7f9bf 100644 --- a/server/src/main/java/org/elasticsearch/ingest/CompoundProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/CompoundProcessor.java @@ -17,10 +17,10 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.common.collect.Tuple; +import org.opensearch.OpenSearchException; +import org.opensearch.common.collect.Tuple; import java.util.ArrayList; import java.util.Arrays; diff --git a/server/src/main/java/org/elasticsearch/ingest/ConditionalProcessor.java b/server/src/main/java/org/opensearch/ingest/ConditionalProcessor.java similarity index 96% rename from server/src/main/java/org/elasticsearch/ingest/ConditionalProcessor.java rename to server/src/main/java/org/opensearch/ingest/ConditionalProcessor.java index df4e96887df..86663282ce4 100644 --- a/server/src/main/java/org/elasticsearch/ingest/ConditionalProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/ConditionalProcessor.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.common.logging.DeprecationLogger; -import org.elasticsearch.script.DynamicMap; -import org.elasticsearch.script.IngestConditionalScript; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptException; -import org.elasticsearch.script.ScriptService; -import org.elasticsearch.script.ScriptType; +import org.opensearch.common.logging.DeprecationLogger; +import org.opensearch.script.DynamicMap; +import org.opensearch.script.IngestConditionalScript; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptException; +import org.opensearch.script.ScriptService; +import org.opensearch.script.ScriptType; import java.util.ArrayList; import java.util.Arrays; @@ -42,12 +42,12 @@ import java.util.function.Function; import java.util.function.LongSupplier; import java.util.stream.Collectors; -import static org.elasticsearch.ingest.ConfigurationUtils.newConfigurationException; +import static org.opensearch.ingest.ConfigurationUtils.newConfigurationException; public class ConditionalProcessor extends AbstractProcessor implements WrappingProcessor { private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(DynamicMap.class); - private static final Map> FUNCTIONS = org.elasticsearch.common.collect.Map.of( + private static final Map> FUNCTIONS = org.opensearch.common.collect.Map.of( "_type", value -> { deprecationLogger.deprecate("conditional-processor__type", "[types removal] Looking up doc types [_type] in scripts is deprecated."); diff --git a/server/src/main/java/org/elasticsearch/ingest/ConfigurationUtils.java b/server/src/main/java/org/opensearch/ingest/ConfigurationUtils.java similarity index 96% rename from server/src/main/java/org/elasticsearch/ingest/ConfigurationUtils.java rename to server/src/main/java/org/opensearch/ingest/ConfigurationUtils.java index 65320080445..02dc922b94f 100644 --- a/server/src/main/java/org/elasticsearch/ingest/ConfigurationUtils.java +++ b/server/src/main/java/org/opensearch/ingest/ConfigurationUtils.java @@ -17,24 +17,24 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; import java.io.IOException; import java.io.InputStream; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.OpenSearchParseException; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.xcontent.LoggingDeprecationHandler; -import org.elasticsearch.common.xcontent.NamedXContentRegistry; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentParser; -import org.elasticsearch.common.xcontent.XContentType; -import org.elasticsearch.common.xcontent.json.JsonXContent; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptService; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.script.TemplateScript; +import org.opensearch.ExceptionsHelper; +import org.opensearch.OpenSearchException; +import org.opensearch.OpenSearchParseException; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.xcontent.LoggingDeprecationHandler; +import org.opensearch.common.xcontent.NamedXContentRegistry; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentParser; +import org.opensearch.common.xcontent.XContentType; +import org.opensearch.common.xcontent.json.JsonXContent; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptService; +import org.opensearch.script.ScriptType; +import org.opensearch.script.TemplateScript; import java.util.ArrayList; import java.util.Arrays; @@ -43,7 +43,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import static org.elasticsearch.script.Script.DEFAULT_TEMPLATE_LANG; +import static org.opensearch.script.Script.DEFAULT_TEMPLATE_LANG; public final class ConfigurationUtils { diff --git a/server/src/main/java/org/elasticsearch/ingest/DropProcessor.java b/server/src/main/java/org/opensearch/ingest/DropProcessor.java similarity index 98% rename from server/src/main/java/org/elasticsearch/ingest/DropProcessor.java rename to server/src/main/java/org/opensearch/ingest/DropProcessor.java index 5c9999fb795..3dc7e521c50 100644 --- a/server/src/main/java/org/elasticsearch/ingest/DropProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/DropProcessor.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; import java.util.Map; diff --git a/server/src/main/java/org/elasticsearch/ingest/IngestDocument.java b/server/src/main/java/org/opensearch/ingest/IngestDocument.java similarity index 98% rename from server/src/main/java/org/elasticsearch/ingest/IngestDocument.java rename to server/src/main/java/org/opensearch/ingest/IngestDocument.java index 60f77d2ad97..a70dd60bcbe 100644 --- a/server/src/main/java/org/elasticsearch/ingest/IngestDocument.java +++ b/server/src/main/java/org/opensearch/ingest/IngestDocument.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.common.Strings; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.index.mapper.IdFieldMapper; -import org.elasticsearch.index.mapper.IndexFieldMapper; -import org.elasticsearch.index.mapper.RoutingFieldMapper; -import org.elasticsearch.index.mapper.SourceFieldMapper; -import org.elasticsearch.index.mapper.TypeFieldMapper; -import org.elasticsearch.index.mapper.VersionFieldMapper; -import org.elasticsearch.script.TemplateScript; +import org.opensearch.common.Strings; +import org.opensearch.index.VersionType; +import org.opensearch.index.mapper.IdFieldMapper; +import org.opensearch.index.mapper.IndexFieldMapper; +import org.opensearch.index.mapper.RoutingFieldMapper; +import org.opensearch.index.mapper.SourceFieldMapper; +import org.opensearch.index.mapper.TypeFieldMapper; +import org.opensearch.index.mapper.VersionFieldMapper; +import org.opensearch.script.TemplateScript; import java.time.ZoneOffset; import java.time.ZonedDateTime; @@ -92,7 +92,7 @@ public final class IngestDocument { } /** - * Constructor needed for testing that allows to create a new {@link IngestDocument} given the provided elasticsearch metadata, + * Constructor needed for testing that allows to create a new {@link IngestDocument} given the provided opensearch metadata, * source and ingest metadata. This is needed because the ingest metadata will be initialized with the current timestamp at * init time, which makes equality comparisons impossible in tests. */ diff --git a/server/src/main/java/org/elasticsearch/ingest/IngestInfo.java b/server/src/main/java/org/opensearch/ingest/IngestInfo.java similarity index 91% rename from server/src/main/java/org/elasticsearch/ingest/IngestInfo.java rename to server/src/main/java/org/opensearch/ingest/IngestInfo.java index 64f34a6b16d..b7a429581d1 100644 --- a/server/src/main/java/org/elasticsearch/ingest/IngestInfo.java +++ b/server/src/main/java/org/opensearch/ingest/IngestInfo.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.node.ReportingService; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.node.ReportingService; import java.io.IOException; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/ingest/IngestMetadata.java b/server/src/main/java/org/opensearch/ingest/IngestMetadata.java similarity index 90% rename from server/src/main/java/org/elasticsearch/ingest/IngestMetadata.java rename to server/src/main/java/org/opensearch/ingest/IngestMetadata.java index eeb80a60735..80f6968677e 100644 --- a/server/src/main/java/org/elasticsearch/ingest/IngestMetadata.java +++ b/server/src/main/java/org/opensearch/ingest/IngestMetadata.java @@ -17,19 +17,19 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.Version; -import org.elasticsearch.cluster.Diff; -import org.elasticsearch.cluster.DiffableUtils; -import org.elasticsearch.cluster.NamedDiff; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.common.ParseField; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.xcontent.ObjectParser; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentParser; +import org.opensearch.Version; +import org.opensearch.cluster.Diff; +import org.opensearch.cluster.DiffableUtils; +import org.opensearch.cluster.NamedDiff; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.common.ParseField; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.xcontent.ObjectParser; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentParser; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/ingest/IngestMetric.java b/server/src/main/java/org/opensearch/ingest/IngestMetric.java similarity index 95% rename from server/src/main/java/org/elasticsearch/ingest/IngestMetric.java rename to server/src/main/java/org/opensearch/ingest/IngestMetric.java index bbfd6e21c3b..bc80d8ed7ec 100644 --- a/server/src/main/java/org/elasticsearch/ingest/IngestMetric.java +++ b/server/src/main/java/org/opensearch/ingest/IngestMetric.java @@ -17,10 +17,10 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.common.metrics.CounterMetric; -import org.elasticsearch.common.metrics.MeanMetric; +import org.opensearch.common.metrics.CounterMetric; +import org.opensearch.common.metrics.MeanMetric; import java.util.concurrent.atomic.AtomicLong; diff --git a/server/src/main/java/org/elasticsearch/ingest/IngestProcessorException.java b/server/src/main/java/org/opensearch/ingest/IngestProcessorException.java similarity index 87% rename from server/src/main/java/org/elasticsearch/ingest/IngestProcessorException.java rename to server/src/main/java/org/opensearch/ingest/IngestProcessorException.java index 02f596b486e..b674d9c4880 100644 --- a/server/src/main/java/org/elasticsearch/ingest/IngestProcessorException.java +++ b/server/src/main/java/org/opensearch/ingest/IngestProcessorException.java @@ -17,11 +17,11 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.OpenSearchWrapperException; -import org.elasticsearch.common.io.stream.StreamInput; +import org.opensearch.OpenSearchException; +import org.opensearch.OpenSearchWrapperException; +import org.opensearch.common.io.stream.StreamInput; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/ingest/IngestService.java b/server/src/main/java/org/opensearch/ingest/IngestService.java similarity index 95% rename from server/src/main/java/org/elasticsearch/ingest/IngestService.java rename to server/src/main/java/org/opensearch/ingest/IngestService.java index 521ab0dcf93..62b005f0155 100644 --- a/server/src/main/java/org/elasticsearch/ingest/IngestService.java +++ b/server/src/main/java/org/opensearch/ingest/IngestService.java @@ -17,47 +17,47 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.elasticsearch.OpenSearchParseException; -import org.elasticsearch.ExceptionsHelper; -import org.elasticsearch.ResourceNotFoundException; +import org.opensearch.OpenSearchParseException; +import org.opensearch.ExceptionsHelper; +import org.opensearch.ResourceNotFoundException; import org.opensearch.action.ActionListener; import org.opensearch.action.DocWriteRequest; import org.opensearch.action.bulk.TransportBulkAction; -import org.elasticsearch.action.index.IndexRequest; -import org.elasticsearch.action.ingest.DeletePipelineRequest; -import org.elasticsearch.action.ingest.PutPipelineRequest; -import org.elasticsearch.action.support.master.AcknowledgedResponse; -import org.elasticsearch.client.Client; -import org.elasticsearch.cluster.AckedClusterStateUpdateTask; -import org.elasticsearch.cluster.ClusterChangedEvent; -import org.elasticsearch.cluster.ClusterState; -import org.elasticsearch.cluster.ClusterStateApplier; -import org.elasticsearch.cluster.metadata.IndexAbstraction; -import org.elasticsearch.cluster.metadata.IndexMetadata; -import org.elasticsearch.cluster.metadata.IndexTemplateMetadata; -import org.elasticsearch.cluster.metadata.Metadata; -import org.elasticsearch.cluster.metadata.MetadataIndexTemplateService; -import org.elasticsearch.cluster.node.DiscoveryNode; -import org.elasticsearch.cluster.service.ClusterService; -import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.common.regex.Regex; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.concurrent.AbstractRunnable; -import org.elasticsearch.common.xcontent.XContentHelper; -import org.elasticsearch.env.Environment; -import org.elasticsearch.gateway.GatewayService; -import org.elasticsearch.index.IndexSettings; -import org.elasticsearch.index.VersionType; -import org.elasticsearch.index.analysis.AnalysisRegistry; -import org.elasticsearch.node.ReportingService; -import org.elasticsearch.plugins.IngestPlugin; -import org.elasticsearch.script.ScriptService; +import org.opensearch.action.index.IndexRequest; +import org.opensearch.action.ingest.DeletePipelineRequest; +import org.opensearch.action.ingest.PutPipelineRequest; +import org.opensearch.action.support.master.AcknowledgedResponse; +import org.opensearch.client.Client; +import org.opensearch.cluster.AckedClusterStateUpdateTask; +import org.opensearch.cluster.ClusterChangedEvent; +import org.opensearch.cluster.ClusterState; +import org.opensearch.cluster.ClusterStateApplier; +import org.opensearch.cluster.metadata.IndexAbstraction; +import org.opensearch.cluster.metadata.IndexMetadata; +import org.opensearch.cluster.metadata.IndexTemplateMetadata; +import org.opensearch.cluster.metadata.Metadata; +import org.opensearch.cluster.metadata.MetadataIndexTemplateService; +import org.opensearch.cluster.node.DiscoveryNode; +import org.opensearch.cluster.service.ClusterService; +import org.opensearch.common.collect.Tuple; +import org.opensearch.common.regex.Regex; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.concurrent.AbstractRunnable; +import org.opensearch.common.xcontent.XContentHelper; +import org.opensearch.env.Environment; +import org.opensearch.gateway.GatewayService; +import org.opensearch.index.IndexSettings; +import org.opensearch.index.VersionType; +import org.opensearch.index.analysis.AnalysisRegistry; +import org.opensearch.node.ReportingService; +import org.opensearch.plugins.IngestPlugin; +import org.opensearch.script.ScriptService; import org.opensearch.threadpool.ThreadPool; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/ingest/IngestStats.java b/server/src/main/java/org/opensearch/ingest/IngestStats.java similarity index 97% rename from server/src/main/java/org/elasticsearch/ingest/IngestStats.java rename to server/src/main/java/org/opensearch/ingest/IngestStats.java index 17f53e9904c..2dadaee870b 100644 --- a/server/src/main/java/org/elasticsearch/ingest/IngestStats.java +++ b/server/src/main/java/org/opensearch/ingest/IngestStats.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.Version; -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.unit.TimeValue; -import org.elasticsearch.common.xcontent.ToXContentFragment; -import org.elasticsearch.common.xcontent.XContentBuilder; +import org.opensearch.Version; +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.unit.TimeValue; +import org.opensearch.common.xcontent.ToXContentFragment; +import org.opensearch.common.xcontent.XContentBuilder; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/main/java/org/elasticsearch/ingest/Pipeline.java b/server/src/main/java/org/opensearch/ingest/Pipeline.java similarity index 97% rename from server/src/main/java/org/elasticsearch/ingest/Pipeline.java rename to server/src/main/java/org/opensearch/ingest/Pipeline.java index 755d6cd3a95..8292061dfdf 100644 --- a/server/src/main/java/org/elasticsearch/ingest/Pipeline.java +++ b/server/src/main/java/org/opensearch/ingest/Pipeline.java @@ -17,10 +17,10 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.OpenSearchParseException; -import org.elasticsearch.common.Nullable; +import org.opensearch.OpenSearchParseException; +import org.opensearch.common.Nullable; import java.util.Arrays; import java.util.Collections; @@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit; import java.util.function.BiConsumer; import java.util.function.LongSupplier; -import org.elasticsearch.script.ScriptService; +import org.opensearch.script.ScriptService; /** * A pipeline is a list of {@link Processor} instances grouped under a unique id. diff --git a/server/src/main/java/org/elasticsearch/ingest/PipelineConfiguration.java b/server/src/main/java/org/opensearch/ingest/PipelineConfiguration.java similarity index 87% rename from server/src/main/java/org/elasticsearch/ingest/PipelineConfiguration.java rename to server/src/main/java/org/opensearch/ingest/PipelineConfiguration.java index 81ef55ecf40..bdc89f9ff6e 100644 --- a/server/src/main/java/org/elasticsearch/ingest/PipelineConfiguration.java +++ b/server/src/main/java/org/opensearch/ingest/PipelineConfiguration.java @@ -17,21 +17,21 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.cluster.AbstractDiffable; -import org.elasticsearch.cluster.Diff; -import org.elasticsearch.common.ParseField; -import org.elasticsearch.common.Strings; -import org.elasticsearch.common.bytes.BytesReference; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.xcontent.ContextParser; -import org.elasticsearch.common.xcontent.ObjectParser; -import org.elasticsearch.common.xcontent.ToXContentObject; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentHelper; -import org.elasticsearch.common.xcontent.XContentType; +import org.opensearch.cluster.AbstractDiffable; +import org.opensearch.cluster.Diff; +import org.opensearch.common.ParseField; +import org.opensearch.common.Strings; +import org.opensearch.common.bytes.BytesReference; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.xcontent.ContextParser; +import org.opensearch.common.xcontent.ObjectParser; +import org.opensearch.common.xcontent.ToXContentObject; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.common.xcontent.XContentHelper; +import org.opensearch.common.xcontent.XContentType; import java.io.IOException; import java.util.Map; diff --git a/server/src/main/java/org/elasticsearch/ingest/PipelineProcessor.java b/server/src/main/java/org/opensearch/ingest/PipelineProcessor.java similarity index 97% rename from server/src/main/java/org/elasticsearch/ingest/PipelineProcessor.java rename to server/src/main/java/org/opensearch/ingest/PipelineProcessor.java index 34754aa7b3e..57f48176a65 100644 --- a/server/src/main/java/org/elasticsearch/ingest/PipelineProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/PipelineProcessor.java @@ -17,9 +17,9 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.script.TemplateScript; +import org.opensearch.script.TemplateScript; import java.util.Map; import java.util.function.BiConsumer; diff --git a/server/src/main/java/org/elasticsearch/ingest/Processor.java b/server/src/main/java/org/opensearch/ingest/Processor.java similarity index 91% rename from server/src/main/java/org/elasticsearch/ingest/Processor.java rename to server/src/main/java/org/opensearch/ingest/Processor.java index 07a9358343f..302e870777e 100644 --- a/server/src/main/java/org/elasticsearch/ingest/Processor.java +++ b/server/src/main/java/org/opensearch/ingest/Processor.java @@ -17,13 +17,13 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.client.Client; -import org.elasticsearch.common.util.concurrent.ThreadContext; -import org.elasticsearch.env.Environment; -import org.elasticsearch.index.analysis.AnalysisRegistry; -import org.elasticsearch.script.ScriptService; +import org.opensearch.client.Client; +import org.opensearch.common.util.concurrent.ThreadContext; +import org.opensearch.env.Environment; +import org.opensearch.index.analysis.AnalysisRegistry; +import org.opensearch.script.ScriptService; import org.opensearch.threadpool.Scheduler; import java.util.Map; @@ -100,7 +100,7 @@ public interface Processor { /** * Infrastructure class that holds services that can be used by processor factories to create processor instances - * and that gets passed around to all {@link org.elasticsearch.plugins.IngestPlugin}s. + * and that gets passed around to all {@link org.opensearch.plugins.IngestPlugin}s. */ class Parameters { @@ -120,7 +120,7 @@ public interface Processor { public final AnalysisRegistry analysisRegistry; /** - * Allows processors to read headers set by {@link org.elasticsearch.action.support.ActionFilter} + * Allows processors to read headers set by {@link org.opensearch.action.support.ActionFilter} * instances that have run prior to in ingest. */ public final ThreadContext threadContext; diff --git a/server/src/main/java/org/elasticsearch/ingest/ProcessorInfo.java b/server/src/main/java/org/opensearch/ingest/ProcessorInfo.java similarity index 84% rename from server/src/main/java/org/elasticsearch/ingest/ProcessorInfo.java rename to server/src/main/java/org/opensearch/ingest/ProcessorInfo.java index 31a799e7d06..9b6ee03779b 100644 --- a/server/src/main/java/org/elasticsearch/ingest/ProcessorInfo.java +++ b/server/src/main/java/org/opensearch/ingest/ProcessorInfo.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -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.ToXContent.Params; -import org.elasticsearch.common.xcontent.ToXContentObject; -import org.elasticsearch.common.xcontent.XContentBuilder; +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.ToXContent.Params; +import org.opensearch.common.xcontent.ToXContentObject; +import org.opensearch.common.xcontent.XContentBuilder; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/ingest/TrackingResultProcessor.java b/server/src/main/java/org/opensearch/ingest/TrackingResultProcessor.java similarity index 97% rename from server/src/main/java/org/elasticsearch/ingest/TrackingResultProcessor.java rename to server/src/main/java/org/opensearch/ingest/TrackingResultProcessor.java index de342290112..069b231b442 100644 --- a/server/src/main/java/org/elasticsearch/ingest/TrackingResultProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/TrackingResultProcessor.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.action.ingest.SimulateProcessorResult; -import org.elasticsearch.common.collect.Tuple; +import org.opensearch.OpenSearchException; +import org.opensearch.action.ingest.SimulateProcessorResult; +import org.opensearch.common.collect.Tuple; import java.util.ArrayList; import java.util.List; import java.util.function.BiConsumer; -import static org.elasticsearch.ingest.IngestDocument.PIPELINE_CYCLE_ERROR_MESSAGE; +import static org.opensearch.ingest.IngestDocument.PIPELINE_CYCLE_ERROR_MESSAGE; /** * Processor to be used within Simulate API to keep track of processors executed in pipeline. diff --git a/server/src/main/java/org/elasticsearch/ingest/ValueSource.java b/server/src/main/java/org/opensearch/ingest/ValueSource.java similarity index 96% rename from server/src/main/java/org/elasticsearch/ingest/ValueSource.java rename to server/src/main/java/org/opensearch/ingest/ValueSource.java index 4dda3e86ba2..1ef8a352101 100644 --- a/server/src/main/java/org/elasticsearch/ingest/ValueSource.java +++ b/server/src/main/java/org/opensearch/ingest/ValueSource.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; -import org.elasticsearch.script.Script; -import org.elasticsearch.script.ScriptService; -import org.elasticsearch.script.ScriptType; -import org.elasticsearch.script.TemplateScript; +import org.opensearch.script.Script; +import org.opensearch.script.ScriptService; +import org.opensearch.script.ScriptType; +import org.opensearch.script.TemplateScript; import java.util.ArrayList; import java.util.Arrays; @@ -32,7 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import static org.elasticsearch.script.Script.DEFAULT_TEMPLATE_LANG; +import static org.opensearch.script.Script.DEFAULT_TEMPLATE_LANG; /** * Holds a value. If the value is requested a copy is made and optionally template snippets are resolved too. diff --git a/server/src/main/java/org/elasticsearch/ingest/WrappingProcessor.java b/server/src/main/java/org/opensearch/ingest/WrappingProcessor.java similarity index 97% rename from server/src/main/java/org/elasticsearch/ingest/WrappingProcessor.java rename to server/src/main/java/org/opensearch/ingest/WrappingProcessor.java index 8783f65e2d7..0ea8530dfca 100644 --- a/server/src/main/java/org/elasticsearch/ingest/WrappingProcessor.java +++ b/server/src/main/java/org/opensearch/ingest/WrappingProcessor.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.ingest; +package org.opensearch.ingest; /** * A srapping processor is one that encapsulates an inner processor, or a processor that the wrapped processor enacts upon. All processors diff --git a/server/src/main/java/org/elasticsearch/monitor/MonitorService.java b/server/src/main/java/org/opensearch/monitor/MonitorService.java similarity index 82% rename from server/src/main/java/org/elasticsearch/monitor/MonitorService.java rename to server/src/main/java/org/opensearch/monitor/MonitorService.java index 94b864b011d..7867a85ed5a 100644 --- a/server/src/main/java/org/elasticsearch/monitor/MonitorService.java +++ b/server/src/main/java/org/opensearch/monitor/MonitorService.java @@ -17,16 +17,16 @@ * under the License. */ -package org.elasticsearch.monitor; +package org.opensearch.monitor; -import org.elasticsearch.common.component.AbstractLifecycleComponent; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.monitor.fs.FsService; -import org.elasticsearch.monitor.jvm.JvmGcMonitorService; -import org.elasticsearch.monitor.jvm.JvmService; -import org.elasticsearch.monitor.os.OsService; -import org.elasticsearch.monitor.process.ProcessService; +import org.opensearch.common.component.AbstractLifecycleComponent; +import org.opensearch.common.settings.Settings; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.monitor.fs.FsService; +import org.opensearch.monitor.jvm.JvmGcMonitorService; +import org.opensearch.monitor.jvm.JvmService; +import org.opensearch.monitor.os.OsService; +import org.opensearch.monitor.process.ProcessService; import org.opensearch.threadpool.ThreadPool; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/monitor/NodeHealthService.java b/server/src/main/java/org/opensearch/monitor/NodeHealthService.java similarity index 96% rename from server/src/main/java/org/elasticsearch/monitor/NodeHealthService.java rename to server/src/main/java/org/opensearch/monitor/NodeHealthService.java index 3abb7b1c86b..dddb64c245f 100644 --- a/server/src/main/java/org/elasticsearch/monitor/NodeHealthService.java +++ b/server/src/main/java/org/opensearch/monitor/NodeHealthService.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.monitor; +package org.opensearch.monitor; @FunctionalInterface public interface NodeHealthService { diff --git a/server/src/main/java/org/elasticsearch/monitor/Probes.java b/server/src/main/java/org/opensearch/monitor/Probes.java similarity index 97% rename from server/src/main/java/org/elasticsearch/monitor/Probes.java rename to server/src/main/java/org/opensearch/monitor/Probes.java index fbdd022736b..d99945b80dd 100644 --- a/server/src/main/java/org/elasticsearch/monitor/Probes.java +++ b/server/src/main/java/org/opensearch/monitor/Probes.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.monitor; +package org.opensearch.monitor; import java.lang.management.OperatingSystemMXBean; import java.lang.reflect.Method; diff --git a/server/src/main/java/org/elasticsearch/monitor/StatusInfo.java b/server/src/main/java/org/opensearch/monitor/StatusInfo.java similarity index 97% rename from server/src/main/java/org/elasticsearch/monitor/StatusInfo.java rename to server/src/main/java/org/opensearch/monitor/StatusInfo.java index 46d8cad08ae..518fcc5d881 100644 --- a/server/src/main/java/org/elasticsearch/monitor/StatusInfo.java +++ b/server/src/main/java/org/opensearch/monitor/StatusInfo.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.monitor; +package org.opensearch.monitor; /** * Class that represents the Health status for a node as determined by {@link NodeHealthService} and provides additional diff --git a/server/src/main/java/org/elasticsearch/monitor/fs/FsHealthService.java b/server/src/main/java/org/opensearch/monitor/fs/FsHealthService.java similarity index 91% rename from server/src/main/java/org/elasticsearch/monitor/fs/FsHealthService.java rename to server/src/main/java/org/opensearch/monitor/fs/FsHealthService.java index be58629015f..1d2a11aa6c9 100644 --- a/server/src/main/java/org/elasticsearch/monitor/fs/FsHealthService.java +++ b/server/src/main/java/org/opensearch/monitor/fs/FsHealthService.java @@ -17,22 +17,23 @@ * under the License. */ -package org.elasticsearch.monitor.fs; +package org.opensearch.monitor.fs; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; -import org.elasticsearch.common.Nullable; -import org.elasticsearch.common.UUIDs; -import org.elasticsearch.common.component.AbstractLifecycleComponent; -import org.elasticsearch.common.settings.ClusterSettings; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.core.internal.io.IOUtils; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.monitor.NodeHealthService; -import org.elasticsearch.monitor.StatusInfo; + +import org.opensearch.common.Nullable; +import org.opensearch.common.UUIDs; +import org.opensearch.common.component.AbstractLifecycleComponent; +import org.opensearch.common.settings.ClusterSettings; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.core.internal.io.IOUtils; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.monitor.NodeHealthService; +import org.opensearch.monitor.StatusInfo; import org.opensearch.threadpool.Scheduler; import org.opensearch.threadpool.ThreadPool; @@ -46,8 +47,8 @@ import java.util.Set; import java.util.function.LongSupplier; import java.util.stream.Collectors; -import static org.elasticsearch.monitor.StatusInfo.Status.HEALTHY; -import static org.elasticsearch.monitor.StatusInfo.Status.UNHEALTHY; +import static org.opensearch.monitor.StatusInfo.Status.HEALTHY; +import static org.opensearch.monitor.StatusInfo.Status.UNHEALTHY; /** * Runs periodically and attempts to create a temp file to see if the filesystem is writable. If not then it marks the diff --git a/server/src/main/java/org/elasticsearch/monitor/fs/FsInfo.java b/server/src/main/java/org/opensearch/monitor/fs/FsInfo.java similarity index 97% rename from server/src/main/java/org/elasticsearch/monitor/fs/FsInfo.java rename to server/src/main/java/org/opensearch/monitor/fs/FsInfo.java index ae0bc3ebe3d..25c233f185a 100644 --- a/server/src/main/java/org/elasticsearch/monitor/fs/FsInfo.java +++ b/server/src/main/java/org/opensearch/monitor/fs/FsInfo.java @@ -17,18 +17,18 @@ * under the License. */ -package org.elasticsearch.monitor.fs; +package org.opensearch.monitor.fs; -import org.elasticsearch.Version; -import org.elasticsearch.cluster.DiskUsage; -import org.elasticsearch.common.Nullable; -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.unit.ByteSizeValue; -import org.elasticsearch.common.xcontent.ToXContentFragment; -import org.elasticsearch.common.xcontent.ToXContentObject; -import org.elasticsearch.common.xcontent.XContentBuilder; +import org.opensearch.Version; +import org.opensearch.cluster.DiskUsage; +import org.opensearch.common.Nullable; +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.unit.ByteSizeValue; +import org.opensearch.common.xcontent.ToXContentFragment; +import org.opensearch.common.xcontent.ToXContentObject; +import org.opensearch.common.xcontent.XContentBuilder; import java.io.IOException; import java.util.Arrays; diff --git a/server/src/main/java/org/elasticsearch/monitor/fs/FsProbe.java b/server/src/main/java/org/opensearch/monitor/fs/FsProbe.java similarity index 95% rename from server/src/main/java/org/elasticsearch/monitor/fs/FsProbe.java rename to server/src/main/java/org/opensearch/monitor/fs/FsProbe.java index 473e685d381..8618b60e7dd 100644 --- a/server/src/main/java/org/elasticsearch/monitor/fs/FsProbe.java +++ b/server/src/main/java/org/opensearch/monitor/fs/FsProbe.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.monitor.fs; +package org.opensearch.monitor.fs; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.lucene.util.Constants; -import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.common.collect.Tuple; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.env.NodeEnvironment.NodePath; +import org.opensearch.common.SuppressForbidden; +import org.opensearch.common.collect.Tuple; +import org.opensearch.common.io.PathUtils; +import org.opensearch.env.NodeEnvironment; +import org.opensearch.env.NodeEnvironment.NodePath; import java.io.IOException; import java.nio.file.Files; diff --git a/server/src/main/java/org/elasticsearch/monitor/fs/FsService.java b/server/src/main/java/org/opensearch/monitor/fs/FsService.java similarity index 90% rename from server/src/main/java/org/elasticsearch/monitor/fs/FsService.java rename to server/src/main/java/org/opensearch/monitor/fs/FsService.java index e6e88f7ee2b..a0f5e5192db 100644 --- a/server/src/main/java/org/elasticsearch/monitor/fs/FsService.java +++ b/server/src/main/java/org/opensearch/monitor/fs/FsService.java @@ -17,16 +17,16 @@ * under the License. */ -package org.elasticsearch.monitor.fs; +package org.opensearch.monitor.fs; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.util.SingleObjectCache; -import org.elasticsearch.env.NodeEnvironment; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.util.SingleObjectCache; +import org.opensearch.env.NodeEnvironment; import java.io.IOException; import java.util.function.Supplier; diff --git a/server/src/main/java/org/elasticsearch/monitor/jvm/DeadlockAnalyzer.java b/server/src/main/java/org/opensearch/monitor/jvm/DeadlockAnalyzer.java similarity index 99% rename from server/src/main/java/org/elasticsearch/monitor/jvm/DeadlockAnalyzer.java rename to server/src/main/java/org/opensearch/monitor/jvm/DeadlockAnalyzer.java index 19253c52e30..658ce22658c 100644 --- a/server/src/main/java/org/elasticsearch/monitor/jvm/DeadlockAnalyzer.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/DeadlockAnalyzer.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.monitor.jvm; +package org.opensearch.monitor.jvm; import java.lang.management.ManagementFactory; import java.lang.management.ThreadInfo; diff --git a/server/src/main/java/org/elasticsearch/monitor/jvm/GcNames.java b/server/src/main/java/org/opensearch/monitor/jvm/GcNames.java similarity index 98% rename from server/src/main/java/org/elasticsearch/monitor/jvm/GcNames.java rename to server/src/main/java/org/opensearch/monitor/jvm/GcNames.java index 702550fb4bd..8b10bfffaa3 100644 --- a/server/src/main/java/org/elasticsearch/monitor/jvm/GcNames.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/GcNames.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.monitor.jvm; +package org.opensearch.monitor.jvm; public class GcNames { diff --git a/server/src/main/java/org/elasticsearch/monitor/jvm/HotThreads.java b/server/src/main/java/org/opensearch/monitor/jvm/HotThreads.java similarity index 97% rename from server/src/main/java/org/elasticsearch/monitor/jvm/HotThreads.java rename to server/src/main/java/org/opensearch/monitor/jvm/HotThreads.java index 239c1027e84..ced997adc8f 100644 --- a/server/src/main/java/org/elasticsearch/monitor/jvm/HotThreads.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/HotThreads.java @@ -17,12 +17,12 @@ * under the License. */ -package org.elasticsearch.monitor.jvm; +package org.opensearch.monitor.jvm; import org.apache.lucene.util.CollectionUtil; -import org.elasticsearch.OpenSearchException; -import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.common.unit.TimeValue; +import org.opensearch.OpenSearchException; +import org.opensearch.common.time.DateFormatter; +import org.opensearch.common.unit.TimeValue; import java.lang.management.ManagementFactory; import java.lang.management.ThreadInfo; @@ -116,7 +116,7 @@ public class HotThreads { methodName.equals("run")) { return true; } - if (className.equals("org.elasticsearch.indices.ttl.IndicesTTLService$Notifier") && + if (className.equals("org.opensearch.indices.ttl.IndicesTTLService$Notifier") && methodName.equals("await")) { return true; } diff --git a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmGcMonitorService.java b/server/src/main/java/org/opensearch/monitor/jvm/JvmGcMonitorService.java similarity index 97% rename from server/src/main/java/org/elasticsearch/monitor/jvm/JvmGcMonitorService.java rename to server/src/main/java/org/opensearch/monitor/jvm/JvmGcMonitorService.java index 0226bc4aae1..c9a32992e01 100644 --- a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmGcMonitorService.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/JvmGcMonitorService.java @@ -17,17 +17,17 @@ * under the License. */ -package org.elasticsearch.monitor.jvm; +package org.opensearch.monitor.jvm; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.common.component.AbstractLifecycleComponent; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.ByteSizeValue; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.monitor.jvm.JvmStats.GarbageCollector; +import org.opensearch.common.component.AbstractLifecycleComponent; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.ByteSizeValue; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.monitor.jvm.JvmStats.GarbageCollector; import org.opensearch.threadpool.Scheduler.Cancellable; import org.opensearch.threadpool.ThreadPool; import org.opensearch.threadpool.ThreadPool.Names; diff --git a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmInfo.java b/server/src/main/java/org/opensearch/monitor/jvm/JvmInfo.java similarity index 97% rename from server/src/main/java/org/elasticsearch/monitor/jvm/JvmInfo.java rename to server/src/main/java/org/opensearch/monitor/jvm/JvmInfo.java index 4447b186110..50c39156454 100644 --- a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmInfo.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/JvmInfo.java @@ -17,19 +17,19 @@ * under the License. */ -package org.elasticsearch.monitor.jvm; +package org.opensearch.monitor.jvm; import org.apache.lucene.util.Constants; -import org.elasticsearch.Version; -import org.elasticsearch.common.Booleans; -import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.common.io.PathUtils; -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.unit.ByteSizeValue; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.node.ReportingService; +import org.opensearch.Version; +import org.opensearch.common.Booleans; +import org.opensearch.common.SuppressForbidden; +import org.opensearch.common.io.PathUtils; +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.unit.ByteSizeValue; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.node.ReportingService; import java.io.IOException; import java.lang.management.GarbageCollectorMXBean; diff --git a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmPid.java b/server/src/main/java/org/opensearch/monitor/jvm/JvmPid.java similarity index 97% rename from server/src/main/java/org/elasticsearch/monitor/jvm/JvmPid.java rename to server/src/main/java/org/opensearch/monitor/jvm/JvmPid.java index 71472069069..9eb128a4168 100644 --- a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmPid.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/JvmPid.java @@ -17,7 +17,7 @@ * under the License. */ -package org.elasticsearch.monitor.jvm; +package org.opensearch.monitor.jvm; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.message.ParameterizedMessage; diff --git a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmService.java b/server/src/main/java/org/opensearch/monitor/jvm/JvmService.java similarity index 86% rename from server/src/main/java/org/elasticsearch/monitor/jvm/JvmService.java rename to server/src/main/java/org/opensearch/monitor/jvm/JvmService.java index 79bd6be2fe9..d56c5501294 100644 --- a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmService.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/JvmService.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.monitor.jvm; +package org.opensearch.monitor.jvm; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.elasticsearch.common.settings.Setting; -import org.elasticsearch.common.settings.Setting.Property; -import org.elasticsearch.common.settings.Settings; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.node.ReportingService; +import org.opensearch.common.settings.Setting; +import org.opensearch.common.settings.Setting.Property; +import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.node.ReportingService; public class JvmService implements ReportingService { diff --git a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmStats.java b/server/src/main/java/org/opensearch/monitor/jvm/JvmStats.java similarity index 98% rename from server/src/main/java/org/elasticsearch/monitor/jvm/JvmStats.java rename to server/src/main/java/org/opensearch/monitor/jvm/JvmStats.java index 45180fd1c6f..54e72911f1a 100644 --- a/server/src/main/java/org/elasticsearch/monitor/jvm/JvmStats.java +++ b/server/src/main/java/org/opensearch/monitor/jvm/JvmStats.java @@ -17,15 +17,15 @@ * under the License. */ -package org.elasticsearch.monitor.jvm; +package org.opensearch.monitor.jvm; -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.unit.ByteSizeValue; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.ToXContentFragment; -import org.elasticsearch.common.xcontent.XContentBuilder; +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.unit.ByteSizeValue; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.ToXContentFragment; +import org.opensearch.common.xcontent.XContentBuilder; import java.io.IOException; import java.lang.management.BufferPoolMXBean; diff --git a/server/src/main/java/org/elasticsearch/monitor/os/OsInfo.java b/server/src/main/java/org/opensearch/monitor/os/OsInfo.java similarity index 93% rename from server/src/main/java/org/elasticsearch/monitor/os/OsInfo.java rename to server/src/main/java/org/opensearch/monitor/os/OsInfo.java index 324c6bc0278..83f298a0899 100644 --- a/server/src/main/java/org/elasticsearch/monitor/os/OsInfo.java +++ b/server/src/main/java/org/opensearch/monitor/os/OsInfo.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.monitor.os; +package org.opensearch.monitor.os; -import org.elasticsearch.Version; -import org.elasticsearch.common.io.stream.StreamInput; -import org.elasticsearch.common.io.stream.StreamOutput; -import org.elasticsearch.common.unit.TimeValue; -import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.node.ReportingService; +import org.opensearch.Version; +import org.opensearch.common.io.stream.StreamInput; +import org.opensearch.common.io.stream.StreamOutput; +import org.opensearch.common.unit.TimeValue; +import org.opensearch.common.xcontent.XContentBuilder; +import org.opensearch.node.ReportingService; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/monitor/os/OsProbe.java b/server/src/main/java/org/opensearch/monitor/os/OsProbe.java similarity index 90% rename from server/src/main/java/org/elasticsearch/monitor/os/OsProbe.java rename to server/src/main/java/org/opensearch/monitor/os/OsProbe.java index 00bde057ca8..680e5e3435d 100644 --- a/server/src/main/java/org/elasticsearch/monitor/os/OsProbe.java +++ b/server/src/main/java/org/opensearch/monitor/os/OsProbe.java @@ -17,14 +17,14 @@ * under the License. */ -package org.elasticsearch.monitor.os; +package org.opensearch.monitor.os; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.apache.lucene.util.Constants; -import org.elasticsearch.common.SuppressForbidden; -import org.elasticsearch.common.io.PathUtils; -import org.elasticsearch.monitor.Probes; +import org.opensearch.common.SuppressForbidden; +import org.opensearch.common.io.PathUtils; +import org.opensearch.monitor.Probes; import java.io.IOException; import java.lang.management.ManagementFactory; @@ -242,10 +242,10 @@ public class OsProbe { private static final String CONTROL_GROUPS_HIERARCHY_OVERRIDE = System.getProperty("es.cgroups.hierarchy.override"); /** - * A map of the control groups to which the Elasticsearch process belongs. Note that this is a map because the control groups can vary + * A map of the control groups to which the OpenSearch process belongs. Note that this is a map because the control groups can vary * from subsystem to subsystem. Additionally, this map can not be cached because a running process can be reclassified. * - * @return a map from subsystems to the control group for the Elasticsearch process. + * @return a map from subsystems to the control group for the OpenSearch process. * @throws IOException if an I/O exception occurs reading {@code /proc/self/cgroup} */ private Map getControlGroups() throws IOException { @@ -253,7 +253,7 @@ public class OsProbe { final Map controllerMap = new HashMap<>(); for (final String line : lines) { /* - * The virtual file /proc/self/cgroup lists the control groups that the Elasticsearch process is a member of. Each line contains + * The virtual file /proc/self/cgroup lists the control groups that the OpenSearch process is a member of. Each line contains * three colon-separated fields of the form hierarchy-ID:subsystem-list:cgroup-path. For cgroups version 1 hierarchies, the * subsystem-list is a comma-separated list of subsystems. The subsystem-list can be empty if the hierarchy represents a cgroups * version 2 hierarchy. For cgroups version 1 @@ -281,7 +281,7 @@ public class OsProbe { } /** - * The lines from {@code /proc/self/cgroup}. This file represents the control groups to which the Elasticsearch process belongs. Each + * The lines from {@code /proc/self/cgroup}. This file represents the control groups to which the OpenSearch process belongs. Each * line in this file represents a control group hierarchy of the form *

* {@code \d+:([^:,]+(?:,[^:,]+)?):(/.*)} @@ -300,10 +300,10 @@ public class OsProbe { } /** - * The total CPU time in nanoseconds consumed by all tasks in the cgroup to which the Elasticsearch process belongs for the {@code + * The total CPU time in nanoseconds consumed by all tasks in the cgroup to which the OpenSearch process belongs for the {@code * cpuacct} subsystem. * - * @param controlGroup the control group for the Elasticsearch process for the {@code cpuacct} subsystem + * @param controlGroup the control group for the OpenSearch process for the {@code cpuacct} subsystem * @return the total CPU time in nanoseconds * @throws IOException if an I/O exception occurs reading {@code cpuacct.usage} for the control group */ @@ -312,10 +312,10 @@ public class OsProbe { } /** - * Returns the line from {@code cpuacct.usage} for the control group to which the Elasticsearch process belongs for the {@code cpuacct} + * Returns the line from {@code cpuacct.usage} for the control group to which the OpenSearch process belongs for the {@code cpuacct} * subsystem. This line represents the total CPU time in nanoseconds consumed by all tasks in the same control group. * - * @param controlGroup the control group to which the Elasticsearch process belongs for the {@code cpuacct} subsystem + * @param controlGroup the control group to which the OpenSearch process belongs for the {@code cpuacct} subsystem * @return the line from {@code cpuacct.usage} * @throws IOException if an I/O exception occurs reading {@code cpuacct.usage} for the control group */ @@ -325,10 +325,10 @@ public class OsProbe { } /** - * The total period of time in microseconds for how frequently the Elasticsearch control group's access to CPU resources will be + * The total period of time in microseconds for how frequently the OpenSearch control group's access to CPU resources will be * reallocated. * - * @param controlGroup the control group for the Elasticsearch process for the {@code cpuacct} subsystem + * @param controlGroup the control group for the OpenSearch process for the {@code cpuacct} subsystem * @return the CFS quota period in microseconds * @throws IOException if an I/O exception occurs reading {@code cpu.cfs_period_us} for the control group */ @@ -337,11 +337,11 @@ public class OsProbe { } /** - * Returns the line from {@code cpu.cfs_period_us} for the control group to which the Elasticsearch process belongs for the {@code cpu} + * Returns the line from {@code cpu.cfs_period_us} for the control group to which the OpenSearch process belongs for the {@code cpu} * subsystem. This line represents the period of time in microseconds for how frequently the control group's access to CPU resources * will be reallocated. * - * @param controlGroup the control group to which the Elasticsearch process belongs for the {@code cpu} subsystem + * @param controlGroup the control group to which the OpenSearch process belongs for the {@code cpu} subsystem * @return the line from {@code cpu.cfs_period_us} * @throws IOException if an I/O exception occurs reading {@code cpu.cfs_period_us} for the control group */ @@ -351,10 +351,10 @@ public class OsProbe { } /** - * The total time in microseconds that all tasks in the Elasticsearch control group can run during one period as specified by {@code + * The total time in microseconds that all tasks in the OpenSearch control group can run during one period as specified by {@code * cpu.cfs_period_us}. * - * @param controlGroup the control group for the Elasticsearch process for the {@code cpuacct} subsystem + * @param controlGroup the control group for the OpenSearch process for the {@code cpuacct} subsystem * @return the CFS quota in microseconds * @throws IOException if an I/O exception occurs reading {@code cpu.cfs_quota_us} for the control group */ @@ -363,11 +363,11 @@ public class OsProbe { } /** - * Returns the line from {@code cpu.cfs_quota_us} for the control group to which the Elasticsearch process belongs for the {@code cpu} + * Returns the line from {@code cpu.cfs_quota_us} for the control group to which the OpenSearch process belongs for the {@code cpu} * subsystem. This line represents the total time in microseconds that all tasks in the control group can run during one period as * specified by {@code cpu.cfs_period_us}. * - * @param controlGroup the control group to which the Elasticsearch process belongs for the {@code cpu} subsystem + * @param controlGroup the control group to which the OpenSearch process belongs for the {@code cpu} subsystem * @return the line from {@code cpu.cfs_quota_us} * @throws IOException if an I/O exception occurs reading {@code cpu.cfs_quota_us} for the control group */ @@ -377,9 +377,9 @@ public class OsProbe { } /** - * The CPU time statistics for all tasks in the Elasticsearch control group. + * The CPU time statistics for all tasks in the OpenSearch control group. * - * @param controlGroup the control group for the Elasticsearch process for the {@code cpuacct} subsystem + * @param controlGroup the control group for the OpenSearch process for the {@code cpuacct} subsystem * @return the CPU time statistics * @throws IOException if an I/O exception occurs reading {@code cpu.stat} for the control group */ @@ -409,7 +409,7 @@ public class OsProbe { } /** - * Returns the lines from {@code cpu.stat} for the control group to which the Elasticsearch process belongs for the {@code cpu} + * Returns the lines from {@code cpu.stat} for the control group to which the OpenSearch process belongs for the {@code cpu} * subsystem. These lines represent the CPU time statistics and have the form *

      * nr_periods \d+
@@ -420,7 +420,7 @@ public class OsProbe {
      * nr_throttled} is the number of times tasks in the given control group have been throttled, and {@code throttled_time} is the total
      * time in nanoseconds for which tasks in the given control group have been throttled.
      *
-     * @param controlGroup the control group to which the Elasticsearch process belongs for the {@code cpu} subsystem
+     * @param controlGroup the control group to which the OpenSearch process belongs for the {@code cpu} subsystem
      * @return the lines from {@code cpu.stat}
      * @throws IOException if an I/O exception occurs reading {@code cpu.stat} for the control group
      */
@@ -436,10 +436,10 @@ public class OsProbe {
      * If there is no limit then some Linux versions return the maximum value that can be stored in an
      * unsigned 64 bit number, and this will overflow a long, hence the result type is String.
      * (The alternative would have been BigInteger but then it would not be possible to index
-     * the OS stats document into Elasticsearch without losing information, as BigInteger is
-     * not a supported Elasticsearch type.)
+     * the OS stats document into OpenSearch without losing information, as BigInteger is
+     * not a supported OpenSearch type.)
      *
-     * @param controlGroup the control group for the Elasticsearch process for the {@code memory} subsystem
+     * @param controlGroup the control group for the OpenSearch process for the {@code memory} subsystem
      * @return the maximum amount of user memory (including file cache)
      * @throws IOException if an I/O exception occurs reading {@code memory.limit_in_bytes} for the control group
      */
@@ -448,10 +448,10 @@ public class OsProbe {
     }
 
     /**
-     * Returns the line from {@code memory.limit_in_bytes} for the control group to which the Elasticsearch process belongs for the
+     * Returns the line from {@code memory.limit_in_bytes} for the control group to which the OpenSearch process belongs for the
      * {@code memory} subsystem. This line represents the maximum amount of user memory (including file cache).
      *
-     * @param controlGroup the control group to which the Elasticsearch process belongs for the {@code memory} subsystem
+     * @param controlGroup the control group to which the OpenSearch process belongs for the {@code memory} subsystem
      * @return the line from {@code memory.limit_in_bytes}
      * @throws IOException if an I/O exception occurs reading {@code memory.limit_in_bytes} for the control group
      */
@@ -465,10 +465,10 @@ public class OsProbe {
      * If there is no limit then some Linux versions return the maximum value that can be stored in an
      * unsigned 64 bit number, and this will overflow a long, hence the result type is String.
      * (The alternative would have been BigInteger but then it would not be possible to index
-     * the OS stats document into Elasticsearch without losing information, as BigInteger is
-     * not a supported Elasticsearch type.)
+     * the OS stats document into OpenSearch without losing information, as BigInteger is
+     * not a supported OpenSearch type.)
      *
-     * @param controlGroup the control group for the Elasticsearch process for the {@code memory} subsystem
+     * @param controlGroup the control group for the OpenSearch process for the {@code memory} subsystem
      * @return the total current memory usage by processes in the cgroup (in bytes)
      * @throws IOException if an I/O exception occurs reading {@code memory.limit_in_bytes} for the control group
      */
@@ -477,10 +477,10 @@ public class OsProbe {
     }
 
     /**
-     * Returns the line from {@code memory.usage_in_bytes} for the control group to which the Elasticsearch process belongs for the
+     * Returns the line from {@code memory.usage_in_bytes} for the control group to which the OpenSearch process belongs for the
      * {@code memory} subsystem. This line represents the total current memory usage by processes in the cgroup (in bytes).
      *
-     * @param controlGroup the control group to which the Elasticsearch process belongs for the {@code memory} subsystem
+     * @param controlGroup the control group to which the OpenSearch process belongs for the {@code memory} subsystem
      * @return the line from {@code memory.usage_in_bytes}
      * @throws IOException if an I/O exception occurs reading {@code memory.usage_in_bytes} for the control group
      */
diff --git a/server/src/main/java/org/elasticsearch/monitor/os/OsService.java b/server/src/main/java/org/opensearch/monitor/os/OsService.java
similarity index 84%
rename from server/src/main/java/org/elasticsearch/monitor/os/OsService.java
rename to server/src/main/java/org/opensearch/monitor/os/OsService.java
index d8f1de192a0..b55ae34ed5e 100644
--- a/server/src/main/java/org/elasticsearch/monitor/os/OsService.java
+++ b/server/src/main/java/org/opensearch/monitor/os/OsService.java
@@ -17,17 +17,17 @@
  * under the License.
  */
 
-package org.elasticsearch.monitor.os;
+package org.opensearch.monitor.os;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.elasticsearch.common.settings.Setting;
-import org.elasticsearch.common.settings.Setting.Property;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.common.util.SingleObjectCache;
-import org.elasticsearch.common.util.concurrent.EsExecutors;
-import org.elasticsearch.node.ReportingService;
+import org.opensearch.common.settings.Setting;
+import org.opensearch.common.settings.Setting.Property;
+import org.opensearch.common.settings.Settings;
+import org.opensearch.common.unit.TimeValue;
+import org.opensearch.common.util.SingleObjectCache;
+import org.opensearch.common.util.concurrent.EsExecutors;
+import org.opensearch.node.ReportingService;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/monitor/os/OsStats.java b/server/src/main/java/org/opensearch/monitor/os/OsStats.java
similarity index 97%
rename from server/src/main/java/org/elasticsearch/monitor/os/OsStats.java
rename to server/src/main/java/org/opensearch/monitor/os/OsStats.java
index 838904df543..6fed829423d 100644
--- a/server/src/main/java/org/elasticsearch/monitor/os/OsStats.java
+++ b/server/src/main/java/org/opensearch/monitor/os/OsStats.java
@@ -17,17 +17,17 @@
  * under the License.
  */
 
-package org.elasticsearch.monitor.os;
+package org.opensearch.monitor.os;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.elasticsearch.Version;
-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.unit.ByteSizeValue;
-import org.elasticsearch.common.xcontent.ToXContentFragment;
-import org.elasticsearch.common.xcontent.XContentBuilder;
+import org.opensearch.Version;
+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.unit.ByteSizeValue;
+import org.opensearch.common.xcontent.ToXContentFragment;
+import org.opensearch.common.xcontent.XContentBuilder;
 
 import java.io.IOException;
 import java.util.Arrays;
@@ -405,8 +405,8 @@ public class OsStats implements Writeable, ToXContentFragment {
          * The maximum amount of user memory (including file cache).
          * This is stored as a String because the value can be too big to fit in a
          * long.  (The alternative would have been BigInteger but then
-         * it would not be possible to index the OS stats document into Elasticsearch without
-         * losing information, as BigInteger is not a supported Elasticsearch type.)
+         * it would not be possible to index the OS stats document into OpenSearch without
+         * losing information, as BigInteger is not a supported OpenSearch type.)
          *
          * @return the maximum amount of user memory (including file cache).
          */
diff --git a/server/src/main/java/org/elasticsearch/monitor/package-info.java b/server/src/main/java/org/opensearch/monitor/package-info.java
similarity index 82%
rename from server/src/main/java/org/elasticsearch/monitor/package-info.java
rename to server/src/main/java/org/opensearch/monitor/package-info.java
index 4bb9217e9e2..0190cb406ef 100644
--- a/server/src/main/java/org/elasticsearch/monitor/package-info.java
+++ b/server/src/main/java/org/opensearch/monitor/package-info.java
@@ -18,7 +18,7 @@
  */
 
 /**
- * Monitors the Elasticsearch process and the system on which it is running so that metrics can be exposed via an HTTP or transport APIs to
+ * Monitors the OpenSearch process and the system on which it is running so that metrics can be exposed via an HTTP or transport APIs to
  * be logged and graphed.
  */
-package org.elasticsearch.monitor;
+package org.opensearch.monitor;
diff --git a/server/src/main/java/org/elasticsearch/monitor/process/ProcessInfo.java b/server/src/main/java/org/opensearch/monitor/process/ProcessInfo.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/monitor/process/ProcessInfo.java
rename to server/src/main/java/org/opensearch/monitor/process/ProcessInfo.java
index 3b17d22f119..8307eaf99e9 100644
--- a/server/src/main/java/org/elasticsearch/monitor/process/ProcessInfo.java
+++ b/server/src/main/java/org/opensearch/monitor/process/ProcessInfo.java
@@ -17,13 +17,13 @@
  * under the License.
  */
 
-package org.elasticsearch.monitor.process;
+package org.opensearch.monitor.process;
 
-import org.elasticsearch.common.io.stream.StreamInput;
-import org.elasticsearch.common.io.stream.StreamOutput;
-import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.common.xcontent.XContentBuilder;
-import org.elasticsearch.node.ReportingService;
+import org.opensearch.common.io.stream.StreamInput;
+import org.opensearch.common.io.stream.StreamOutput;
+import org.opensearch.common.unit.TimeValue;
+import org.opensearch.common.xcontent.XContentBuilder;
+import org.opensearch.node.ReportingService;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/monitor/process/ProcessProbe.java b/server/src/main/java/org/opensearch/monitor/process/ProcessProbe.java
similarity index 96%
rename from server/src/main/java/org/elasticsearch/monitor/process/ProcessProbe.java
rename to server/src/main/java/org/opensearch/monitor/process/ProcessProbe.java
index c6434d24800..4717d339663 100644
--- a/server/src/main/java/org/elasticsearch/monitor/process/ProcessProbe.java
+++ b/server/src/main/java/org/opensearch/monitor/process/ProcessProbe.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.monitor.process;
+package org.opensearch.monitor.process;
 
-import org.elasticsearch.bootstrap.BootstrapInfo;
-import org.elasticsearch.monitor.Probes;
+import org.opensearch.bootstrap.BootstrapInfo;
+import org.opensearch.monitor.Probes;
 
 import java.lang.management.ManagementFactory;
 import java.lang.management.OperatingSystemMXBean;
 import java.lang.reflect.Method;
 
-import static org.elasticsearch.monitor.jvm.JvmInfo.jvmInfo;
+import static org.opensearch.monitor.jvm.JvmInfo.jvmInfo;
 
 public class ProcessProbe {
 
diff --git a/server/src/main/java/org/elasticsearch/monitor/process/ProcessService.java b/server/src/main/java/org/opensearch/monitor/process/ProcessService.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/monitor/process/ProcessService.java
rename to server/src/main/java/org/opensearch/monitor/process/ProcessService.java
index a57fceef528..150c76dfeda 100644
--- a/server/src/main/java/org/elasticsearch/monitor/process/ProcessService.java
+++ b/server/src/main/java/org/opensearch/monitor/process/ProcessService.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.monitor.process;
+package org.opensearch.monitor.process;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.elasticsearch.common.settings.Setting;
-import org.elasticsearch.common.settings.Setting.Property;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.common.util.SingleObjectCache;
-import org.elasticsearch.node.ReportingService;
+import org.opensearch.common.settings.Setting;
+import org.opensearch.common.settings.Setting.Property;
+import org.opensearch.common.settings.Settings;
+import org.opensearch.common.unit.TimeValue;
+import org.opensearch.common.util.SingleObjectCache;
+import org.opensearch.node.ReportingService;
 
 public final class ProcessService implements ReportingService {
 
diff --git a/server/src/main/java/org/elasticsearch/monitor/process/ProcessStats.java b/server/src/main/java/org/opensearch/monitor/process/ProcessStats.java
similarity index 91%
rename from server/src/main/java/org/elasticsearch/monitor/process/ProcessStats.java
rename to server/src/main/java/org/opensearch/monitor/process/ProcessStats.java
index f1cc9d1f3f3..59435237261 100644
--- a/server/src/main/java/org/elasticsearch/monitor/process/ProcessStats.java
+++ b/server/src/main/java/org/opensearch/monitor/process/ProcessStats.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.monitor.process;
+package org.opensearch.monitor.process;
 
-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.unit.ByteSizeValue;
-import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.common.xcontent.ToXContent.Params;
-import org.elasticsearch.common.xcontent.ToXContentFragment;
-import org.elasticsearch.common.xcontent.XContentBuilder;
+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.unit.ByteSizeValue;
+import org.opensearch.common.unit.TimeValue;
+import org.opensearch.common.xcontent.ToXContent.Params;
+import org.opensearch.common.xcontent.ToXContentFragment;
+import org.opensearch.common.xcontent.XContentBuilder;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/node/AdaptiveSelectionStats.java b/server/src/main/java/org/opensearch/node/AdaptiveSelectionStats.java
similarity index 90%
rename from server/src/main/java/org/elasticsearch/node/AdaptiveSelectionStats.java
rename to server/src/main/java/org/opensearch/node/AdaptiveSelectionStats.java
index ca156375725..6ec2fef9078 100644
--- a/server/src/main/java/org/elasticsearch/node/AdaptiveSelectionStats.java
+++ b/server/src/main/java/org/opensearch/node/AdaptiveSelectionStats.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.node;
+package org.opensearch.node;
 
-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.unit.TimeValue;
-import org.elasticsearch.common.util.set.Sets;
-import org.elasticsearch.common.xcontent.ToXContent.Params;
-import org.elasticsearch.common.xcontent.ToXContentFragment;
-import org.elasticsearch.common.xcontent.XContentBuilder;
+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.unit.TimeValue;
+import org.opensearch.common.util.set.Sets;
+import org.opensearch.common.xcontent.ToXContent.Params;
+import org.opensearch.common.xcontent.ToXContentFragment;
+import org.opensearch.common.xcontent.XContentBuilder;
 
 import java.io.IOException;
 import java.util.Locale;
diff --git a/server/src/main/java/org/elasticsearch/node/InternalSettingsPreparer.java b/server/src/main/java/org/opensearch/node/InternalSettingsPreparer.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/node/InternalSettingsPreparer.java
rename to server/src/main/java/org/opensearch/node/InternalSettingsPreparer.java
index a6abf1b4f30..892f9e39762 100644
--- a/server/src/main/java/org/elasticsearch/node/InternalSettingsPreparer.java
+++ b/server/src/main/java/org/opensearch/node/InternalSettingsPreparer.java
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.elasticsearch.node;
+package org.opensearch.node;
 
 import java.io.IOException;
 import java.nio.file.Files;
@@ -29,12 +29,12 @@ import java.util.Map;
 import java.util.function.Supplier;
 import java.util.function.Function;
 
-import org.elasticsearch.Version;
-import org.elasticsearch.cluster.ClusterName;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.settings.SettingsException;
-import org.elasticsearch.env.Environment;
-import org.elasticsearch.node.Node;
+import org.opensearch.Version;
+import org.opensearch.cluster.ClusterName;
+import org.opensearch.common.settings.Settings;
+import org.opensearch.common.settings.SettingsException;
+import org.opensearch.env.Environment;
+import org.opensearch.node.Node;
 
 public class InternalSettingsPreparer {
 
@@ -43,7 +43,7 @@ public class InternalSettingsPreparer {
 
     /**
      * Prepares settings for the transport client by gathering all
-     * elasticsearch system properties and setting defaults.
+     * opensearch system properties and setting defaults.
      */
     public static Settings prepareSettings(Settings input) {
         Settings.Builder output = Settings.builder();
@@ -53,7 +53,7 @@ public class InternalSettingsPreparer {
     }
 
     /**
-     * Prepares the settings by gathering all elasticsearch system properties, optionally loading the configuration settings.
+     * Prepares the settings by gathering all opensearch system properties, optionally loading the configuration settings.
      *
      * @param input      the custom settings to use; these are not overwritten by settings in the configuration file
      * @param properties map of properties key/value pairs (usually from the command-line)
@@ -68,16 +68,16 @@ public class InternalSettingsPreparer {
         initializeSettings(output, input, properties);
         Environment environment = new Environment(output.build(), configPath);
 
-        if (Files.exists(environment.configFile().resolve("elasticsearch.yaml"))) {
-            throw new SettingsException("elasticsearch.yaml was deprecated in 5.5.0 and must be renamed to elasticsearch.yml");
+        if (Files.exists(environment.configFile().resolve("opensearch.yaml"))) {
+            throw new SettingsException("opensearch.yaml was deprecated in 5.5.0 and must be renamed to opensearch.yml");
         }
 
-        if (Files.exists(environment.configFile().resolve("elasticsearch.json"))) {
-            throw new SettingsException("elasticsearch.json was deprecated in 5.5.0 and must be converted to elasticsearch.yml");
+        if (Files.exists(environment.configFile().resolve("opensearch.json"))) {
+            throw new SettingsException("opensearch.json was deprecated in 5.5.0 and must be converted to opensearch.yml");
         }
 
         output = Settings.builder(); // start with a fresh output
-        Path path = environment.configFile().resolve("elasticsearch.yml");
+        Path path = environment.configFile().resolve("opensearch.yml");
         if (Files.exists(path)) {
             try {
                 output.loadFromPath(path);
diff --git a/server/src/main/java/org/elasticsearch/node/Node.java b/server/src/main/java/org/opensearch/node/Node.java
similarity index 88%
rename from server/src/main/java/org/elasticsearch/node/Node.java
rename to server/src/main/java/org/opensearch/node/Node.java
index 4c8178d463f..6fa1d73afb3 100644
--- a/server/src/main/java/org/elasticsearch/node/Node.java
+++ b/server/src/main/java/org/opensearch/node/Node.java
@@ -17,150 +17,150 @@
  * under the License.
  */
 
-package org.elasticsearch.node;
+package org.opensearch.node;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.apache.lucene.util.Constants;
 import org.apache.lucene.util.SetOnce;
-import org.elasticsearch.Assertions;
-import org.elasticsearch.Build;
-import org.elasticsearch.OpenSearchException;
-import org.elasticsearch.OpenSearchTimeoutException;
-import org.elasticsearch.Version;
+import org.opensearch.Assertions;
+import org.opensearch.Build;
+import org.opensearch.OpenSearchException;
+import org.opensearch.OpenSearchTimeoutException;
+import org.opensearch.Version;
 import org.opensearch.action.ActionModule;
 import org.opensearch.action.ActionType;
 import org.opensearch.action.admin.cluster.snapshots.status.TransportNodesSnapshotsStatus;
-import org.elasticsearch.index.IndexingPressure;
-import org.elasticsearch.action.search.SearchExecutionStatsCollector;
-import org.elasticsearch.action.search.SearchPhaseController;
-import org.elasticsearch.action.search.SearchTransportService;
-import org.elasticsearch.action.support.TransportAction;
-import org.elasticsearch.action.update.UpdateHelper;
-import org.elasticsearch.bootstrap.BootstrapCheck;
-import org.elasticsearch.bootstrap.BootstrapContext;
-import org.elasticsearch.client.Client;
-import org.elasticsearch.client.node.NodeClient;
-import org.elasticsearch.cluster.ClusterInfoService;
-import org.elasticsearch.cluster.ClusterModule;
-import org.elasticsearch.cluster.ClusterName;
-import org.elasticsearch.cluster.ClusterState;
-import org.elasticsearch.cluster.ClusterStateObserver;
-import org.elasticsearch.cluster.InternalClusterInfoService;
-import org.elasticsearch.cluster.NodeConnectionsService;
-import org.elasticsearch.cluster.action.index.MappingUpdatedAction;
-import org.elasticsearch.cluster.metadata.AliasValidator;
-import org.elasticsearch.cluster.metadata.IndexTemplateMetadata;
-import org.elasticsearch.cluster.metadata.Metadata;
-import org.elasticsearch.cluster.metadata.MetadataCreateDataStreamService;
-import org.elasticsearch.cluster.metadata.MetadataCreateIndexService;
-import org.elasticsearch.cluster.metadata.MetadataIndexUpgradeService;
-import org.elasticsearch.cluster.metadata.SystemIndexMetadataUpgradeService;
-import org.elasticsearch.cluster.metadata.TemplateUpgradeService;
-import org.elasticsearch.cluster.node.DiscoveryNode;
-import org.elasticsearch.cluster.node.DiscoveryNodeRole;
-import org.elasticsearch.cluster.routing.BatchedRerouteService;
-import org.elasticsearch.cluster.routing.RerouteService;
-import org.elasticsearch.cluster.routing.allocation.DiskThresholdMonitor;
-import org.elasticsearch.cluster.service.ClusterService;
-import org.elasticsearch.common.StopWatch;
-import org.elasticsearch.common.breaker.CircuitBreaker;
-import org.elasticsearch.common.component.Lifecycle;
-import org.elasticsearch.common.component.LifecycleComponent;
-import org.elasticsearch.common.inject.Injector;
-import org.elasticsearch.common.inject.Key;
-import org.elasticsearch.common.inject.Module;
-import org.elasticsearch.common.inject.ModulesBuilder;
-import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
-import org.elasticsearch.common.lease.Releasables;
-import org.elasticsearch.common.logging.DeprecationLogger;
-import org.elasticsearch.common.logging.HeaderWarning;
-import org.elasticsearch.common.logging.NodeAndClusterIdStateListener;
-import org.elasticsearch.common.network.NetworkAddress;
-import org.elasticsearch.common.network.NetworkModule;
-import org.elasticsearch.common.network.NetworkService;
-import org.elasticsearch.common.settings.ClusterSettings;
-import org.elasticsearch.common.settings.ConsistentSettingsService;
-import org.elasticsearch.common.settings.Setting;
-import org.elasticsearch.common.settings.Setting.Property;
-import org.elasticsearch.common.settings.SettingUpgrader;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.settings.SettingsModule;
-import org.elasticsearch.common.transport.BoundTransportAddress;
-import org.elasticsearch.common.transport.TransportAddress;
-import org.elasticsearch.common.unit.TimeValue;
-import org.elasticsearch.common.util.BigArrays;
-import org.elasticsearch.common.util.PageCacheRecycler;
-import org.elasticsearch.common.xcontent.NamedXContentRegistry;
-import org.elasticsearch.core.internal.io.IOUtils;
-import org.elasticsearch.discovery.Discovery;
-import org.elasticsearch.discovery.DiscoveryModule;
-import org.elasticsearch.discovery.DiscoverySettings;
-import org.elasticsearch.env.Environment;
-import org.elasticsearch.env.NodeEnvironment;
-import org.elasticsearch.env.NodeMetadata;
-import org.elasticsearch.gateway.GatewayAllocator;
-import org.elasticsearch.gateway.GatewayMetaState;
-import org.elasticsearch.gateway.GatewayModule;
-import org.elasticsearch.gateway.GatewayService;
-import org.elasticsearch.gateway.MetaStateService;
-import org.elasticsearch.gateway.PersistedClusterStateService;
-import org.elasticsearch.http.HttpServerTransport;
-import org.elasticsearch.index.IndexSettings;
-import org.elasticsearch.index.analysis.AnalysisRegistry;
-import org.elasticsearch.index.engine.EngineFactory;
-import org.elasticsearch.indices.IndicesModule;
-import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.indices.ShardLimitValidator;
-import org.elasticsearch.indices.SystemIndexDescriptor;
-import org.elasticsearch.indices.SystemIndices;
-import org.elasticsearch.indices.analysis.AnalysisModule;
-import org.elasticsearch.indices.breaker.BreakerSettings;
-import org.elasticsearch.indices.breaker.CircuitBreakerService;
-import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService;
-import org.elasticsearch.indices.breaker.NoneCircuitBreakerService;
-import org.elasticsearch.indices.cluster.IndicesClusterStateService;
-import org.elasticsearch.indices.recovery.PeerRecoverySourceService;
-import org.elasticsearch.indices.recovery.PeerRecoveryTargetService;
-import org.elasticsearch.indices.recovery.RecoverySettings;
-import org.elasticsearch.indices.store.IndicesStore;
-import org.elasticsearch.ingest.IngestService;
-import org.elasticsearch.monitor.MonitorService;
-import org.elasticsearch.monitor.fs.FsHealthService;
-import org.elasticsearch.monitor.jvm.JvmInfo;
-import org.elasticsearch.persistent.PersistentTasksClusterService;
-import org.elasticsearch.persistent.PersistentTasksExecutor;
-import org.elasticsearch.persistent.PersistentTasksExecutorRegistry;
-import org.elasticsearch.persistent.PersistentTasksService;
-import org.elasticsearch.plugins.ActionPlugin;
-import org.elasticsearch.plugins.AnalysisPlugin;
-import org.elasticsearch.plugins.CircuitBreakerPlugin;
-import org.elasticsearch.plugins.ClusterPlugin;
-import org.elasticsearch.plugins.DiscoveryPlugin;
-import org.elasticsearch.plugins.EnginePlugin;
-import org.elasticsearch.plugins.IndexStorePlugin;
-import org.elasticsearch.plugins.IngestPlugin;
-import org.elasticsearch.plugins.MapperPlugin;
-import org.elasticsearch.plugins.MetadataUpgrader;
-import org.elasticsearch.plugins.NetworkPlugin;
-import org.elasticsearch.plugins.PersistentTaskPlugin;
-import org.elasticsearch.plugins.Plugin;
-import org.elasticsearch.plugins.PluginsService;
-import org.elasticsearch.plugins.RepositoryPlugin;
-import org.elasticsearch.plugins.ScriptPlugin;
-import org.elasticsearch.plugins.SearchPlugin;
-import org.elasticsearch.plugins.SystemIndexPlugin;
-import org.elasticsearch.repositories.RepositoriesModule;
-import org.elasticsearch.repositories.RepositoriesService;
+import org.opensearch.index.IndexingPressure;
+import org.opensearch.action.search.SearchExecutionStatsCollector;
+import org.opensearch.action.search.SearchPhaseController;
+import org.opensearch.action.search.SearchTransportService;
+import org.opensearch.action.support.TransportAction;
+import org.opensearch.action.update.UpdateHelper;
+import org.opensearch.bootstrap.BootstrapCheck;
+import org.opensearch.bootstrap.BootstrapContext;
+import org.opensearch.client.Client;
+import org.opensearch.client.node.NodeClient;
+import org.opensearch.cluster.ClusterInfoService;
+import org.opensearch.cluster.ClusterModule;
+import org.opensearch.cluster.ClusterName;
+import org.opensearch.cluster.ClusterState;
+import org.opensearch.cluster.ClusterStateObserver;
+import org.opensearch.cluster.InternalClusterInfoService;
+import org.opensearch.cluster.NodeConnectionsService;
+import org.opensearch.cluster.action.index.MappingUpdatedAction;
+import org.opensearch.cluster.metadata.AliasValidator;
+import org.opensearch.cluster.metadata.IndexTemplateMetadata;
+import org.opensearch.cluster.metadata.Metadata;
+import org.opensearch.cluster.metadata.MetadataCreateDataStreamService;
+import org.opensearch.cluster.metadata.MetadataCreateIndexService;
+import org.opensearch.cluster.metadata.MetadataIndexUpgradeService;
+import org.opensearch.cluster.metadata.SystemIndexMetadataUpgradeService;
+import org.opensearch.cluster.metadata.TemplateUpgradeService;
+import org.opensearch.cluster.node.DiscoveryNode;
+import org.opensearch.cluster.node.DiscoveryNodeRole;
+import org.opensearch.cluster.routing.BatchedRerouteService;
+import org.opensearch.cluster.routing.RerouteService;
+import org.opensearch.cluster.routing.allocation.DiskThresholdMonitor;
+import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.common.StopWatch;
+import org.opensearch.common.breaker.CircuitBreaker;
+import org.opensearch.common.component.Lifecycle;
+import org.opensearch.common.component.LifecycleComponent;
+import org.opensearch.common.inject.Injector;
+import org.opensearch.common.inject.Key;
+import org.opensearch.common.inject.Module;
+import org.opensearch.common.inject.ModulesBuilder;
+import org.opensearch.common.io.stream.NamedWriteableRegistry;
+import org.opensearch.common.lease.Releasables;
+import org.opensearch.common.logging.DeprecationLogger;
+import org.opensearch.common.logging.HeaderWarning;
+import org.opensearch.common.logging.NodeAndClusterIdStateListener;
+import org.opensearch.common.network.NetworkAddress;
+import org.opensearch.common.network.NetworkModule;
+import org.opensearch.common.network.NetworkService;
+import org.opensearch.common.settings.ClusterSettings;
+import org.opensearch.common.settings.ConsistentSettingsService;
+import org.opensearch.common.settings.Setting;
+import org.opensearch.common.settings.Setting.Property;
+import org.opensearch.common.settings.SettingUpgrader;
+import org.opensearch.common.settings.Settings;
+import org.opensearch.common.settings.SettingsModule;
+import org.opensearch.common.transport.BoundTransportAddress;
+import org.opensearch.common.transport.TransportAddress;
+import org.opensearch.common.unit.TimeValue;
+import org.opensearch.common.util.BigArrays;
+import org.opensearch.common.util.PageCacheRecycler;
+import org.opensearch.common.xcontent.NamedXContentRegistry;
+import org.opensearch.core.internal.io.IOUtils;
+import org.opensearch.discovery.Discovery;
+import org.opensearch.discovery.DiscoveryModule;
+import org.opensearch.discovery.DiscoverySettings;
+import org.opensearch.env.Environment;
+import org.opensearch.env.NodeEnvironment;
+import org.opensearch.env.NodeMetadata;
+import org.opensearch.gateway.GatewayAllocator;
+import org.opensearch.gateway.GatewayMetaState;
+import org.opensearch.gateway.GatewayModule;
+import org.opensearch.gateway.GatewayService;
+import org.opensearch.gateway.MetaStateService;
+import org.opensearch.gateway.PersistedClusterStateService;
+import org.opensearch.http.HttpServerTransport;
+import org.opensearch.index.IndexSettings;
+import org.opensearch.index.analysis.AnalysisRegistry;
+import org.opensearch.index.engine.EngineFactory;
+import org.opensearch.indices.IndicesModule;
+import org.opensearch.indices.IndicesService;
+import org.opensearch.indices.ShardLimitValidator;
+import org.opensearch.indices.SystemIndexDescriptor;
+import org.opensearch.indices.SystemIndices;
+import org.opensearch.indices.analysis.AnalysisModule;
+import org.opensearch.indices.breaker.BreakerSettings;
+import org.opensearch.indices.breaker.CircuitBreakerService;
+import org.opensearch.indices.breaker.HierarchyCircuitBreakerService;
+import org.opensearch.indices.breaker.NoneCircuitBreakerService;
+import org.opensearch.indices.cluster.IndicesClusterStateService;
+import org.opensearch.indices.recovery.PeerRecoverySourceService;
+import org.opensearch.indices.recovery.PeerRecoveryTargetService;
+import org.opensearch.indices.recovery.RecoverySettings;
+import org.opensearch.indices.store.IndicesStore;
+import org.opensearch.ingest.IngestService;
+import org.opensearch.monitor.MonitorService;
+import org.opensearch.monitor.fs.FsHealthService;
+import org.opensearch.monitor.jvm.JvmInfo;
+import org.opensearch.persistent.PersistentTasksClusterService;
+import org.opensearch.persistent.PersistentTasksExecutor;
+import org.opensearch.persistent.PersistentTasksExecutorRegistry;
+import org.opensearch.persistent.PersistentTasksService;
+import org.opensearch.plugins.ActionPlugin;
+import org.opensearch.plugins.AnalysisPlugin;
+import org.opensearch.plugins.CircuitBreakerPlugin;
+import org.opensearch.plugins.ClusterPlugin;
+import org.opensearch.plugins.DiscoveryPlugin;
+import org.opensearch.plugins.EnginePlugin;
+import org.opensearch.plugins.IndexStorePlugin;
+import org.opensearch.plugins.IngestPlugin;
+import org.opensearch.plugins.MapperPlugin;
+import org.opensearch.plugins.MetadataUpgrader;
+import org.opensearch.plugins.NetworkPlugin;
+import org.opensearch.plugins.PersistentTaskPlugin;
+import org.opensearch.plugins.Plugin;
+import org.opensearch.plugins.PluginsService;
+import org.opensearch.plugins.RepositoryPlugin;
+import org.opensearch.plugins.ScriptPlugin;
+import org.opensearch.plugins.SearchPlugin;
+import org.opensearch.plugins.SystemIndexPlugin;
+import org.opensearch.repositories.RepositoriesModule;
+import org.opensearch.repositories.RepositoriesService;
 import org.opensearch.rest.RestController;
-import org.elasticsearch.script.ScriptContext;
-import org.elasticsearch.script.ScriptEngine;
-import org.elasticsearch.script.ScriptModule;
-import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.search.SearchModule;
-import org.elasticsearch.search.SearchService;
-import org.elasticsearch.search.aggregations.support.AggregationUsageService;
-import org.elasticsearch.search.fetch.FetchPhase;
+import org.opensearch.script.ScriptContext;
+import org.opensearch.script.ScriptEngine;
+import org.opensearch.script.ScriptModule;
+import org.opensearch.script.ScriptService;
+import org.opensearch.search.SearchModule;
+import org.opensearch.search.SearchService;
+import org.opensearch.search.aggregations.support.AggregationUsageService;
+import org.opensearch.search.fetch.FetchPhase;
 import org.opensearch.snapshots.InternalSnapshotsInfoService;
 import org.opensearch.snapshots.RestoreService;
 import org.opensearch.snapshots.SnapshotShardsService;
@@ -171,12 +171,12 @@ import org.opensearch.tasks.TaskCancellationService;
 import org.opensearch.tasks.TaskResultsService;
 import org.opensearch.threadpool.ExecutorBuilder;
 import org.opensearch.threadpool.ThreadPool;
-import org.elasticsearch.transport.RemoteClusterService;
-import org.elasticsearch.transport.Transport;
-import org.elasticsearch.transport.TransportInterceptor;
-import org.elasticsearch.transport.TransportService;
-import org.elasticsearch.usage.UsageService;
-import org.elasticsearch.watcher.ResourceWatcherService;
+import org.opensearch.transport.RemoteClusterService;
+import org.opensearch.transport.Transport;
+import org.opensearch.transport.TransportInterceptor;
+import org.opensearch.transport.TransportService;
+import org.opensearch.usage.UsageService;
+import org.opensearch.watcher.ResourceWatcherService;
 
 import javax.net.ssl.SNIHostName;
 import java.io.BufferedWriter;
@@ -1178,7 +1178,7 @@ public class Node implements Closeable {
         return service;
     }
 
-    /** Constructs a {@link org.elasticsearch.http.HttpServerTransport} which may be mocked for tests. */
+    /** Constructs a {@link org.opensearch.http.HttpServerTransport} which may be mocked for tests. */
     protected HttpServerTransport newHttpTransport(NetworkModule networkModule) {
         return networkModule.getHttpServerTransportSupplier().get();
     }
diff --git a/server/src/main/java/org/elasticsearch/node/NodeClosedException.java b/server/src/main/java/org/opensearch/node/NodeClosedException.java
similarity index 85%
rename from server/src/main/java/org/elasticsearch/node/NodeClosedException.java
rename to server/src/main/java/org/opensearch/node/NodeClosedException.java
index 6404857261f..092bca345ef 100644
--- a/server/src/main/java/org/elasticsearch/node/NodeClosedException.java
+++ b/server/src/main/java/org/opensearch/node/NodeClosedException.java
@@ -17,11 +17,11 @@
  * under the License.
  */
 
-package org.elasticsearch.node;
+package org.opensearch.node;
 
-import org.elasticsearch.OpenSearchException;
-import org.elasticsearch.cluster.node.DiscoveryNode;
-import org.elasticsearch.common.io.stream.StreamInput;
+import org.opensearch.OpenSearchException;
+import org.opensearch.cluster.node.DiscoveryNode;
+import org.opensearch.common.io.stream.StreamInput;
 
 import java.io.IOException;
 
diff --git a/server/src/main/java/org/elasticsearch/node/NodeRoleSettings.java b/server/src/main/java/org/opensearch/node/NodeRoleSettings.java
similarity index 84%
rename from server/src/main/java/org/elasticsearch/node/NodeRoleSettings.java
rename to server/src/main/java/org/opensearch/node/NodeRoleSettings.java
index f0af84772a6..8919ce9207d 100644
--- a/server/src/main/java/org/elasticsearch/node/NodeRoleSettings.java
+++ b/server/src/main/java/org/opensearch/node/NodeRoleSettings.java
@@ -17,12 +17,12 @@
  * under the License.
  */
 
-package org.elasticsearch.node;
+package org.opensearch.node;
 
-import org.elasticsearch.cluster.node.DiscoveryNode;
-import org.elasticsearch.cluster.node.DiscoveryNodeRole;
-import org.elasticsearch.common.settings.Setting;
-import org.elasticsearch.common.settings.Setting.Property;
+import org.opensearch.cluster.node.DiscoveryNode;
+import org.opensearch.cluster.node.DiscoveryNodeRole;
+import org.opensearch.common.settings.Setting;
+import org.opensearch.common.settings.Setting.Property;
 
 import java.util.List;
 import java.util.stream.Collectors;
diff --git a/server/src/main/java/org/elasticsearch/node/NodeService.java b/server/src/main/java/org/opensearch/node/NodeService.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/node/NodeService.java
rename to server/src/main/java/org/opensearch/node/NodeService.java
index c049dc7418e..fbf647467eb 100644
--- a/server/src/main/java/org/elasticsearch/node/NodeService.java
+++ b/server/src/main/java/org/opensearch/node/NodeService.java
@@ -17,31 +17,31 @@
  * under the License.
  */
 
-package org.elasticsearch.node;
+package org.opensearch.node;
 
-import org.elasticsearch.index.IndexingPressure;
-import org.elasticsearch.core.internal.io.IOUtils;
-import org.elasticsearch.Build;
-import org.elasticsearch.Version;
+import org.opensearch.index.IndexingPressure;
+import org.opensearch.core.internal.io.IOUtils;
+import org.opensearch.Build;
+import org.opensearch.Version;
 import org.opensearch.action.admin.cluster.node.info.NodeInfo;
 import org.opensearch.action.admin.cluster.node.stats.NodeStats;
 import org.opensearch.action.admin.indices.stats.CommonStatsFlags;
-import org.elasticsearch.action.search.SearchTransportService;
-import org.elasticsearch.cluster.service.ClusterService;
-import org.elasticsearch.common.Nullable;
-import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.common.settings.SettingsFilter;
-import org.elasticsearch.discovery.Discovery;
-import org.elasticsearch.http.HttpServerTransport;
-import org.elasticsearch.indices.IndicesService;
-import org.elasticsearch.indices.breaker.CircuitBreakerService;
-import org.elasticsearch.ingest.IngestService;
-import org.elasticsearch.monitor.MonitorService;
-import org.elasticsearch.plugins.PluginsService;
-import org.elasticsearch.script.ScriptService;
-import org.elasticsearch.search.aggregations.support.AggregationUsageService;
+import org.opensearch.action.search.SearchTransportService;
+import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.common.Nullable;
+import org.opensearch.common.settings.Settings;
+import org.opensearch.common.settings.SettingsFilter;
+import org.opensearch.discovery.Discovery;
+import org.opensearch.http.HttpServerTransport;
+import org.opensearch.indices.IndicesService;
+import org.opensearch.indices.breaker.CircuitBreakerService;
+import org.opensearch.ingest.IngestService;
+import org.opensearch.monitor.MonitorService;
+import org.opensearch.plugins.PluginsService;
+import org.opensearch.script.ScriptService;
+import org.opensearch.search.aggregations.support.AggregationUsageService;
 import org.opensearch.threadpool.ThreadPool;
-import org.elasticsearch.transport.TransportService;
+import org.opensearch.transport.TransportService;
 
 import java.io.Closeable;
 import java.io.IOException;
diff --git a/server/src/main/java/org/elasticsearch/node/NodeValidationException.java b/server/src/main/java/org/opensearch/node/NodeValidationException.java
similarity index 86%
rename from server/src/main/java/org/elasticsearch/node/NodeValidationException.java
rename to server/src/main/java/org/opensearch/node/NodeValidationException.java
index 913a43223e2..b319abc6438 100644
--- a/server/src/main/java/org/elasticsearch/node/NodeValidationException.java
+++ b/server/src/main/java/org/opensearch/node/NodeValidationException.java
@@ -17,16 +17,16 @@
  * under the License.
  */
 
-package org.elasticsearch.node;
+package org.opensearch.node;
 
-import org.elasticsearch.common.transport.BoundTransportAddress;
+import org.opensearch.common.transport.BoundTransportAddress;
 
 import java.util.List;
 
 /**
  * An exception thrown during node validation. Node validation runs immediately before a node
  * begins accepting network requests in
- * {@link Node#validateNodeBeforeAcceptingRequests(org.elasticsearch.bootstrap.BootstrapContext, BoundTransportAddress, List)}.
+ * {@link Node#validateNodeBeforeAcceptingRequests(org.opensearch.bootstrap.BootstrapContext, BoundTransportAddress, List)}.
  * This exception is a checked exception that is declared as thrown from this method for the purpose of bubbling up to the user.
  */
 public class NodeValidationException extends Exception {
diff --git a/server/src/main/java/org/elasticsearch/node/ReportingService.java b/server/src/main/java/org/opensearch/node/ReportingService.java
similarity index 87%
rename from server/src/main/java/org/elasticsearch/node/ReportingService.java
rename to server/src/main/java/org/opensearch/node/ReportingService.java
index 219d7c7f74b..301f673d566 100644
--- a/server/src/main/java/org/elasticsearch/node/ReportingService.java
+++ b/server/src/main/java/org/opensearch/node/ReportingService.java
@@ -17,10 +17,10 @@
  * under the License.
  */
 
-package org.elasticsearch.node;
+package org.opensearch.node;
 
-import org.elasticsearch.common.io.stream.Writeable;
-import org.elasticsearch.common.xcontent.ToXContent;
+import org.opensearch.common.io.stream.Writeable;
+import org.opensearch.common.xcontent.ToXContent;
 
 public interface ReportingService {
     I info();
diff --git a/server/src/main/java/org/elasticsearch/node/ResponseCollectorService.java b/server/src/main/java/org/opensearch/node/ResponseCollectorService.java
similarity index 94%
rename from server/src/main/java/org/elasticsearch/node/ResponseCollectorService.java
rename to server/src/main/java/org/opensearch/node/ResponseCollectorService.java
index 4f9ec9488b4..eec72f05564 100644
--- a/server/src/main/java/org/elasticsearch/node/ResponseCollectorService.java
+++ b/server/src/main/java/org/opensearch/node/ResponseCollectorService.java
@@ -17,17 +17,17 @@
  * under the License.
  */
 
-package org.elasticsearch.node;
+package org.opensearch.node;
 
-import org.elasticsearch.cluster.ClusterChangedEvent;
-import org.elasticsearch.cluster.ClusterStateListener;
-import org.elasticsearch.cluster.node.DiscoveryNode;
-import org.elasticsearch.cluster.service.ClusterService;
-import org.elasticsearch.common.ExponentiallyWeightedMovingAverage;
-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.util.concurrent.ConcurrentCollections;
+import org.opensearch.cluster.ClusterChangedEvent;
+import org.opensearch.cluster.ClusterStateListener;
+import org.opensearch.cluster.node.DiscoveryNode;
+import org.opensearch.cluster.service.ClusterService;
+import org.opensearch.common.ExponentiallyWeightedMovingAverage;
+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.util.concurrent.ConcurrentCollections;
 
 import java.io.IOException;
 import java.util.HashMap;
diff --git a/server/src/main/java/org/elasticsearch/node/package-info.java b/server/src/main/java/org/opensearch/node/package-info.java
similarity index 89%
rename from server/src/main/java/org/elasticsearch/node/package-info.java
rename to server/src/main/java/org/opensearch/node/package-info.java
index 02538cda4f8..c8c22cdbd42 100644
--- a/server/src/main/java/org/elasticsearch/node/package-info.java
+++ b/server/src/main/java/org/opensearch/node/package-info.java
@@ -18,7 +18,7 @@
  */
 
 /**
- * Allow to build a {@link org.elasticsearch.node.Node} which is a
+ * Allow to build a {@link org.opensearch.node.Node} which is a
  * node within the cluster.
  */
-package org.elasticsearch.node;
+package org.opensearch.node;