Refactor ingest, monitor and node under server folder (#273)

Signed-off-by: Harold Wang <harowang@amazon.com>
This commit is contained in:
Harold Wang 2021-03-11 10:09:06 -08:00 committed by Nick Knize
parent bbe308a46e
commit 49d2eeae53
55 changed files with 546 additions and 545 deletions

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
/** /**
* An Abstract Processor that holds tag and description information * An Abstract Processor that holds tag and description information

View File

@ -17,10 +17,10 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.OpenSearchException; import org.opensearch.OpenSearchException;
import org.elasticsearch.common.collect.Tuple; import org.opensearch.common.collect.Tuple;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

View File

@ -17,15 +17,15 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.common.logging.DeprecationLogger; import org.opensearch.common.logging.DeprecationLogger;
import org.elasticsearch.script.DynamicMap; import org.opensearch.script.DynamicMap;
import org.elasticsearch.script.IngestConditionalScript; import org.opensearch.script.IngestConditionalScript;
import org.elasticsearch.script.Script; import org.opensearch.script.Script;
import org.elasticsearch.script.ScriptException; import org.opensearch.script.ScriptException;
import org.elasticsearch.script.ScriptService; import org.opensearch.script.ScriptService;
import org.elasticsearch.script.ScriptType; import org.opensearch.script.ScriptType;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -42,12 +42,12 @@ import java.util.function.Function;
import java.util.function.LongSupplier; import java.util.function.LongSupplier;
import java.util.stream.Collectors; 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 { public class ConditionalProcessor extends AbstractProcessor implements WrappingProcessor {
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(DynamicMap.class); private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(DynamicMap.class);
private static final Map<String, Function<Object, Object>> FUNCTIONS = org.elasticsearch.common.collect.Map.of( private static final Map<String, Function<Object, Object>> FUNCTIONS = org.opensearch.common.collect.Map.of(
"_type", value -> { "_type", value -> {
deprecationLogger.deprecate("conditional-processor__type", deprecationLogger.deprecate("conditional-processor__type",
"[types removal] Looking up doc types [_type] in scripts is deprecated."); "[types removal] Looking up doc types [_type] in scripts is deprecated.");

View File

@ -17,24 +17,24 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import org.elasticsearch.ExceptionsHelper; import org.opensearch.ExceptionsHelper;
import org.elasticsearch.OpenSearchException; import org.opensearch.OpenSearchException;
import org.elasticsearch.OpenSearchParseException; import org.opensearch.OpenSearchParseException;
import org.elasticsearch.common.bytes.BytesReference; import org.opensearch.common.bytes.BytesReference;
import org.elasticsearch.common.xcontent.LoggingDeprecationHandler; import org.opensearch.common.xcontent.LoggingDeprecationHandler;
import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.opensearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser; import org.opensearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType; import org.opensearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.json.JsonXContent; import org.opensearch.common.xcontent.json.JsonXContent;
import org.elasticsearch.script.Script; import org.opensearch.script.Script;
import org.elasticsearch.script.ScriptService; import org.opensearch.script.ScriptService;
import org.elasticsearch.script.ScriptType; import org.opensearch.script.ScriptType;
import org.elasticsearch.script.TemplateScript; import org.opensearch.script.TemplateScript;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -43,7 +43,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; 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 { public final class ConfigurationUtils {

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import java.util.Map; import java.util.Map;

View File

@ -17,17 +17,17 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.common.Strings; import org.opensearch.common.Strings;
import org.elasticsearch.index.VersionType; import org.opensearch.index.VersionType;
import org.elasticsearch.index.mapper.IdFieldMapper; import org.opensearch.index.mapper.IdFieldMapper;
import org.elasticsearch.index.mapper.IndexFieldMapper; import org.opensearch.index.mapper.IndexFieldMapper;
import org.elasticsearch.index.mapper.RoutingFieldMapper; import org.opensearch.index.mapper.RoutingFieldMapper;
import org.elasticsearch.index.mapper.SourceFieldMapper; import org.opensearch.index.mapper.SourceFieldMapper;
import org.elasticsearch.index.mapper.TypeFieldMapper; import org.opensearch.index.mapper.TypeFieldMapper;
import org.elasticsearch.index.mapper.VersionFieldMapper; import org.opensearch.index.mapper.VersionFieldMapper;
import org.elasticsearch.script.TemplateScript; import org.opensearch.script.TemplateScript;
import java.time.ZoneOffset; import java.time.ZoneOffset;
import java.time.ZonedDateTime; 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 * 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. * init time, which makes equality comparisons impossible in tests.
*/ */

View File

@ -17,12 +17,12 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import org.elasticsearch.node.ReportingService; import org.opensearch.node.ReportingService;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;

View File

@ -17,19 +17,19 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.elasticsearch.cluster.Diff; import org.opensearch.cluster.Diff;
import org.elasticsearch.cluster.DiffableUtils; import org.opensearch.cluster.DiffableUtils;
import org.elasticsearch.cluster.NamedDiff; import org.opensearch.cluster.NamedDiff;
import org.elasticsearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.elasticsearch.common.ParseField; import org.opensearch.common.ParseField;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.ObjectParser; import org.opensearch.common.xcontent.ObjectParser;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser; import org.opensearch.common.xcontent.XContentParser;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -17,10 +17,10 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.common.metrics.CounterMetric; import org.opensearch.common.metrics.CounterMetric;
import org.elasticsearch.common.metrics.MeanMetric; import org.opensearch.common.metrics.MeanMetric;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;

View File

@ -17,11 +17,11 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.OpenSearchException; import org.opensearch.OpenSearchException;
import org.elasticsearch.OpenSearchWrapperException; import org.opensearch.OpenSearchWrapperException;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import java.io.IOException; import java.io.IOException;

View File

@ -17,47 +17,47 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.message.ParameterizedMessage;
import org.elasticsearch.OpenSearchParseException; import org.opensearch.OpenSearchParseException;
import org.elasticsearch.ExceptionsHelper; import org.opensearch.ExceptionsHelper;
import org.elasticsearch.ResourceNotFoundException; import org.opensearch.ResourceNotFoundException;
import org.opensearch.action.ActionListener; import org.opensearch.action.ActionListener;
import org.opensearch.action.DocWriteRequest; import org.opensearch.action.DocWriteRequest;
import org.opensearch.action.bulk.TransportBulkAction; import org.opensearch.action.bulk.TransportBulkAction;
import org.elasticsearch.action.index.IndexRequest; import org.opensearch.action.index.IndexRequest;
import org.elasticsearch.action.ingest.DeletePipelineRequest; import org.opensearch.action.ingest.DeletePipelineRequest;
import org.elasticsearch.action.ingest.PutPipelineRequest; import org.opensearch.action.ingest.PutPipelineRequest;
import org.elasticsearch.action.support.master.AcknowledgedResponse; import org.opensearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.Client; import org.opensearch.client.Client;
import org.elasticsearch.cluster.AckedClusterStateUpdateTask; import org.opensearch.cluster.AckedClusterStateUpdateTask;
import org.elasticsearch.cluster.ClusterChangedEvent; import org.opensearch.cluster.ClusterChangedEvent;
import org.elasticsearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateApplier; import org.opensearch.cluster.ClusterStateApplier;
import org.elasticsearch.cluster.metadata.IndexAbstraction; import org.opensearch.cluster.metadata.IndexAbstraction;
import org.elasticsearch.cluster.metadata.IndexMetadata; import org.opensearch.cluster.metadata.IndexMetadata;
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata; import org.opensearch.cluster.metadata.IndexTemplateMetadata;
import org.elasticsearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.metadata.MetadataIndexTemplateService; import org.opensearch.cluster.metadata.MetadataIndexTemplateService;
import org.elasticsearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.service.ClusterService; import org.opensearch.cluster.service.ClusterService;
import org.elasticsearch.common.collect.Tuple; import org.opensearch.common.collect.Tuple;
import org.elasticsearch.common.regex.Regex; import org.opensearch.common.regex.Regex;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.util.concurrent.AbstractRunnable; import org.opensearch.common.util.concurrent.AbstractRunnable;
import org.elasticsearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.XContentHelper;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.elasticsearch.gateway.GatewayService; import org.opensearch.gateway.GatewayService;
import org.elasticsearch.index.IndexSettings; import org.opensearch.index.IndexSettings;
import org.elasticsearch.index.VersionType; import org.opensearch.index.VersionType;
import org.elasticsearch.index.analysis.AnalysisRegistry; import org.opensearch.index.analysis.AnalysisRegistry;
import org.elasticsearch.node.ReportingService; import org.opensearch.node.ReportingService;
import org.elasticsearch.plugins.IngestPlugin; import org.opensearch.plugins.IngestPlugin;
import org.elasticsearch.script.ScriptService; import org.opensearch.script.ScriptService;
import org.opensearch.threadpool.ThreadPool; import org.opensearch.threadpool.ThreadPool;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -17,15 +17,15 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.ToXContentFragment; import org.opensearch.common.xcontent.ToXContentFragment;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -17,10 +17,10 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.OpenSearchParseException; import org.opensearch.OpenSearchParseException;
import org.elasticsearch.common.Nullable; import org.opensearch.common.Nullable;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
@ -30,7 +30,7 @@ import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import java.util.function.LongSupplier; 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. * A pipeline is a list of {@link Processor} instances grouped under a unique id.

View File

@ -17,21 +17,21 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.cluster.AbstractDiffable; import org.opensearch.cluster.AbstractDiffable;
import org.elasticsearch.cluster.Diff; import org.opensearch.cluster.Diff;
import org.elasticsearch.common.ParseField; import org.opensearch.common.ParseField;
import org.elasticsearch.common.Strings; import org.opensearch.common.Strings;
import org.elasticsearch.common.bytes.BytesReference; import org.opensearch.common.bytes.BytesReference;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.xcontent.ContextParser; import org.opensearch.common.xcontent.ContextParser;
import org.elasticsearch.common.xcontent.ObjectParser; import org.opensearch.common.xcontent.ObjectParser;
import org.elasticsearch.common.xcontent.ToXContentObject; import org.opensearch.common.xcontent.ToXContentObject;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentHelper; import org.opensearch.common.xcontent.XContentHelper;
import org.elasticsearch.common.xcontent.XContentType; import org.opensearch.common.xcontent.XContentType;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;

View File

@ -17,9 +17,9 @@
* under the License. * 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.Map;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;

View File

@ -17,13 +17,13 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.client.Client; import org.opensearch.client.Client;
import org.elasticsearch.common.util.concurrent.ThreadContext; import org.opensearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.elasticsearch.index.analysis.AnalysisRegistry; import org.opensearch.index.analysis.AnalysisRegistry;
import org.elasticsearch.script.ScriptService; import org.opensearch.script.ScriptService;
import org.opensearch.threadpool.Scheduler; import org.opensearch.threadpool.Scheduler;
import java.util.Map; 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 * 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 { class Parameters {
@ -120,7 +120,7 @@ public interface Processor {
public final AnalysisRegistry analysisRegistry; 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. * instances that have run prior to in ingest.
*/ */
public final ThreadContext threadContext; public final ThreadContext threadContext;

View File

@ -17,14 +17,14 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.xcontent.ToXContent.Params; import org.opensearch.common.xcontent.ToXContent.Params;
import org.elasticsearch.common.xcontent.ToXContentObject; import org.opensearch.common.xcontent.ToXContentObject;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import java.io.IOException; import java.io.IOException;

View File

@ -17,17 +17,17 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.OpenSearchException; import org.opensearch.OpenSearchException;
import org.elasticsearch.action.ingest.SimulateProcessorResult; import org.opensearch.action.ingest.SimulateProcessorResult;
import org.elasticsearch.common.collect.Tuple; import org.opensearch.common.collect.Tuple;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.function.BiConsumer; 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. * Processor to be used within Simulate API to keep track of processors executed in pipeline.

View File

@ -17,12 +17,12 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.ingest; package org.opensearch.ingest;
import org.elasticsearch.script.Script; import org.opensearch.script.Script;
import org.elasticsearch.script.ScriptService; import org.opensearch.script.ScriptService;
import org.elasticsearch.script.ScriptType; import org.opensearch.script.ScriptType;
import org.elasticsearch.script.TemplateScript; import org.opensearch.script.TemplateScript;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -32,7 +32,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; 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. * Holds a value. If the value is requested a copy is made and optionally template snippets are resolved too.

View File

@ -17,7 +17,7 @@
* under the License. * 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 * A srapping processor is one that encapsulates an inner processor, or a processor that the wrapped processor enacts upon. All processors

View File

@ -17,16 +17,16 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor; package org.opensearch.monitor;
import org.elasticsearch.common.component.AbstractLifecycleComponent; import org.opensearch.common.component.AbstractLifecycleComponent;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.env.NodeEnvironment; import org.opensearch.env.NodeEnvironment;
import org.elasticsearch.monitor.fs.FsService; import org.opensearch.monitor.fs.FsService;
import org.elasticsearch.monitor.jvm.JvmGcMonitorService; import org.opensearch.monitor.jvm.JvmGcMonitorService;
import org.elasticsearch.monitor.jvm.JvmService; import org.opensearch.monitor.jvm.JvmService;
import org.elasticsearch.monitor.os.OsService; import org.opensearch.monitor.os.OsService;
import org.elasticsearch.monitor.process.ProcessService; import org.opensearch.monitor.process.ProcessService;
import org.opensearch.threadpool.ThreadPool; import org.opensearch.threadpool.ThreadPool;
import java.io.IOException; import java.io.IOException;

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor; package org.opensearch.monitor;
@FunctionalInterface @FunctionalInterface
public interface NodeHealthService { public interface NodeHealthService {

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor; package org.opensearch.monitor;
import java.lang.management.OperatingSystemMXBean; import java.lang.management.OperatingSystemMXBean;
import java.lang.reflect.Method; import java.lang.reflect.Method;

View File

@ -17,7 +17,7 @@
* under the License. * 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 * Class that represents the Health status for a node as determined by {@link NodeHealthService} and provides additional

View File

@ -17,22 +17,23 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.fs; package org.opensearch.monitor.fs;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.message.ParameterizedMessage;
import org.elasticsearch.common.Nullable;
import org.elasticsearch.common.UUIDs; import org.opensearch.common.Nullable;
import org.elasticsearch.common.component.AbstractLifecycleComponent; import org.opensearch.common.UUIDs;
import org.elasticsearch.common.settings.ClusterSettings; import org.opensearch.common.component.AbstractLifecycleComponent;
import org.elasticsearch.common.settings.Setting; import org.opensearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Setting;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.settings.Settings;
import org.elasticsearch.core.internal.io.IOUtils; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.env.NodeEnvironment; import org.opensearch.core.internal.io.IOUtils;
import org.elasticsearch.monitor.NodeHealthService; import org.opensearch.env.NodeEnvironment;
import org.elasticsearch.monitor.StatusInfo; import org.opensearch.monitor.NodeHealthService;
import org.opensearch.monitor.StatusInfo;
import org.opensearch.threadpool.Scheduler; import org.opensearch.threadpool.Scheduler;
import org.opensearch.threadpool.ThreadPool; import org.opensearch.threadpool.ThreadPool;
@ -46,8 +47,8 @@ import java.util.Set;
import java.util.function.LongSupplier; import java.util.function.LongSupplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.elasticsearch.monitor.StatusInfo.Status.HEALTHY; import static org.opensearch.monitor.StatusInfo.Status.HEALTHY;
import static org.elasticsearch.monitor.StatusInfo.Status.UNHEALTHY; 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 * Runs periodically and attempts to create a temp file to see if the filesystem is writable. If not then it marks the

View File

@ -17,18 +17,18 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.fs; package org.opensearch.monitor.fs;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.elasticsearch.cluster.DiskUsage; import org.opensearch.cluster.DiskUsage;
import org.elasticsearch.common.Nullable; import org.opensearch.common.Nullable;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.xcontent.ToXContentFragment; import org.opensearch.common.xcontent.ToXContentFragment;
import org.elasticsearch.common.xcontent.ToXContentObject; import org.opensearch.common.xcontent.ToXContentObject;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;

View File

@ -17,17 +17,17 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.fs; package org.opensearch.monitor.fs;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.message.ParameterizedMessage;
import org.apache.lucene.util.Constants; import org.apache.lucene.util.Constants;
import org.elasticsearch.common.SuppressForbidden; import org.opensearch.common.SuppressForbidden;
import org.elasticsearch.common.collect.Tuple; import org.opensearch.common.collect.Tuple;
import org.elasticsearch.common.io.PathUtils; import org.opensearch.common.io.PathUtils;
import org.elasticsearch.env.NodeEnvironment; import org.opensearch.env.NodeEnvironment;
import org.elasticsearch.env.NodeEnvironment.NodePath; import org.opensearch.env.NodeEnvironment.NodePath;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;

View File

@ -17,16 +17,16 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.fs; package org.opensearch.monitor.fs;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.settings.Setting; import org.opensearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property; import org.opensearch.common.settings.Setting.Property;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.util.SingleObjectCache; import org.opensearch.common.util.SingleObjectCache;
import org.elasticsearch.env.NodeEnvironment; import org.opensearch.env.NodeEnvironment;
import java.io.IOException; import java.io.IOException;
import java.util.function.Supplier; import java.util.function.Supplier;

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.jvm; package org.opensearch.monitor.jvm;
import java.lang.management.ManagementFactory; import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo; import java.lang.management.ThreadInfo;

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.jvm; package org.opensearch.monitor.jvm;
public class GcNames { public class GcNames {

View File

@ -17,12 +17,12 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.jvm; package org.opensearch.monitor.jvm;
import org.apache.lucene.util.CollectionUtil; import org.apache.lucene.util.CollectionUtil;
import org.elasticsearch.OpenSearchException; import org.opensearch.OpenSearchException;
import org.elasticsearch.common.time.DateFormatter; import org.opensearch.common.time.DateFormatter;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import java.lang.management.ManagementFactory; import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo; import java.lang.management.ThreadInfo;
@ -116,7 +116,7 @@ public class HotThreads {
methodName.equals("run")) { methodName.equals("run")) {
return true; return true;
} }
if (className.equals("org.elasticsearch.indices.ttl.IndicesTTLService$Notifier") && if (className.equals("org.opensearch.indices.ttl.IndicesTTLService$Notifier") &&
methodName.equals("await")) { methodName.equals("await")) {
return true; return true;
} }

View File

@ -17,17 +17,17 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.jvm; package org.opensearch.monitor.jvm;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.component.AbstractLifecycleComponent; import org.opensearch.common.component.AbstractLifecycleComponent;
import org.elasticsearch.common.settings.Setting; import org.opensearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property; import org.opensearch.common.settings.Setting.Property;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.monitor.jvm.JvmStats.GarbageCollector; import org.opensearch.monitor.jvm.JvmStats.GarbageCollector;
import org.opensearch.threadpool.Scheduler.Cancellable; import org.opensearch.threadpool.Scheduler.Cancellable;
import org.opensearch.threadpool.ThreadPool; import org.opensearch.threadpool.ThreadPool;
import org.opensearch.threadpool.ThreadPool.Names; import org.opensearch.threadpool.ThreadPool.Names;

View File

@ -17,19 +17,19 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.jvm; package org.opensearch.monitor.jvm;
import org.apache.lucene.util.Constants; import org.apache.lucene.util.Constants;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.elasticsearch.common.Booleans; import org.opensearch.common.Booleans;
import org.elasticsearch.common.SuppressForbidden; import org.opensearch.common.SuppressForbidden;
import org.elasticsearch.common.io.PathUtils; import org.opensearch.common.io.PathUtils;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import org.elasticsearch.node.ReportingService; import org.opensearch.node.ReportingService;
import java.io.IOException; import java.io.IOException;
import java.lang.management.GarbageCollectorMXBean; import java.lang.management.GarbageCollectorMXBean;

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.jvm; package org.opensearch.monitor.jvm;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.message.ParameterizedMessage; import org.apache.logging.log4j.message.ParameterizedMessage;

View File

@ -17,15 +17,15 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.jvm; package org.opensearch.monitor.jvm;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.settings.Setting; import org.opensearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property; import org.opensearch.common.settings.Setting.Property;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.node.ReportingService; import org.opensearch.node.ReportingService;
public class JvmService implements ReportingService<JvmInfo> { public class JvmService implements ReportingService<JvmInfo> {

View File

@ -17,15 +17,15 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.jvm; package org.opensearch.monitor.jvm;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.ToXContentFragment; import org.opensearch.common.xcontent.ToXContentFragment;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import java.io.IOException; import java.io.IOException;
import java.lang.management.BufferPoolMXBean; import java.lang.management.BufferPoolMXBean;

View File

@ -17,14 +17,14 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.os; package org.opensearch.monitor.os;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import org.elasticsearch.node.ReportingService; import org.opensearch.node.ReportingService;
import java.io.IOException; import java.io.IOException;

View File

@ -17,14 +17,14 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.os; package org.opensearch.monitor.os;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.apache.lucene.util.Constants; import org.apache.lucene.util.Constants;
import org.elasticsearch.common.SuppressForbidden; import org.opensearch.common.SuppressForbidden;
import org.elasticsearch.common.io.PathUtils; import org.opensearch.common.io.PathUtils;
import org.elasticsearch.monitor.Probes; import org.opensearch.monitor.Probes;
import java.io.IOException; import java.io.IOException;
import java.lang.management.ManagementFactory; 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"); 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. * 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} * @throws IOException if an I/O exception occurs reading {@code /proc/self/cgroup}
*/ */
private Map<String, String> getControlGroups() throws IOException { private Map<String, String> getControlGroups() throws IOException {
@ -253,7 +253,7 @@ public class OsProbe {
final Map<String, String> controllerMap = new HashMap<>(); final Map<String, String> controllerMap = new HashMap<>();
for (final String line : lines) { 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 * 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 * 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 * 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 * line in this file represents a control group hierarchy of the form
* <p> * <p>
* {@code \d+:([^:,]+(?:,[^:,]+)?):(/.*)} * {@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. * 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 * @return the total CPU time in nanoseconds
* @throws IOException if an I/O exception occurs reading {@code cpuacct.usage} for the control group * @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. * 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} * @return the line from {@code cpuacct.usage}
* @throws IOException if an I/O exception occurs reading {@code cpuacct.usage} for the control group * @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. * 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 * @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 * @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 * subsystem. This line represents the period of time in microseconds for how frequently the control group's access to CPU resources
* will be reallocated. * 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} * @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 * @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}. * 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 * @return the CFS quota in microseconds
* @throws IOException if an I/O exception occurs reading {@code cpu.cfs_quota_us} for the control group * @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 * 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}. * 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} * @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 * @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 * @return the CPU time statistics
* @throws IOException if an I/O exception occurs reading {@code cpu.stat} for the control group * @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 * subsystem. These lines represent the CPU time statistics and have the form
* <blockquote><pre> * <blockquote><pre>
* nr_periods \d+ * 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 * 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. * 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} * @return the lines from {@code cpu.stat}
* @throws IOException if an I/O exception occurs reading {@code cpu.stat} for the control group * @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 * 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 <code>String</code>. * unsigned 64 bit number, and this will overflow a long, hence the result type is <code>String</code>.
* (The alternative would have been <code>BigInteger</code> but then it would not be possible to index * (The alternative would have been <code>BigInteger</code> but then it would not be possible to index
* the OS stats document into Elasticsearch without losing information, as <code>BigInteger</code> is * the OS stats document into OpenSearch without losing information, as <code>BigInteger</code> is
* not a supported Elasticsearch type.) * 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) * @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 * @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). * {@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} * @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 * @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 * 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 <code>String</code>. * unsigned 64 bit number, and this will overflow a long, hence the result type is <code>String</code>.
* (The alternative would have been <code>BigInteger</code> but then it would not be possible to index * (The alternative would have been <code>BigInteger</code> but then it would not be possible to index
* the OS stats document into Elasticsearch without losing information, as <code>BigInteger</code> is * the OS stats document into OpenSearch without losing information, as <code>BigInteger</code> is
* not a supported Elasticsearch type.) * 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) * @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 * @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). * {@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} * @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 * @throws IOException if an I/O exception occurs reading {@code memory.usage_in_bytes} for the control group
*/ */

View File

@ -17,17 +17,17 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.os; package org.opensearch.monitor.os;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.settings.Setting; import org.opensearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property; import org.opensearch.common.settings.Setting.Property;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.util.SingleObjectCache; import org.opensearch.common.util.SingleObjectCache;
import org.elasticsearch.common.util.concurrent.EsExecutors; import org.opensearch.common.util.concurrent.EsExecutors;
import org.elasticsearch.node.ReportingService; import org.opensearch.node.ReportingService;
import java.io.IOException; import java.io.IOException;

View File

@ -17,17 +17,17 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.os; package org.opensearch.monitor.os;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.xcontent.ToXContentFragment; import org.opensearch.common.xcontent.ToXContentFragment;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
@ -405,8 +405,8 @@ public class OsStats implements Writeable, ToXContentFragment {
* The maximum amount of user memory (including file cache). * The maximum amount of user memory (including file cache).
* This is stored as a <code>String</code> because the value can be too big to fit in a * This is stored as a <code>String</code> because the value can be too big to fit in a
* <code>long</code>. (The alternative would have been <code>BigInteger</code> but then * <code>long</code>. (The alternative would have been <code>BigInteger</code> but then
* it would not be possible to index the OS stats document into Elasticsearch without * it would not be possible to index the OS stats document into OpenSearch without
* losing information, as <code>BigInteger</code> is not a supported Elasticsearch type.) * losing information, as <code>BigInteger</code> is not a supported OpenSearch type.)
* *
* @return the maximum amount of user memory (including file cache). * @return the maximum amount of user memory (including file cache).
*/ */

View File

@ -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. * be logged and graphed.
*/ */
package org.elasticsearch.monitor; package org.opensearch.monitor;

View File

@ -17,13 +17,13 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.process; package org.opensearch.monitor.process;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import org.elasticsearch.node.ReportingService; import org.opensearch.node.ReportingService;
import java.io.IOException; import java.io.IOException;

View File

@ -17,16 +17,16 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.process; package org.opensearch.monitor.process;
import org.elasticsearch.bootstrap.BootstrapInfo; import org.opensearch.bootstrap.BootstrapInfo;
import org.elasticsearch.monitor.Probes; import org.opensearch.monitor.Probes;
import java.lang.management.ManagementFactory; import java.lang.management.ManagementFactory;
import java.lang.management.OperatingSystemMXBean; import java.lang.management.OperatingSystemMXBean;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import static org.elasticsearch.monitor.jvm.JvmInfo.jvmInfo; import static org.opensearch.monitor.jvm.JvmInfo.jvmInfo;
public class ProcessProbe { public class ProcessProbe {

View File

@ -17,16 +17,16 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.process; package org.opensearch.monitor.process;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.elasticsearch.common.settings.Setting; import org.opensearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property; import org.opensearch.common.settings.Setting.Property;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.util.SingleObjectCache; import org.opensearch.common.util.SingleObjectCache;
import org.elasticsearch.node.ReportingService; import org.opensearch.node.ReportingService;
public final class ProcessService implements ReportingService<ProcessInfo> { public final class ProcessService implements ReportingService<ProcessInfo> {

View File

@ -17,16 +17,16 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.monitor.process; package org.opensearch.monitor.process;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.unit.ByteSizeValue; import org.opensearch.common.unit.ByteSizeValue;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.ToXContent.Params; import org.opensearch.common.xcontent.ToXContent.Params;
import org.elasticsearch.common.xcontent.ToXContentFragment; import org.opensearch.common.xcontent.ToXContentFragment;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import java.io.IOException; import java.io.IOException;

View File

@ -17,16 +17,16 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.node; package org.opensearch.node;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.util.set.Sets; import org.opensearch.common.util.set.Sets;
import org.elasticsearch.common.xcontent.ToXContent.Params; import org.opensearch.common.xcontent.ToXContent.Params;
import org.elasticsearch.common.xcontent.ToXContentFragment; import org.opensearch.common.xcontent.ToXContentFragment;
import org.elasticsearch.common.xcontent.XContentBuilder; import org.opensearch.common.xcontent.XContentBuilder;
import java.io.IOException; import java.io.IOException;
import java.util.Locale; import java.util.Locale;

View File

@ -17,7 +17,7 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.node; package org.opensearch.node;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Files; import java.nio.file.Files;
@ -29,12 +29,12 @@ import java.util.Map;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.function.Function; import java.util.function.Function;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.elasticsearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.settings.SettingsException; import org.opensearch.common.settings.SettingsException;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.elasticsearch.node.Node; import org.opensearch.node.Node;
public class InternalSettingsPreparer { public class InternalSettingsPreparer {
@ -43,7 +43,7 @@ public class InternalSettingsPreparer {
/** /**
* Prepares settings for the transport client by gathering all * 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) { public static Settings prepareSettings(Settings input) {
Settings.Builder output = Settings.builder(); 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 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) * @param properties map of properties key/value pairs (usually from the command-line)
@ -68,16 +68,16 @@ public class InternalSettingsPreparer {
initializeSettings(output, input, properties); initializeSettings(output, input, properties);
Environment environment = new Environment(output.build(), configPath); Environment environment = new Environment(output.build(), configPath);
if (Files.exists(environment.configFile().resolve("elasticsearch.yaml"))) { if (Files.exists(environment.configFile().resolve("opensearch.yaml"))) {
throw new SettingsException("elasticsearch.yaml was deprecated in 5.5.0 and must be renamed to elasticsearch.yml"); 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"))) { if (Files.exists(environment.configFile().resolve("opensearch.json"))) {
throw new SettingsException("elasticsearch.json was deprecated in 5.5.0 and must be converted to elasticsearch.yml"); 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 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)) { if (Files.exists(path)) {
try { try {
output.loadFromPath(path); output.loadFromPath(path);

View File

@ -17,150 +17,150 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.node; package org.opensearch.node;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.apache.lucene.util.Constants; import org.apache.lucene.util.Constants;
import org.apache.lucene.util.SetOnce; import org.apache.lucene.util.SetOnce;
import org.elasticsearch.Assertions; import org.opensearch.Assertions;
import org.elasticsearch.Build; import org.opensearch.Build;
import org.elasticsearch.OpenSearchException; import org.opensearch.OpenSearchException;
import org.elasticsearch.OpenSearchTimeoutException; import org.opensearch.OpenSearchTimeoutException;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.opensearch.action.ActionModule; import org.opensearch.action.ActionModule;
import org.opensearch.action.ActionType; import org.opensearch.action.ActionType;
import org.opensearch.action.admin.cluster.snapshots.status.TransportNodesSnapshotsStatus; import org.opensearch.action.admin.cluster.snapshots.status.TransportNodesSnapshotsStatus;
import org.elasticsearch.index.IndexingPressure; import org.opensearch.index.IndexingPressure;
import org.elasticsearch.action.search.SearchExecutionStatsCollector; import org.opensearch.action.search.SearchExecutionStatsCollector;
import org.elasticsearch.action.search.SearchPhaseController; import org.opensearch.action.search.SearchPhaseController;
import org.elasticsearch.action.search.SearchTransportService; import org.opensearch.action.search.SearchTransportService;
import org.elasticsearch.action.support.TransportAction; import org.opensearch.action.support.TransportAction;
import org.elasticsearch.action.update.UpdateHelper; import org.opensearch.action.update.UpdateHelper;
import org.elasticsearch.bootstrap.BootstrapCheck; import org.opensearch.bootstrap.BootstrapCheck;
import org.elasticsearch.bootstrap.BootstrapContext; import org.opensearch.bootstrap.BootstrapContext;
import org.elasticsearch.client.Client; import org.opensearch.client.Client;
import org.elasticsearch.client.node.NodeClient; import org.opensearch.client.node.NodeClient;
import org.elasticsearch.cluster.ClusterInfoService; import org.opensearch.cluster.ClusterInfoService;
import org.elasticsearch.cluster.ClusterModule; import org.opensearch.cluster.ClusterModule;
import org.elasticsearch.cluster.ClusterName; import org.opensearch.cluster.ClusterName;
import org.elasticsearch.cluster.ClusterState; import org.opensearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateObserver; import org.opensearch.cluster.ClusterStateObserver;
import org.elasticsearch.cluster.InternalClusterInfoService; import org.opensearch.cluster.InternalClusterInfoService;
import org.elasticsearch.cluster.NodeConnectionsService; import org.opensearch.cluster.NodeConnectionsService;
import org.elasticsearch.cluster.action.index.MappingUpdatedAction; import org.opensearch.cluster.action.index.MappingUpdatedAction;
import org.elasticsearch.cluster.metadata.AliasValidator; import org.opensearch.cluster.metadata.AliasValidator;
import org.elasticsearch.cluster.metadata.IndexTemplateMetadata; import org.opensearch.cluster.metadata.IndexTemplateMetadata;
import org.elasticsearch.cluster.metadata.Metadata; import org.opensearch.cluster.metadata.Metadata;
import org.elasticsearch.cluster.metadata.MetadataCreateDataStreamService; import org.opensearch.cluster.metadata.MetadataCreateDataStreamService;
import org.elasticsearch.cluster.metadata.MetadataCreateIndexService; import org.opensearch.cluster.metadata.MetadataCreateIndexService;
import org.elasticsearch.cluster.metadata.MetadataIndexUpgradeService; import org.opensearch.cluster.metadata.MetadataIndexUpgradeService;
import org.elasticsearch.cluster.metadata.SystemIndexMetadataUpgradeService; import org.opensearch.cluster.metadata.SystemIndexMetadataUpgradeService;
import org.elasticsearch.cluster.metadata.TemplateUpgradeService; import org.opensearch.cluster.metadata.TemplateUpgradeService;
import org.elasticsearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodeRole;
import org.elasticsearch.cluster.routing.BatchedRerouteService; import org.opensearch.cluster.routing.BatchedRerouteService;
import org.elasticsearch.cluster.routing.RerouteService; import org.opensearch.cluster.routing.RerouteService;
import org.elasticsearch.cluster.routing.allocation.DiskThresholdMonitor; import org.opensearch.cluster.routing.allocation.DiskThresholdMonitor;
import org.elasticsearch.cluster.service.ClusterService; import org.opensearch.cluster.service.ClusterService;
import org.elasticsearch.common.StopWatch; import org.opensearch.common.StopWatch;
import org.elasticsearch.common.breaker.CircuitBreaker; import org.opensearch.common.breaker.CircuitBreaker;
import org.elasticsearch.common.component.Lifecycle; import org.opensearch.common.component.Lifecycle;
import org.elasticsearch.common.component.LifecycleComponent; import org.opensearch.common.component.LifecycleComponent;
import org.elasticsearch.common.inject.Injector; import org.opensearch.common.inject.Injector;
import org.elasticsearch.common.inject.Key; import org.opensearch.common.inject.Key;
import org.elasticsearch.common.inject.Module; import org.opensearch.common.inject.Module;
import org.elasticsearch.common.inject.ModulesBuilder; import org.opensearch.common.inject.ModulesBuilder;
import org.elasticsearch.common.io.stream.NamedWriteableRegistry; import org.opensearch.common.io.stream.NamedWriteableRegistry;
import org.elasticsearch.common.lease.Releasables; import org.opensearch.common.lease.Releasables;
import org.elasticsearch.common.logging.DeprecationLogger; import org.opensearch.common.logging.DeprecationLogger;
import org.elasticsearch.common.logging.HeaderWarning; import org.opensearch.common.logging.HeaderWarning;
import org.elasticsearch.common.logging.NodeAndClusterIdStateListener; import org.opensearch.common.logging.NodeAndClusterIdStateListener;
import org.elasticsearch.common.network.NetworkAddress; import org.opensearch.common.network.NetworkAddress;
import org.elasticsearch.common.network.NetworkModule; import org.opensearch.common.network.NetworkModule;
import org.elasticsearch.common.network.NetworkService; import org.opensearch.common.network.NetworkService;
import org.elasticsearch.common.settings.ClusterSettings; import org.opensearch.common.settings.ClusterSettings;
import org.elasticsearch.common.settings.ConsistentSettingsService; import org.opensearch.common.settings.ConsistentSettingsService;
import org.elasticsearch.common.settings.Setting; import org.opensearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property; import org.opensearch.common.settings.Setting.Property;
import org.elasticsearch.common.settings.SettingUpgrader; import org.opensearch.common.settings.SettingUpgrader;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.settings.SettingsModule; import org.opensearch.common.settings.SettingsModule;
import org.elasticsearch.common.transport.BoundTransportAddress; import org.opensearch.common.transport.BoundTransportAddress;
import org.elasticsearch.common.transport.TransportAddress; import org.opensearch.common.transport.TransportAddress;
import org.elasticsearch.common.unit.TimeValue; import org.opensearch.common.unit.TimeValue;
import org.elasticsearch.common.util.BigArrays; import org.opensearch.common.util.BigArrays;
import org.elasticsearch.common.util.PageCacheRecycler; import org.opensearch.common.util.PageCacheRecycler;
import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.opensearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.core.internal.io.IOUtils; import org.opensearch.core.internal.io.IOUtils;
import org.elasticsearch.discovery.Discovery; import org.opensearch.discovery.Discovery;
import org.elasticsearch.discovery.DiscoveryModule; import org.opensearch.discovery.DiscoveryModule;
import org.elasticsearch.discovery.DiscoverySettings; import org.opensearch.discovery.DiscoverySettings;
import org.elasticsearch.env.Environment; import org.opensearch.env.Environment;
import org.elasticsearch.env.NodeEnvironment; import org.opensearch.env.NodeEnvironment;
import org.elasticsearch.env.NodeMetadata; import org.opensearch.env.NodeMetadata;
import org.elasticsearch.gateway.GatewayAllocator; import org.opensearch.gateway.GatewayAllocator;
import org.elasticsearch.gateway.GatewayMetaState; import org.opensearch.gateway.GatewayMetaState;
import org.elasticsearch.gateway.GatewayModule; import org.opensearch.gateway.GatewayModule;
import org.elasticsearch.gateway.GatewayService; import org.opensearch.gateway.GatewayService;
import org.elasticsearch.gateway.MetaStateService; import org.opensearch.gateway.MetaStateService;
import org.elasticsearch.gateway.PersistedClusterStateService; import org.opensearch.gateway.PersistedClusterStateService;
import org.elasticsearch.http.HttpServerTransport; import org.opensearch.http.HttpServerTransport;
import org.elasticsearch.index.IndexSettings; import org.opensearch.index.IndexSettings;
import org.elasticsearch.index.analysis.AnalysisRegistry; import org.opensearch.index.analysis.AnalysisRegistry;
import org.elasticsearch.index.engine.EngineFactory; import org.opensearch.index.engine.EngineFactory;
import org.elasticsearch.indices.IndicesModule; import org.opensearch.indices.IndicesModule;
import org.elasticsearch.indices.IndicesService; import org.opensearch.indices.IndicesService;
import org.elasticsearch.indices.ShardLimitValidator; import org.opensearch.indices.ShardLimitValidator;
import org.elasticsearch.indices.SystemIndexDescriptor; import org.opensearch.indices.SystemIndexDescriptor;
import org.elasticsearch.indices.SystemIndices; import org.opensearch.indices.SystemIndices;
import org.elasticsearch.indices.analysis.AnalysisModule; import org.opensearch.indices.analysis.AnalysisModule;
import org.elasticsearch.indices.breaker.BreakerSettings; import org.opensearch.indices.breaker.BreakerSettings;
import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.opensearch.indices.breaker.CircuitBreakerService;
import org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService; import org.opensearch.indices.breaker.HierarchyCircuitBreakerService;
import org.elasticsearch.indices.breaker.NoneCircuitBreakerService; import org.opensearch.indices.breaker.NoneCircuitBreakerService;
import org.elasticsearch.indices.cluster.IndicesClusterStateService; import org.opensearch.indices.cluster.IndicesClusterStateService;
import org.elasticsearch.indices.recovery.PeerRecoverySourceService; import org.opensearch.indices.recovery.PeerRecoverySourceService;
import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; import org.opensearch.indices.recovery.PeerRecoveryTargetService;
import org.elasticsearch.indices.recovery.RecoverySettings; import org.opensearch.indices.recovery.RecoverySettings;
import org.elasticsearch.indices.store.IndicesStore; import org.opensearch.indices.store.IndicesStore;
import org.elasticsearch.ingest.IngestService; import org.opensearch.ingest.IngestService;
import org.elasticsearch.monitor.MonitorService; import org.opensearch.monitor.MonitorService;
import org.elasticsearch.monitor.fs.FsHealthService; import org.opensearch.monitor.fs.FsHealthService;
import org.elasticsearch.monitor.jvm.JvmInfo; import org.opensearch.monitor.jvm.JvmInfo;
import org.elasticsearch.persistent.PersistentTasksClusterService; import org.opensearch.persistent.PersistentTasksClusterService;
import org.elasticsearch.persistent.PersistentTasksExecutor; import org.opensearch.persistent.PersistentTasksExecutor;
import org.elasticsearch.persistent.PersistentTasksExecutorRegistry; import org.opensearch.persistent.PersistentTasksExecutorRegistry;
import org.elasticsearch.persistent.PersistentTasksService; import org.opensearch.persistent.PersistentTasksService;
import org.elasticsearch.plugins.ActionPlugin; import org.opensearch.plugins.ActionPlugin;
import org.elasticsearch.plugins.AnalysisPlugin; import org.opensearch.plugins.AnalysisPlugin;
import org.elasticsearch.plugins.CircuitBreakerPlugin; import org.opensearch.plugins.CircuitBreakerPlugin;
import org.elasticsearch.plugins.ClusterPlugin; import org.opensearch.plugins.ClusterPlugin;
import org.elasticsearch.plugins.DiscoveryPlugin; import org.opensearch.plugins.DiscoveryPlugin;
import org.elasticsearch.plugins.EnginePlugin; import org.opensearch.plugins.EnginePlugin;
import org.elasticsearch.plugins.IndexStorePlugin; import org.opensearch.plugins.IndexStorePlugin;
import org.elasticsearch.plugins.IngestPlugin; import org.opensearch.plugins.IngestPlugin;
import org.elasticsearch.plugins.MapperPlugin; import org.opensearch.plugins.MapperPlugin;
import org.elasticsearch.plugins.MetadataUpgrader; import org.opensearch.plugins.MetadataUpgrader;
import org.elasticsearch.plugins.NetworkPlugin; import org.opensearch.plugins.NetworkPlugin;
import org.elasticsearch.plugins.PersistentTaskPlugin; import org.opensearch.plugins.PersistentTaskPlugin;
import org.elasticsearch.plugins.Plugin; import org.opensearch.plugins.Plugin;
import org.elasticsearch.plugins.PluginsService; import org.opensearch.plugins.PluginsService;
import org.elasticsearch.plugins.RepositoryPlugin; import org.opensearch.plugins.RepositoryPlugin;
import org.elasticsearch.plugins.ScriptPlugin; import org.opensearch.plugins.ScriptPlugin;
import org.elasticsearch.plugins.SearchPlugin; import org.opensearch.plugins.SearchPlugin;
import org.elasticsearch.plugins.SystemIndexPlugin; import org.opensearch.plugins.SystemIndexPlugin;
import org.elasticsearch.repositories.RepositoriesModule; import org.opensearch.repositories.RepositoriesModule;
import org.elasticsearch.repositories.RepositoriesService; import org.opensearch.repositories.RepositoriesService;
import org.opensearch.rest.RestController; import org.opensearch.rest.RestController;
import org.elasticsearch.script.ScriptContext; import org.opensearch.script.ScriptContext;
import org.elasticsearch.script.ScriptEngine; import org.opensearch.script.ScriptEngine;
import org.elasticsearch.script.ScriptModule; import org.opensearch.script.ScriptModule;
import org.elasticsearch.script.ScriptService; import org.opensearch.script.ScriptService;
import org.elasticsearch.search.SearchModule; import org.opensearch.search.SearchModule;
import org.elasticsearch.search.SearchService; import org.opensearch.search.SearchService;
import org.elasticsearch.search.aggregations.support.AggregationUsageService; import org.opensearch.search.aggregations.support.AggregationUsageService;
import org.elasticsearch.search.fetch.FetchPhase; import org.opensearch.search.fetch.FetchPhase;
import org.opensearch.snapshots.InternalSnapshotsInfoService; import org.opensearch.snapshots.InternalSnapshotsInfoService;
import org.opensearch.snapshots.RestoreService; import org.opensearch.snapshots.RestoreService;
import org.opensearch.snapshots.SnapshotShardsService; import org.opensearch.snapshots.SnapshotShardsService;
@ -171,12 +171,12 @@ import org.opensearch.tasks.TaskCancellationService;
import org.opensearch.tasks.TaskResultsService; import org.opensearch.tasks.TaskResultsService;
import org.opensearch.threadpool.ExecutorBuilder; import org.opensearch.threadpool.ExecutorBuilder;
import org.opensearch.threadpool.ThreadPool; import org.opensearch.threadpool.ThreadPool;
import org.elasticsearch.transport.RemoteClusterService; import org.opensearch.transport.RemoteClusterService;
import org.elasticsearch.transport.Transport; import org.opensearch.transport.Transport;
import org.elasticsearch.transport.TransportInterceptor; import org.opensearch.transport.TransportInterceptor;
import org.elasticsearch.transport.TransportService; import org.opensearch.transport.TransportService;
import org.elasticsearch.usage.UsageService; import org.opensearch.usage.UsageService;
import org.elasticsearch.watcher.ResourceWatcherService; import org.opensearch.watcher.ResourceWatcherService;
import javax.net.ssl.SNIHostName; import javax.net.ssl.SNIHostName;
import java.io.BufferedWriter; import java.io.BufferedWriter;
@ -1178,7 +1178,7 @@ public class Node implements Closeable {
return service; 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) { protected HttpServerTransport newHttpTransport(NetworkModule networkModule) {
return networkModule.getHttpServerTransportSupplier().get(); return networkModule.getHttpServerTransportSupplier().get();
} }

View File

@ -17,11 +17,11 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.node; package org.opensearch.node;
import org.elasticsearch.OpenSearchException; import org.opensearch.OpenSearchException;
import org.elasticsearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import java.io.IOException; import java.io.IOException;

View File

@ -17,12 +17,12 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.node; package org.opensearch.node;
import org.elasticsearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.node.DiscoveryNodeRole; import org.opensearch.cluster.node.DiscoveryNodeRole;
import org.elasticsearch.common.settings.Setting; import org.opensearch.common.settings.Setting;
import org.elasticsearch.common.settings.Setting.Property; import org.opensearch.common.settings.Setting.Property;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;

View File

@ -17,31 +17,31 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.node; package org.opensearch.node;
import org.elasticsearch.index.IndexingPressure; import org.opensearch.index.IndexingPressure;
import org.elasticsearch.core.internal.io.IOUtils; import org.opensearch.core.internal.io.IOUtils;
import org.elasticsearch.Build; import org.opensearch.Build;
import org.elasticsearch.Version; import org.opensearch.Version;
import org.opensearch.action.admin.cluster.node.info.NodeInfo; import org.opensearch.action.admin.cluster.node.info.NodeInfo;
import org.opensearch.action.admin.cluster.node.stats.NodeStats; import org.opensearch.action.admin.cluster.node.stats.NodeStats;
import org.opensearch.action.admin.indices.stats.CommonStatsFlags; import org.opensearch.action.admin.indices.stats.CommonStatsFlags;
import org.elasticsearch.action.search.SearchTransportService; import org.opensearch.action.search.SearchTransportService;
import org.elasticsearch.cluster.service.ClusterService; import org.opensearch.cluster.service.ClusterService;
import org.elasticsearch.common.Nullable; import org.opensearch.common.Nullable;
import org.elasticsearch.common.settings.Settings; import org.opensearch.common.settings.Settings;
import org.elasticsearch.common.settings.SettingsFilter; import org.opensearch.common.settings.SettingsFilter;
import org.elasticsearch.discovery.Discovery; import org.opensearch.discovery.Discovery;
import org.elasticsearch.http.HttpServerTransport; import org.opensearch.http.HttpServerTransport;
import org.elasticsearch.indices.IndicesService; import org.opensearch.indices.IndicesService;
import org.elasticsearch.indices.breaker.CircuitBreakerService; import org.opensearch.indices.breaker.CircuitBreakerService;
import org.elasticsearch.ingest.IngestService; import org.opensearch.ingest.IngestService;
import org.elasticsearch.monitor.MonitorService; import org.opensearch.monitor.MonitorService;
import org.elasticsearch.plugins.PluginsService; import org.opensearch.plugins.PluginsService;
import org.elasticsearch.script.ScriptService; import org.opensearch.script.ScriptService;
import org.elasticsearch.search.aggregations.support.AggregationUsageService; import org.opensearch.search.aggregations.support.AggregationUsageService;
import org.opensearch.threadpool.ThreadPool; import org.opensearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService; import org.opensearch.transport.TransportService;
import java.io.Closeable; import java.io.Closeable;
import java.io.IOException; import java.io.IOException;

View File

@ -17,16 +17,16 @@
* under the License. * 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; import java.util.List;
/** /**
* An exception thrown during node validation. Node validation runs immediately before a node * An exception thrown during node validation. Node validation runs immediately before a node
* begins accepting network requests in * 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. * 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 { public class NodeValidationException extends Exception {

View File

@ -17,10 +17,10 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.node; package org.opensearch.node;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.xcontent.ToXContent; import org.opensearch.common.xcontent.ToXContent;
public interface ReportingService<I extends ReportingService.Info> { public interface ReportingService<I extends ReportingService.Info> {
I info(); I info();

View File

@ -17,17 +17,17 @@
* under the License. * under the License.
*/ */
package org.elasticsearch.node; package org.opensearch.node;
import org.elasticsearch.cluster.ClusterChangedEvent; import org.opensearch.cluster.ClusterChangedEvent;
import org.elasticsearch.cluster.ClusterStateListener; import org.opensearch.cluster.ClusterStateListener;
import org.elasticsearch.cluster.node.DiscoveryNode; import org.opensearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.service.ClusterService; import org.opensearch.cluster.service.ClusterService;
import org.elasticsearch.common.ExponentiallyWeightedMovingAverage; import org.opensearch.common.ExponentiallyWeightedMovingAverage;
import org.elasticsearch.common.io.stream.StreamInput; import org.opensearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput; import org.opensearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable; import org.opensearch.common.io.stream.Writeable;
import org.elasticsearch.common.util.concurrent.ConcurrentCollections; import org.opensearch.common.util.concurrent.ConcurrentCollections;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;

View File

@ -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. * node within the cluster.
*/ */
package org.elasticsearch.node; package org.opensearch.node;