[Javadocs] add to o.o.monitor,persistance,plugins,repo,script,threadpool,usage,watcher (#3186)
Adds javadocs to classes in the org.opensearch.monitor, persistence, plugins, repository, script, threadpool, usage, and watcher packages. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
parent
2e53f9a1b8
commit
14704b30ca
|
@ -36,6 +36,8 @@ package org.opensearch;
|
|||
* Provides a static final field that can be used to check if assertions are enabled. Since this field might be used elsewhere to check if
|
||||
* assertions are enabled, if you are running with assertions enabled for specific packages or classes, you should enable assertions on this
|
||||
* class too (e.g., {@code -ea org.opensearch.Assertions -ea org.opensearch.cluster.service.MasterService}).
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class Assertions {
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@ import java.util.jar.Manifest;
|
|||
|
||||
/**
|
||||
* Information about a build of OpenSearch.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class Build {
|
||||
/**
|
||||
|
|
|
@ -61,6 +61,11 @@ import java.util.Set;
|
|||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Helper class for OpenSearch Exceptions
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class ExceptionsHelper {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(ExceptionsHelper.class);
|
||||
|
|
|
@ -43,6 +43,8 @@ import java.lang.reflect.Field;
|
|||
*
|
||||
* This class keeps all the supported OpenSearch predecessor versions for
|
||||
* backward compatibility purpose.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class LegacyESVersion extends Version {
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ import java.io.IOException;
|
|||
/**
|
||||
* This exception is thrown when OpenSearch detects
|
||||
* an inconsistency in one of it's persistent files.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OpenSearchCorruptionException extends IOException {
|
||||
|
||||
|
|
|
@ -73,6 +73,8 @@ import static org.opensearch.common.xcontent.XContentParserUtils.ensureFieldName
|
|||
|
||||
/**
|
||||
* A base class for all opensearch exceptions.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OpenSearchException extends RuntimeException implements ToXContentFragment, Writeable {
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.io.IOException;
|
|||
/**
|
||||
* A generic exception indicating failure to generate.
|
||||
*
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OpenSearchGenerationException extends OpenSearchException {
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.io.IOException;
|
|||
|
||||
/**
|
||||
* Unchecked exception that is translated into a {@code 400 BAD REQUEST} error when it bubbles out over HTTP.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OpenSearchParseException extends OpenSearchException {
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ import java.io.IOException;
|
|||
|
||||
/**
|
||||
* Generic security exception
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OpenSearchSecurityException extends OpenSearchStatusException {
|
||||
/**
|
||||
|
|
|
@ -41,6 +41,8 @@ import java.io.IOException;
|
|||
/**
|
||||
* Exception who's {@link RestStatus} is arbitrary rather than derived. Used, for example, by reindex-from-remote to wrap remote exceptions
|
||||
* that contain a status.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OpenSearchStatusException extends OpenSearchException {
|
||||
private final RestStatus status;
|
||||
|
|
|
@ -39,7 +39,7 @@ import java.io.IOException;
|
|||
/**
|
||||
* The same as {@link java.util.concurrent.TimeoutException} simply a runtime one.
|
||||
*
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OpenSearchTimeoutException extends OpenSearchException {
|
||||
public OpenSearchTimeoutException(StreamInput in) throws IOException {
|
||||
|
|
|
@ -36,6 +36,8 @@ package org.opensearch;
|
|||
* An exception that is meant to be "unwrapped" when sent back to the user
|
||||
* as an error because its is {@link #getCause() cause}, if non-null is
|
||||
* <strong>always</strong> more useful to the user than the exception itself.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public interface OpenSearchWrapperException {
|
||||
Throwable getCause();
|
||||
|
|
|
@ -38,6 +38,11 @@ import org.opensearch.rest.RestStatus;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Exception when Resources already exists
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ResourceAlreadyExistsException extends OpenSearchException {
|
||||
|
||||
public ResourceAlreadyExistsException(Index index) {
|
||||
|
|
|
@ -38,6 +38,8 @@ import java.io.IOException;
|
|||
|
||||
/**
|
||||
* Generic ResourceNotFoundException corresponding to the {@link RestStatus#NOT_FOUND} status code
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ResourceNotFoundException extends OpenSearchException {
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@ import java.security.BasicPermission;
|
|||
* ...
|
||||
* );
|
||||
* </code></pre>
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class SpecialPermission extends BasicPermission {
|
||||
|
||||
|
|
|
@ -51,6 +51,11 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* OpenSearch Version Class
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public class Version implements Comparable<Version>, ToXContentFragment {
|
||||
/*
|
||||
* The logic for ID is: XXYYZZAA, where XX is major version, YY is minor version, ZZ is revision, and AA is alpha/beta/rc indicator AA
|
||||
|
|
|
@ -44,6 +44,11 @@ import org.opensearch.threadpool.ThreadPool;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* The resource monitoring service
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class MonitorService extends AbstractLifecycleComponent {
|
||||
|
||||
private final JvmGcMonitorService jvmGcMonitorService;
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
|
||||
package org.opensearch.monitor;
|
||||
|
||||
/**
|
||||
* The service for monitoring node health
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface NodeHealthService {
|
||||
|
||||
|
|
|
@ -35,6 +35,11 @@ package org.opensearch.monitor;
|
|||
import java.lang.management.OperatingSystemMXBean;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
* Probes the various resources
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class Probes {
|
||||
public static short getLoadAndScaleToPercent(Method method, OperatingSystemMXBean osMxBean) {
|
||||
if (method != null) {
|
||||
|
|
|
@ -35,6 +35,8 @@ package org.opensearch.monitor;
|
|||
/**
|
||||
* Class that represents the Health status for a node as determined by {@link NodeHealthService} and provides additional
|
||||
* info explaining the reasons
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class StatusInfo {
|
||||
|
||||
|
|
|
@ -68,6 +68,8 @@ 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
|
||||
* path as unhealthy.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class FsHealthService extends AbstractLifecycleComponent implements NodeHealthService {
|
||||
|
||||
|
|
|
@ -49,6 +49,11 @@ import java.util.HashSet;
|
|||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* FileSystem information
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class FsInfo implements Iterable<FsInfo.Path>, Writeable, ToXContentFragment {
|
||||
|
||||
public static class Path implements Writeable, ToXContentObject {
|
||||
|
|
|
@ -51,6 +51,11 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* FileSystem probe
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class FsProbe {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(FsProbe.class);
|
||||
|
|
|
@ -44,6 +44,11 @@ import org.opensearch.env.NodeEnvironment;
|
|||
import java.io.IOException;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* FileSystem service
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class FsService {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(FsService.class);
|
||||
|
|
|
@ -45,6 +45,11 @@ import java.util.Set;
|
|||
import static java.util.Collections.unmodifiableMap;
|
||||
import static java.util.Collections.unmodifiableSet;
|
||||
|
||||
/**
|
||||
* Analyzes Operating System deadlocks
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class DeadlockAnalyzer {
|
||||
|
||||
private static final Deadlock NULL_RESULT[] = new Deadlock[0];
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
|
||||
package org.opensearch.monitor.jvm;
|
||||
|
||||
/**
|
||||
* Simple utility class for human readable GC names
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class GcNames {
|
||||
|
||||
public static final String YOUNG = "young";
|
||||
|
|
|
@ -51,6 +51,11 @@ import java.util.Map;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.ToLongFunction;
|
||||
|
||||
/**
|
||||
* Monitors hot threads
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class HotThreads {
|
||||
|
||||
private static final Object mutex = new Object();
|
||||
|
|
|
@ -54,6 +54,11 @@ import java.util.function.BiFunction;
|
|||
|
||||
import static java.util.Collections.unmodifiableMap;
|
||||
|
||||
/**
|
||||
* Service to monitor garbage collection
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class JvmGcMonitorService extends AbstractLifecycleComponent {
|
||||
private static final Logger logger = LogManager.getLogger(JvmGcMonitorService.class);
|
||||
|
||||
|
|
|
@ -57,6 +57,11 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Holds information about the JVM
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class JvmInfo implements ReportingService.Info {
|
||||
|
||||
private static JvmInfo INSTANCE;
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
|
||||
package org.opensearch.monitor.jvm;
|
||||
|
||||
/**
|
||||
* JVM Process ID
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class JvmPid {
|
||||
|
||||
static long getPid() {
|
||||
|
|
|
@ -40,6 +40,11 @@ import org.opensearch.common.settings.Settings;
|
|||
import org.opensearch.common.unit.TimeValue;
|
||||
import org.opensearch.node.ReportingService;
|
||||
|
||||
/**
|
||||
* Service for monitoring the JVM
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class JvmService implements ReportingService<JvmInfo> {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(JvmService.class);
|
||||
|
|
|
@ -58,6 +58,11 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Holds JVM statistics
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class JvmStats implements Writeable, ToXContentFragment {
|
||||
|
||||
private static final RuntimeMXBean runtimeMXBean;
|
||||
|
|
|
@ -40,6 +40,11 @@ import org.opensearch.node.ReportingService;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Holds Operating System Information
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OsInfo implements ReportingService.Info {
|
||||
|
||||
private final long refreshInterval;
|
||||
|
|
|
@ -74,6 +74,8 @@ import java.util.stream.Collectors;
|
|||
* - An error case retrieving these values from a linux kernel
|
||||
* - A non-standard libc implementation not implementing the required values
|
||||
* For a more exhaustive explanation, see https://github.com/elastic/elasticsearch/pull/42725
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OsProbe {
|
||||
|
||||
|
|
|
@ -44,6 +44,11 @@ import org.opensearch.node.ReportingService;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Service for the Operating System
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OsService implements ReportingService<OsInfo> {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(OsService.class);
|
||||
|
|
|
@ -45,6 +45,11 @@ import java.io.IOException;
|
|||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Holds stats for the Operating System
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class OsStats implements Writeable, ToXContentFragment {
|
||||
|
||||
private final long timestamp;
|
||||
|
|
|
@ -40,6 +40,11 @@ import org.opensearch.node.ReportingService;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Holds information for monitoring the process
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ProcessInfo implements ReportingService.Info {
|
||||
|
||||
private final long refreshInterval;
|
||||
|
|
|
@ -41,6 +41,11 @@ import java.lang.reflect.Method;
|
|||
|
||||
import static org.opensearch.monitor.jvm.JvmInfo.jvmInfo;
|
||||
|
||||
/**
|
||||
* Probes the process
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ProcessProbe {
|
||||
|
||||
private static final OperatingSystemMXBean osMxBean = ManagementFactory.getOperatingSystemMXBean();
|
||||
|
|
|
@ -41,6 +41,11 @@ import org.opensearch.common.unit.TimeValue;
|
|||
import org.opensearch.common.util.SingleObjectCache;
|
||||
import org.opensearch.node.ReportingService;
|
||||
|
||||
/**
|
||||
* The service for the process
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class ProcessService implements ReportingService<ProcessInfo> {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(ProcessService.class);
|
||||
|
|
|
@ -43,6 +43,11 @@ import org.opensearch.common.xcontent.XContentBuilder;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Holds stats for the process
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ProcessStats implements Writeable, ToXContentFragment {
|
||||
|
||||
private final long timestamp;
|
||||
|
|
|
@ -48,6 +48,8 @@ import java.util.function.Predicate;
|
|||
|
||||
/**
|
||||
* Represents a executor node operation that corresponds to a persistent task
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class AllocatedPersistentTask extends CancellableTask {
|
||||
|
||||
|
|
|
@ -58,6 +58,8 @@ import static org.opensearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* ActionType that is used by executor node to indicate that the persistent action finished or failed on the node and needs to be
|
||||
* removed from the cluster state in case of successful completion or restarted on some other node in case of failure.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class CompletionPersistentTaskAction extends ActionType<PersistentTaskResponse> {
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ import org.opensearch.threadpool.ThreadPool;
|
|||
* This component is responsible for execution of persistent tasks.
|
||||
*
|
||||
* It abstracts away the execution of tasks and greatly simplifies testing of PersistentTasksNodeService
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodePersistentTasksExecutor {
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ import org.opensearch.common.xcontent.ToXContentObject;
|
|||
|
||||
/**
|
||||
* Parameters used to start persistent task
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public interface PersistentTaskParams extends VersionedNamedWriteable, ToXContentObject, ClusterState.FeatureAware {
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@ import java.util.Objects;
|
|||
|
||||
/**
|
||||
* Response upon a successful start or an persistent task
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class PersistentTaskResponse extends ActionResponse {
|
||||
private PersistentTask<?> task;
|
||||
|
|
|
@ -37,5 +37,7 @@ import org.opensearch.common.xcontent.ToXContentObject;
|
|||
/**
|
||||
* {@link PersistentTaskState} represents the state of the persistent tasks, as it
|
||||
* is persisted in the cluster state.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public interface PersistentTaskState extends ToXContentObject, NamedWriteable {}
|
||||
|
|
|
@ -61,6 +61,8 @@ import java.util.Objects;
|
|||
|
||||
/**
|
||||
* Component that runs only on the cluster-manager node and is responsible for assigning running tasks to nodes
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class PersistentTasksClusterService implements ClusterStateListener, Closeable {
|
||||
|
||||
|
|
|
@ -71,6 +71,8 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.constructo
|
|||
|
||||
/**
|
||||
* A cluster state record that contains a list of all running persistent tasks
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class PersistentTasksCustomMetadata extends AbstractNamedDiffable<Metadata.Custom> implements Metadata.Custom {
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ import java.util.function.Predicate;
|
|||
/**
|
||||
* An executor of tasks that can survive restart of requesting or executing node.
|
||||
* These tasks are using cluster state rather than only transport service to send requests and responses.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public abstract class PersistentTasksExecutor<Params extends PersistentTaskParams> {
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* Components that registers all persistent task executors
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class PersistentTasksExecutorRegistry {
|
||||
|
||||
|
|
|
@ -61,6 +61,8 @@ import static java.util.Objects.requireNonNull;
|
|||
/**
|
||||
* This component is responsible for coordination of execution of persistent tasks on individual nodes. It runs on all
|
||||
* nodes in the cluster and monitors cluster state changes to detect started commands.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class PersistentTasksNodeService implements ClusterStateListener {
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@ import java.util.function.Predicate;
|
|||
* This service is used by persistent tasks and allocated persistent tasks to communicate changes
|
||||
* to the cluster-manager node so that the cluster-manager can update the cluster state and can track of the states
|
||||
* of the persistent tasks.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class PersistentTasksService {
|
||||
|
||||
|
|
|
@ -53,6 +53,11 @@ import org.opensearch.transport.TransportService;
|
|||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Transport action to remove a persistent task
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class RemovePersistentTaskAction extends ActionType<PersistentTaskResponse> {
|
||||
|
||||
public static final RemovePersistentTaskAction INSTANCE = new RemovePersistentTaskAction();
|
||||
|
|
|
@ -58,6 +58,8 @@ import static org.opensearch.action.ValidateActions.addValidationError;
|
|||
|
||||
/**
|
||||
* This action can be used to add the record for the persistent action to the cluster state.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class StartPersistentTaskAction extends ActionType<PersistentTaskResponse> {
|
||||
|
||||
|
|
|
@ -55,6 +55,11 @@ import java.util.Objects;
|
|||
|
||||
import static org.opensearch.action.ValidateActions.addValidationError;
|
||||
|
||||
/**
|
||||
* Transport action for updating persistent tasks
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class UpdatePersistentTaskStatusAction extends ActionType<PersistentTaskResponse> {
|
||||
|
||||
public static final UpdatePersistentTaskStatusAction INSTANCE = new UpdatePersistentTaskStatusAction();
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.util.Objects;
|
|||
* assigning a persistent task to a node of the cluster.
|
||||
*
|
||||
* @see EnableAssignmentDecider
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class AssignmentDecision {
|
||||
|
||||
|
|
|
@ -51,6 +51,8 @@ import static org.opensearch.common.settings.Setting.Property.NodeScope;
|
|||
* </ul>
|
||||
*
|
||||
* @see Allocation
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class EnableAssignmentDecider {
|
||||
|
||||
|
|
|
@ -72,6 +72,8 @@ import java.util.stream.Collectors;
|
|||
* new ActionHandler<>(RethrottleAction.INSTANCE, TransportRethrottleAction.class));
|
||||
* }
|
||||
* }</pre>
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface ActionPlugin {
|
||||
/**
|
||||
|
|
|
@ -72,6 +72,8 @@ import static java.util.Collections.emptyMap;
|
|||
* OpenSearch doesn't have any automatic mechanism to share these components between indexes. If any component is heavy enough to warrant
|
||||
* such sharing then it is the Plugin's responsibility to do it in their {@link AnalysisProvider} implementation. We recommend against doing
|
||||
* this unless absolutely necessary because it can be difficult to get the caching right given things like behavior changes across versions.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface AnalysisPlugin {
|
||||
/**
|
||||
|
|
|
@ -39,6 +39,8 @@ import org.opensearch.indices.breaker.CircuitBreakerService;
|
|||
|
||||
/**
|
||||
* An extension point for {@link Plugin} implementations to add custom circuit breakers
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface CircuitBreakerPlugin {
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ import java.util.function.Supplier;
|
|||
|
||||
/**
|
||||
* An extension point for {@link Plugin} implementations to customer behavior of cluster management.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface ClusterPlugin {
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@ import java.util.function.Supplier;
|
|||
* }
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface DiscoveryPlugin {
|
||||
|
||||
|
|
|
@ -45,6 +45,8 @@ import java.util.function.Supplier;
|
|||
|
||||
/**
|
||||
* A plugin that provides alternative engine implementations.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface EnginePlugin {
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.util.List;
|
|||
*
|
||||
* This class provides a callback for extensible plugins to be informed of other plugins
|
||||
* which extend them.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface ExtensiblePlugin {
|
||||
|
||||
|
|
|
@ -46,6 +46,8 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* A plugin that provides alternative directory implementations.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface IndexStorePlugin {
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ import org.opensearch.ingest.Processor;
|
|||
|
||||
/**
|
||||
* An extension point for {@link Plugin} implementations to add custom ingest processors
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface IngestPlugin {
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@ import java.util.function.Predicate;
|
|||
|
||||
/**
|
||||
* An extension point for {@link Plugin} implementations to add custom mappers
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface MapperPlugin {
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@ import java.util.function.UnaryOperator;
|
|||
|
||||
/**
|
||||
* Upgrades {@link Metadata} on startup on behalf of installed {@link Plugin}s
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public class MetadataUpgrader {
|
||||
public final UnaryOperator<Map<String, IndexTemplateMetadata>> indexTemplateMetadataUpgraders;
|
||||
|
|
|
@ -52,6 +52,8 @@ import org.opensearch.transport.TransportInterceptor;
|
|||
|
||||
/**
|
||||
* Plugin for extending network and transport related classes
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface NetworkPlugin {
|
||||
|
||||
|
|
|
@ -43,6 +43,8 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* Plugin for registering persistent tasks executors.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface PersistentTaskPlugin {
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.util.Locale;
|
|||
|
||||
/**
|
||||
* Encapsulates platform-dependent methods for handling native components of plugins.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public class Platforms {
|
||||
|
||||
|
|
|
@ -86,6 +86,8 @@ import java.util.function.UnaryOperator;
|
|||
* <li>{@link SearchPlugin}
|
||||
* <li>{@link ReloadablePlugin}
|
||||
* </ul>
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public abstract class Plugin implements Closeable {
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@ import java.util.stream.Collectors;
|
|||
|
||||
/**
|
||||
* An in-memory representation of the plugin descriptor.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public class PluginInfo implements Writeable, ToXContentObject {
|
||||
|
||||
|
|
|
@ -37,6 +37,8 @@ import java.util.List;
|
|||
/**
|
||||
* This class exists solely as an intermediate layer to avoid causing PluginsService
|
||||
* to load ExtendedPluginsClassLoader when used in the transport client.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
class PluginLoaderIndirection {
|
||||
|
||||
|
|
|
@ -54,6 +54,11 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Security Policy for Plugins
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
class PluginSecurity {
|
||||
|
||||
/**
|
||||
|
|
|
@ -40,6 +40,8 @@ import org.opensearch.common.settings.Settings;
|
|||
* is reloaded it might rebuild any internal members. Plugins usually implement
|
||||
* this interface in order to reread the values of {@code SecureSetting}s and
|
||||
* then rebuild any dependent internal members.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface ReloadablePlugin {
|
||||
/**
|
||||
|
|
|
@ -43,6 +43,8 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* An extension point for {@link Plugin} implementations to add custom snapshot repositories.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface RepositoryPlugin {
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@ import org.opensearch.script.ScriptEngine;
|
|||
|
||||
/**
|
||||
* An additional extension point for {@link Plugin}s that extends OpenSearch's scripting functionality.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface ScriptPlugin {
|
||||
|
||||
|
|
|
@ -87,6 +87,8 @@ import static java.util.Collections.emptyMap;
|
|||
|
||||
/**
|
||||
* Plugin for extending search time behavior.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface SearchPlugin {
|
||||
/**
|
||||
|
|
|
@ -41,6 +41,8 @@ import java.util.Collections;
|
|||
/**
|
||||
* Plugin for defining system indices. Extends {@link ActionPlugin} because system indices must be accessed via APIs
|
||||
* added by the plugin that owns the system index, rather than standard APIs.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface SystemIndexPlugin extends ActionPlugin {
|
||||
|
||||
|
|
|
@ -38,6 +38,8 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* Provides named XContent parsers.
|
||||
*
|
||||
* @opensearch.api
|
||||
*/
|
||||
public interface NamedXContentProvider {
|
||||
|
||||
|
|
|
@ -57,6 +57,11 @@ import java.util.Map;
|
|||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* Repository that is filtered
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class FilterRepository implements Repository {
|
||||
|
||||
private final Repository in;
|
||||
|
|
|
@ -45,6 +45,8 @@ import java.util.Objects;
|
|||
|
||||
/**
|
||||
* Represents a single snapshotted index in the repository.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class IndexId implements Writeable, ToXContentObject {
|
||||
protected static final String NAME = "name";
|
||||
|
|
|
@ -49,6 +49,8 @@ import java.util.stream.Collectors;
|
|||
* {@link org.opensearch.repositories.blobstore.BlobStoreRepository#finalizeSnapshot} the identifier for an instance of
|
||||
* {@link IndexMetadata} should be computed and then used to check if it already exists in the repository via
|
||||
* {@link #getIndexMetaBlobId(String)}.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class IndexMetaDataGenerations {
|
||||
|
||||
|
|
|
@ -49,6 +49,8 @@ import java.util.Map;
|
|||
|
||||
/**
|
||||
* Sets up classes for Snapshot/Restore.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RepositoriesModule {
|
||||
|
||||
|
|
|
@ -79,6 +79,8 @@ import java.util.stream.Stream;
|
|||
|
||||
/**
|
||||
* Service responsible for maintaining and providing access to snapshot repositories on nodes.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class RepositoriesService extends AbstractLifecycleComponent implements ClusterStateApplier {
|
||||
|
||||
|
|
|
@ -44,6 +44,11 @@ import java.util.List;
|
|||
import java.util.function.LongSupplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Archive of repository stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RepositoriesStatsArchive {
|
||||
private static final Logger logger = LogManager.getLogger(RepositoriesStatsArchive.class);
|
||||
|
||||
|
|
|
@ -70,6 +70,8 @@ import java.util.function.Function;
|
|||
* for each shard</li>
|
||||
* <li>When all shard calls return cluster-manager calls {@link #finalizeSnapshot} with possible list of failures</li>
|
||||
* </ul>
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public interface Repository extends LifecycleComponent {
|
||||
|
||||
|
|
|
@ -43,6 +43,11 @@ import org.opensearch.common.xcontent.XContentBuilder;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Result of a repository cleanup action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RepositoryCleanupResult implements Writeable, ToXContentObject {
|
||||
|
||||
public static final ObjectParser<RepositoryCleanupResult, Void> PARSER = new ObjectParser<>(
|
||||
|
|
|
@ -60,6 +60,8 @@ import java.util.stream.Collectors;
|
|||
/**
|
||||
* A class that represents the data in a repository, as captured in the
|
||||
* repository's index blob.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RepositoryData {
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ import java.io.IOException;
|
|||
|
||||
/**
|
||||
* Generic repository exception
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class RepositoryException extends OpenSearchException {
|
||||
private final String repository;
|
||||
|
|
|
@ -44,6 +44,11 @@ import java.io.IOException;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Information about a repository
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RepositoryInfo implements Writeable, ToXContentFragment {
|
||||
public final String ephemeralId;
|
||||
public final String name;
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.io.IOException;
|
|||
|
||||
/**
|
||||
* Repository missing exception
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class RepositoryMissingException extends RepositoryException {
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ package org.opensearch.repositories;
|
|||
|
||||
/**
|
||||
* Coordinates of an operation that modifies a repository, assuming that repository at a specific generation.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public interface RepositoryOperation {
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@ import java.util.Objects;
|
|||
|
||||
/**
|
||||
* Represents a shard snapshot in a repository.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RepositoryShardId implements Writeable {
|
||||
|
||||
|
|
|
@ -42,6 +42,11 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Stats about a repository
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class RepositoryStats implements Writeable {
|
||||
|
||||
public static final RepositoryStats EMPTY_STATS = new RepositoryStats(Collections.emptyMap());
|
||||
|
|
|
@ -42,6 +42,11 @@ import org.opensearch.common.xcontent.XContentBuilder;
|
|||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Stats snapshot about a repository
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RepositoryStatsSnapshot implements Writeable, ToXContentObject {
|
||||
public static final long UNKNOWN_CLUSTER_VERSION = -1;
|
||||
private final RepositoryInfo repositoryInfo;
|
||||
|
|
|
@ -39,6 +39,8 @@ import java.io.IOException;
|
|||
|
||||
/**
|
||||
* Repository verification exception
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class RepositoryVerificationException extends RepositoryException {
|
||||
|
||||
|
|
|
@ -47,6 +47,11 @@ import java.util.Set;
|
|||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Generations of shards for snapshots
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class ShardGenerations {
|
||||
|
||||
public static final ShardGenerations EMPTY = new ShardGenerations(Collections.emptyMap());
|
||||
|
|
|
@ -32,6 +32,11 @@
|
|||
|
||||
package org.opensearch.repositories;
|
||||
|
||||
/**
|
||||
* Exception thrown when a repository fails verification
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class VerificationFailure {
|
||||
|
||||
private String nodeId;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue