Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Javadocs] Add to o.o.disovery, env, gateway, http, ingest, lucene and node pkgs #3185

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
* Allows to wait for all nodes to reply to the publish of a new cluster state
* and notifies the {@link org.opensearch.discovery.Discovery.AckListener}
* so that the cluster state update can be acknowledged
*
* @opensearch.internal
*/
public class AckClusterStatePublishResponseHandler extends BlockingClusterStatePublishResponseHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
/**
* Handles responses obtained when publishing a new cluster state from cluster-manager to all non cluster-manager nodes.
* Allows to await a reply from all non cluster-manager nodes, up to a timeout
*
* @opensearch.internal
*/
public class BlockingClusterStatePublishResponseHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
* A pluggable module allowing to implement discovery of other nodes, publishing of the cluster
* state to all nodes, electing a cluster-manager of the cluster that raises cluster state change
* events.
*
* @opensearch.internal
*/
public interface Discovery extends LifecycleComponent, ClusterStatePublisher {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@

/**
* A module for loading classes for node discovery.
*
* @opensearch.internal
*/
public class DiscoveryModule {
private static final Logger logger = LogManager.getLogger(DiscoveryModule.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@

import java.io.IOException;

/**
* Stores discovery stats
*
* @opensearch.internal
*/
public class DiscoveryStats implements Writeable, ToXContentFragment {

private final PendingClusterStateStats queueStats;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
* 67.81.244.10
* 67.81.244.11:9305
* 67.81.244.15:9400
*
* @opensearch.internal
*/
public class FileBasedSeedHostsProvider implements SeedHostsProvider {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
import static java.util.Collections.emptyMap;
import static java.util.Collections.emptySet;

/**
* Connector for transport handshake
*
* @opensearch.internal
*/
public class HandshakingTransportAddressConnector implements TransportAddressConnector {

private static final Logger logger = LogManager.getLogger(HandshakingTransportAddressConnector.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@

import java.io.IOException;

/**
* Exception when the cluster-manager is not discovered
*
* @opensearch.internal
*/
public class MasterNotDiscoveredException extends OpenSearchException {

public MasterNotDiscoveredException() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@

import static java.util.Collections.emptyList;

/**
* finds peers
*
* @opensearch.internal
*/
public abstract class PeerFinder {

private static final Logger logger = LogManager.getLogger(PeerFinder.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
import java.util.List;
import java.util.Objects;

/**
* Request sent to a peer node
*
* @opensearch.internal
*/
public class PeersRequest extends TransportRequest {
private final DiscoveryNode sourceNode;
private final List<DiscoveryNode> knownPeers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

/**
* A pluggable provider of the list of seed hosts to use for discovery.
*
* @opensearch.internal
*/
public interface SeedHostsProvider {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
import java.util.function.Consumer;
import java.util.stream.Collectors;

/**
* Resolves seed hosts listed in the config
*
* @opensearch.internal
*/
public class SeedHostsResolver extends AbstractLifecycleComponent implements ConfiguredHostsResolver {
public static final Setting<Integer> LEGACY_DISCOVERY_ZEN_PING_UNICAST_CONCURRENT_CONNECTS_SETTING = Setting.intSetting(
"discovery.zen.ping.unicast.concurrent_connects",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
*
* An example setting might look as follows:
* [67.81.244.10, 67.81.244.11:9305, 67.81.244.15:9400]
*
* @opensearch.internal
*/
public class SettingsBasedSeedHostsProvider implements SeedHostsProvider {

Expand Down
2 changes: 2 additions & 0 deletions server/src/main/java/org/opensearch/env/Environment.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@

/**
* The environment of where things exists.
*
* @opensearch.internal
*/
@SuppressForbidden(reason = "configures paths for the system")
// TODO: move PathUtils to be package-private here instead of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@

/**
* A component that holds all data paths for a single node.
*
* @opensearch.internal
*/
public final class NodeEnvironment implements Closeable {
public static class NodePath {
Expand Down
2 changes: 2 additions & 0 deletions server/src/main/java/org/opensearch/env/NodeMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
/**
* Metadata associated with this node: its persistent node ID and its version.
* The metadata is persisted in the data folder of this node and is reused across restarts.
*
* @opensearch.internal
*/
public final class NodeMetadata {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@

import static org.opensearch.env.NodeEnvironment.INDICES_FOLDER;

/**
* Command to repurpose a node
*
* @opensearch.internal
*/
public class NodeRepurposeCommand extends OpenSearchNodeCommand {

static final String ABORTED_BY_USER_MSG = OpenSearchNodeCommand.ABORTED_BY_USER_MSG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
* additional features, such as SSD detection and better
* filesystem information for the root filesystem.
* @see Environment#getFileStore(Path)
*
* @opensearch.internal
*/
class OpenSearchFileStore extends FileStore {
/** Underlying filestore */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
import java.nio.file.Path;
import java.util.Arrays;

/**
* Command to override a node version
*
* @opensearch.internal
*/
public class OverrideNodeVersionCommand extends OpenSearchNodeCommand {
private static final String TOO_NEW_MESSAGE = DELIMITER
+ "\n"
Expand Down
2 changes: 2 additions & 0 deletions server/src/main/java/org/opensearch/env/ShardLock.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
* before executing any write operations on the shards data directory.
*
* @see NodeEnvironment
*
* @opensearch.internal
*/
public abstract class ShardLock implements Closeable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

/**
* Exception used when the in-memory lock for a shard cannot be obtained
*
* @opensearch.internal
*/
public class ShardLockObtainFailedException extends OpenSearchException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
* The async fetch logic maintains a map of which nodes are being fetched from in an async manner,
* and once the results are back, it makes sure to schedule a reroute to make sure those results will
* be taken into account.
*
* @opensearch.internal
*/
public abstract class AsyncShardFetch<T extends BaseNodeResponse> implements Releasable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
*
* Individual implementations of this class are responsible for providing
* the logic to determine to which nodes (if any) those shards are allocated.
*
* @opensearch.internal
*/
public abstract class BaseGatewayShardAllocator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@

import static org.opensearch.gateway.GatewayService.STATE_NOT_RECOVERED_BLOCK;

/**
* Updates cluster state
*
* @opensearch.internal
*/
public class ClusterStateUpdaters {
private static final Logger logger = LogManager.getLogger(ClusterStateUpdaters.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
/**
* This exception is thrown when OpenSearch detects
* an inconsistency in one of it's persistent states.
*
* @opensearch.internal
*/
public class CorruptStateException extends OpenSearchCorruptionException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
* The dangling indices state is responsible for finding new dangling indices (indices that have
* their state written on disk, but don't exists in the metadata of the cluster), and importing
* them into the cluster.
*
* @opensearch.internal
*/
public class DanglingIndicesState implements ClusterStateListener {

Expand Down
5 changes: 5 additions & 0 deletions server/src/main/java/org/opensearch/gateway/Gateway.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
import java.util.Arrays;
import java.util.function.Function;

/**
* The Gateway
*
* @opensearch.internal
*/
public class Gateway {

private static final Logger logger = LogManager.getLogger(Gateway.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;

/**
* Allocator for the gateway
*
* @opensearch.internal
*/
public class GatewayAllocator implements ExistingShardsAllocator {

public static final String ALLOCATOR_NAME = "gateway_allocator";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@

import java.io.IOException;

/**
* Base Exception for the gateway
*
* @opensearch.internal
*/
public class GatewayException extends OpenSearchException {

public GatewayException(StreamInput in) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@
* the state being loaded when constructing the instance of this class is not necessarily the state that will be used as {@link
* ClusterState#metadata()} because it might be stale or incomplete. Cluster-manager-eligible nodes must perform an election to find a complete and
* non-stale state, and cluster-manager-ineligible nodes receive the real cluster state from the elected cluster-manager after joining the cluster.
*
* @opensearch.internal
*/
public class GatewayMetaState implements Closeable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@

import org.opensearch.common.inject.AbstractModule;

/**
* Binds the gateway module
*
* @opensearch.internal
*/
public class GatewayModule extends AbstractModule {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.Function;

/**
* The Gateway Service provider
*
* @opensearch.internal
*/
public class GatewayService extends AbstractLifecycleComponent implements ClusterStateListener {
private static final Logger logger = LogManager.getLogger(GatewayService.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@

/**
* Tracks the metadata written to disk, allowing updated metadata to be written incrementally (i.e. only writing out the changed metadata).
*
* @opensearch.internal
*/
public class IncrementalClusterStateWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@

import static org.opensearch.cluster.metadata.MetadataIndexStateService.isIndexVerifiedBeforeClosed;

/**
* Allocates dangled indices
*
* @opensearch.internal
*/
public class LocalAllocateDangledIndices {

private static final Logger logger = LogManager.getLogger(LocalAllocateDangledIndices.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@

/**
* Handles writing and loading {@link Manifest}, {@link Metadata} and {@link IndexMetadata}
*
* @opensearch.internal
*/
public class MetaStateService {
private static final Logger logger = LogManager.getLogger(MetaStateService.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@
* MetadataStateFormat is a base class to write checksummed
* XContent based files to one or more directories in a standardized directory structure.
* @param <T> the type of the XContent base data-structure
*
* @opensearch.internal
*/
public abstract class MetadataStateFormat<T> {
public static final XContentType FORMAT = XContentType.SMILE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@
* +---------------------------+-------------------------+-------------------------------------------------------------------------------+
*
* (the last-accepted term is recorded in Metadata → CoordinationMetadata so does not need repeating here)
*
* @opensearch.internal
*/
public class PersistedClusterStateService {
private static final Logger logger = LogManager.getLogger(PersistedClusterStateService.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
* (see {@link org.opensearch.cluster.routing.allocation.allocator.BalancedShardsAllocator}),
* nor does it allocate primaries when a primary shard failed and there is a valid replica
* copy that can immediately be promoted to primary, as this takes place in {@link RoutingNodes#failShard}.
*
* @opensearch.internal
*/
public abstract class PrimaryShardAllocator extends BaseGatewayShardAllocator {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
* <li>Lastly the index names are compared, which is useful when a date is baked into the index
* name, e.g. <code>logstash-2015.05.03</code></li>
* </ol>
*
* @opensearch.internal
*/
public abstract class PriorityComparator implements Comparator<ShardRouting> {

Expand Down
Loading