[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:
Nick Knize 2022-05-04 17:21:35 -05:00 committed by GitHub
parent 2e53f9a1b8
commit 14704b30ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
163 changed files with 498 additions and 5 deletions

View File

@ -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 {

View File

@ -46,6 +46,8 @@ import java.util.jar.Manifest;
/**
* Information about a build of OpenSearch.
*
* @opensearch.internal
*/
public class Build {
/**

View File

@ -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);

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -39,7 +39,7 @@ import java.io.IOException;
/**
* A generic exception indicating failure to generate.
*
*
* @opensearch.internal
*/
public class OpenSearchGenerationException extends OpenSearchException {

View File

@ -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 {

View File

@ -38,6 +38,8 @@ import java.io.IOException;
/**
* Generic security exception
*
* @opensearch.internal
*/
public class OpenSearchSecurityException extends OpenSearchStatusException {
/**

View File

@ -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;

View File

@ -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 {

View File

@ -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();

View File

@ -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) {

View File

@ -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 {

View File

@ -68,6 +68,8 @@ import java.security.BasicPermission;
* ...
* );
* </code></pre>
*
* @opensearch.internal
*/
public final class SpecialPermission extends BasicPermission {

View File

@ -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

View File

@ -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;

View File

@ -32,6 +32,11 @@
package org.opensearch.monitor;
/**
* The service for monitoring node health
*
* @opensearch.internal
*/
@FunctionalInterface
public interface NodeHealthService {

View File

@ -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) {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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);

View File

@ -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);

View File

@ -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];

View File

@ -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";

View File

@ -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();

View File

@ -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);

View File

@ -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;

View File

@ -32,6 +32,11 @@
package org.opensearch.monitor.jvm;
/**
* JVM Process ID
*
* @opensearch.internal
*/
class JvmPid {
static long getPid() {

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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();

View File

@ -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);

View File

@ -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;

View File

@ -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 {

View File

@ -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> {

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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 {}

View File

@ -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 {

View File

@ -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 {

View File

@ -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> {

View File

@ -38,6 +38,8 @@ import java.util.Map;
/**
* Components that registers all persistent task executors
*
* @opensearch.internal
*/
public class PersistentTasksExecutorRegistry {

View File

@ -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 {

View File

@ -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 {

View File

@ -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();

View File

@ -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> {

View File

@ -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();

View File

@ -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 {

View File

@ -51,6 +51,8 @@ import static org.opensearch.common.settings.Setting.Property.NodeScope;
* </ul>
*
* @see Allocation
*
* @opensearch.internal
*/
public class EnableAssignmentDecider {

View File

@ -72,6 +72,8 @@ import java.util.stream.Collectors;
* new ActionHandler<>(RethrottleAction.INSTANCE, TransportRethrottleAction.class));
* }
* }</pre>
*
* @opensearch.api
*/
public interface ActionPlugin {
/**

View File

@ -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 {
/**

View File

@ -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 {

View File

@ -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 {

View File

@ -57,6 +57,8 @@ import java.util.function.Supplier;
* }
* }
* </pre>
*
* @opensearch.api
*/
public interface DiscoveryPlugin {

View File

@ -45,6 +45,8 @@ import java.util.function.Supplier;
/**
* A plugin that provides alternative engine implementations.
*
* @opensearch.api
*/
public interface EnginePlugin {

View File

@ -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 {

View File

@ -46,6 +46,8 @@ import java.util.Map;
/**
* A plugin that provides alternative directory implementations.
*
* @opensearch.api
*/
public interface IndexStorePlugin {

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -52,6 +52,8 @@ import org.opensearch.transport.TransportInterceptor;
/**
* Plugin for extending network and transport related classes
*
* @opensearch.api
*/
public interface NetworkPlugin {

View File

@ -43,6 +43,8 @@ import java.util.List;
/**
* Plugin for registering persistent tasks executors.
*
* @opensearch.api
*/
public interface PersistentTaskPlugin {

View File

@ -39,6 +39,8 @@ import java.util.Locale;
/**
* Encapsulates platform-dependent methods for handling native components of plugins.
*
* @opensearch.api
*/
public class Platforms {

View File

@ -86,6 +86,8 @@ import java.util.function.UnaryOperator;
* <li>{@link SearchPlugin}
* <li>{@link ReloadablePlugin}
* </ul>
*
* @opensearch.api
*/
public abstract class Plugin implements Closeable {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {
/**

View File

@ -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 {
/**

View File

@ -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 {

View File

@ -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 {

View File

@ -87,6 +87,8 @@ import static java.util.Collections.emptyMap;
/**
* Plugin for extending search time behavior.
*
* @opensearch.api
*/
public interface SearchPlugin {
/**

View File

@ -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 {

View File

@ -38,6 +38,8 @@ import java.util.List;
/**
* Provides named XContent parsers.
*
* @opensearch.api
*/
public interface NamedXContentProvider {

View File

@ -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;

View File

@ -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";

View File

@ -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 {

View File

@ -49,6 +49,8 @@ import java.util.Map;
/**
* Sets up classes for Snapshot/Restore.
*
* @opensearch.internal
*/
public final class RepositoriesModule {

View File

@ -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 {

View File

@ -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);

View File

@ -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 {

View File

@ -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<>(

View File

@ -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 {

View File

@ -40,6 +40,8 @@ import java.io.IOException;
/**
* Generic repository exception
*
* @opensearch.internal
*/
public class RepositoryException extends OpenSearchException {
private final String repository;

View File

@ -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;

View File

@ -39,6 +39,8 @@ import java.io.IOException;
/**
* Repository missing exception
*
* @opensearch.internal
*/
public class RepositoryMissingException extends RepositoryException {

View File

@ -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 {

View File

@ -41,6 +41,8 @@ import java.util.Objects;
/**
* Represents a shard snapshot in a repository.
*
* @opensearch.internal
*/
public final class RepositoryShardId implements Writeable {

View File

@ -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());

View File

@ -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;

View File

@ -39,6 +39,8 @@ import java.io.IOException;
/**
* Repository verification exception
*
* @opensearch.internal
*/
public class RepositoryVerificationException extends RepositoryException {

View File

@ -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());

View File

@ -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