diff --git a/server/src/main/java/org/opensearch/action/DocWriteResponse.java b/server/src/main/java/org/opensearch/action/DocWriteResponse.java index 5247b0264064a..b55624ff514e4 100644 --- a/server/src/main/java/org/opensearch/action/DocWriteResponse.java +++ b/server/src/main/java/org/opensearch/action/DocWriteResponse.java @@ -391,6 +391,8 @@ protected static void parseInnerToXContent(XContentParser parser, Builder contex * Base class of all {@link DocWriteResponse} builders. These {@link DocWriteResponse.Builder} are used during * xcontent parsing to temporarily store the parsed values, then the {@link Builder#build()} method is called to * instantiate the appropriate {@link DocWriteResponse} with the parsed values. + * + * @opensearch.internal */ public abstract static class Builder { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java index 4c4519c890d90..4274bc9be188c 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/hotthreads/TransportNodesHotThreadsAction.java @@ -107,6 +107,11 @@ protected NodeHotThreads nodeOperation(NodeRequest request) { } } + /** + * Inner node request + * + * @opensearch.internal + */ public static class NodeRequest extends BaseNodeRequest { NodesHotThreadsRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/TransportNodesInfoAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/TransportNodesInfoAction.java index 52f53f4c1368e..7aa04f029f3ba 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/info/TransportNodesInfoAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/info/TransportNodesInfoAction.java @@ -116,6 +116,11 @@ protected NodeInfo nodeOperation(NodeInfoRequest nodeRequest) { ); } + /** + * Inner Node Info Request + * + * @opensearch.internal + */ public static class NodeInfoRequest extends BaseNodeRequest { NodesInfoRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsResponse.java index 9dd8596b86260..40bdee3d288a5 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/NodesReloadSecureSettingsResponse.java @@ -103,6 +103,11 @@ public String toString() { } } + /** + * Inner Node Response + * + * @opensearch.internal + */ public static class NodeResponse extends BaseNodeResponse { private Exception reloadException = null; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/TransportNodesReloadSecureSettingsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/TransportNodesReloadSecureSettingsAction.java index e51ba62c804d7..eeed105d8407b 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/TransportNodesReloadSecureSettingsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/reload/TransportNodesReloadSecureSettingsAction.java @@ -178,6 +178,11 @@ protected NodesReloadSecureSettingsResponse.NodeResponse nodeOperation(NodeReque } } + /** + * Inner Node Request + * + * @opensearch.internal + */ public static class NodeRequest extends BaseNodeRequest { NodesReloadSecureSettingsRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java index b7ea714de4eb4..9daf67b2152e6 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/stats/TransportNodesStatsAction.java @@ -117,6 +117,11 @@ protected NodeStats nodeOperation(NodeStatsRequest nodeStatsRequest) { ); } + /** + * Inner Node Stats Request + * + * @opensearch.internal + */ public static class NodeStatsRequest extends BaseNodeRequest { NodesStatsRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TaskGroup.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TaskGroup.java index 6d1d96bfd7869..68e04141a3cfd 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TaskGroup.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/tasks/list/TaskGroup.java @@ -60,6 +60,11 @@ public static Builder builder(TaskInfo taskInfo) { return new Builder(taskInfo); } + /** + * Builder for the Task Group + * + * @opensearch.internal + */ public static class Builder { private TaskInfo taskInfo; private List childTasks; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/TransportNodesUsageAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/TransportNodesUsageAction.java index 207a5eb41c85d..5906184b8b629 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/TransportNodesUsageAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/node/usage/TransportNodesUsageAction.java @@ -107,6 +107,11 @@ protected NodeUsage nodeOperation(NodeUsageRequest nodeUsageRequest) { return new NodeUsage(clusterService.localNode(), System.currentTimeMillis(), sinceTime, restUsage, aggsUsage); } + /** + * Inner Node Usage Request + * + * @opensearch.internal + */ public static class NodeUsageRequest extends BaseNodeRequest { NodesUsageRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryResponse.java index f31189f3073e0..97b69760c4f36 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/repositories/verify/VerifyRepositoryResponse.java @@ -58,6 +58,11 @@ public class VerifyRepositoryResponse extends ActionResponse implements ToXConte static final String NODES = "nodes"; static final String NAME = "name"; + /** + * Inner Node View + * + * @opensearch.internal + */ public static class NodeView implements Writeable, ToXContentObject { private static final ObjectParser.NamedObjectParser PARSER; static { diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java index c0e3d30fdb702..385bd64d40f9a 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/reroute/TransportClusterRerouteAction.java @@ -209,6 +209,11 @@ private void submitStateUpdate(final ClusterRerouteRequest request, final Action ); } + /** + * Inner Reroute Response Acknowledged the Cluster State Update + * + * @opensearch.internal + */ static class ClusterRerouteResponseAckedClusterStateUpdateTask extends AckedClusterStateUpdateTask { private final ClusterRerouteRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java index 74ac12b951dc8..41ee6719f75e5 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexShardStatus.java @@ -161,6 +161,11 @@ public void writeTo(StreamOutput out) throws IOException { out.writeOptionalString(failure); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String STAGE = "stage"; static final String REASON = "reason"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexStatus.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexStatus.java index 63cbc0a18ffff..ae85458a7acb1 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotIndexStatus.java @@ -122,6 +122,11 @@ public Iterator iterator() { return indexShards.values().iterator(); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String SHARDS = "shards"; } diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotShardsStats.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotShardsStats.java index b945ba20afe80..be4299041e42e 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotShardsStats.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotShardsStats.java @@ -139,6 +139,11 @@ public int getTotalShards() { return totalShards; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String SHARDS_STATS = "shards_stats"; static final String INITIALIZING = "initializing"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStats.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStats.java index 3f348e47c4f4a..74f5c5175882a 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStats.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/SnapshotStats.java @@ -165,6 +165,11 @@ public void writeTo(StreamOutput out) throws IOException { out.writeVLong(totalSize); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String STATS = "stats"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java index b5247141739b7..20e626ab02e68 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/snapshots/status/TransportNodesSnapshotsStatus.java @@ -143,6 +143,11 @@ protected NodeSnapshotStatus nodeOperation(NodeRequest request) { } } + /** + * Inner Request + * + * @opensearch.internal + */ public static class Request extends BaseNodesRequest { private Snapshot[] snapshots; @@ -169,6 +174,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner Node Snapshot Status + * + * @opensearch.internal + */ public static class NodesSnapshotStatus extends BaseNodesResponse { public NodesSnapshotStatus(StreamInput in) throws IOException { @@ -190,6 +200,11 @@ protected void writeNodesTo(StreamOutput out, List nodes) th } } + /** + * Inner Node Request + * + * @opensearch.internal + */ public static class NodeRequest extends BaseNodeRequest { private final List snapshots; @@ -210,6 +225,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner Node Shapshot Status + * + * @opensearch.internal + */ public static class NodeSnapshotStatus extends BaseNodeResponse { private final Map> status; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIndices.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIndices.java index dd74c2ad66a9b..6b9ba90dde9ea 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIndices.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIndices.java @@ -144,6 +144,11 @@ public AnalysisStats getAnalysis() { return analysis; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String COUNT = "count"; } @@ -167,6 +172,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Inner Shard Stats + * + * @opensearch.internal + */ public static class ShardStats implements ToXContentFragment { int indices; @@ -311,6 +321,11 @@ public void addIndexShardCount(ShardStats indexShardCount) { } } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String SHARDS = "shards"; static final String TOTAL = "total"; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodes.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodes.java index fbca94780f827..7d23ba6fa3a14 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodes.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/ClusterStatsNodes.java @@ -145,6 +145,11 @@ public Set getPlugins() { return plugins; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String COUNT = "count"; static final String VERSIONS = "versions"; @@ -202,6 +207,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Inner Counts + * + * @opensearch.internal + */ public static class Counts implements ToXContentFragment { static final String COORDINATING_ONLY = "coordinating_only"; @@ -246,6 +256,11 @@ public Map getRoles() { return roles; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String TOTAL = "total"; } @@ -260,6 +275,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner Operating System Stats + * + * @opensearch.internal + */ public static class OsStats implements ToXContentFragment { final int availableProcessors; final int allocatedProcessors; @@ -318,6 +338,11 @@ public org.opensearch.monitor.os.OsStats.Mem getMem() { return mem; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String AVAILABLE_PROCESSORS = "available_processors"; static final String ALLOCATED_PROCESSORS = "allocated_processors"; @@ -361,6 +386,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner Process Stats + * + * @opensearch.internal + */ public static class ProcessStats implements ToXContentFragment { final int count; @@ -431,6 +461,11 @@ public long getMinOpenFileDescriptors() { return minOpenFileDescriptors; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String CPU = "cpu"; static final String PERCENT = "percent"; @@ -454,6 +489,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner JVM Stats + * + * @opensearch.internal + */ public static class JvmStats implements ToXContentFragment { private final ObjectIntHashMap versions; @@ -527,6 +567,11 @@ public ByteSizeValue getHeapMax() { return new ByteSizeValue(heapMax); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String VERSIONS = "versions"; static final String VERSION = "version"; @@ -572,6 +617,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner JVM Version + * + * @opensearch.internal + */ public static class JvmVersion { String version; String vmName; @@ -609,6 +659,11 @@ public int hashCode() { } } + /** + * Inner Network Types + * + * @opensearch.internal + */ static class NetworkTypes implements ToXContentFragment { private final Map transportTypes; @@ -652,6 +707,11 @@ public XContentBuilder toXContent(final XContentBuilder builder, final Params pa } + /** + * Inner Discovery Types + * + * @opensearch.internal + */ static class DiscoveryTypes implements ToXContentFragment { private final Map discoveryTypes; @@ -677,6 +737,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws } } + /** + * Inner Packaging Types + * + * @opensearch.internal + */ static class PackagingTypes implements ToXContentFragment { private final Map packagingTypes; @@ -709,6 +774,11 @@ public XContentBuilder toXContent(final XContentBuilder builder, final Params pa } + /** + * Inner Ingest Stats + * + * @opensearch.internal + */ static class IngestStats implements ToXContentFragment { final int pipelineCount; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/stats/TransportClusterStatsAction.java b/server/src/main/java/org/opensearch/action/admin/cluster/stats/TransportClusterStatsAction.java index c0d7519e79862..bf0deb71f4134 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/stats/TransportClusterStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/stats/TransportClusterStatsAction.java @@ -206,6 +206,11 @@ protected ClusterStatsNodeResponse nodeOperation(ClusterStatsNodeRequest nodeReq } + /** + * Inner Cluster Stats Node Request + * + * @opensearch.internal + */ public static class ClusterStatsNodeRequest extends BaseNodeRequest { ClusterStatsRequest request; diff --git a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksResponse.java b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksResponse.java index 5b355f9f00166..bab71f776c7d0 100644 --- a/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/cluster/tasks/PendingClusterTasksResponse.java @@ -108,6 +108,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String TASKS = "tasks"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java index 9481e6287c878..587c5c3c7a5a8 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/alias/IndicesAliasesRequest.java @@ -97,6 +97,8 @@ public IndicesAliasesRequest() {} /** * Request to take one or more actions on one or more indexes and alias combinations. + * + * @opensearch.internal */ public static class AliasActions implements AliasesRequest, Writeable, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeAction.java index 592575d9b6019..aa4587b93ff87 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/analyze/AnalyzeAction.java @@ -71,6 +71,8 @@ private AnalyzeAction() { /** * A request to analyze a text associated with a specific index. Allow to provide * the actual analyzer name to perform the analysis with. + * + * @opensearch.internal */ public static class Request extends SingleShardRequest { @@ -298,6 +300,11 @@ public static Request fromXContent(XContentParser parser, String index) throws I } + /** + * Inner Response + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { private final DetailAnalyzeResponse detail; @@ -400,6 +407,11 @@ public String toString() { return Strings.toString(this, true, true); } + /** + * Inner Fields used for creating XContent and parsing + * + * @opensearch.internal + */ static final class Fields { static final String TOKENS = "tokens"; @@ -407,6 +419,11 @@ static final class Fields { } } + /** + * Inner Analyze Token + * + * @opensearch.internal + */ public static class AnalyzeToken implements Writeable, ToXContentObject { private final String term; private final int startOffset; @@ -540,6 +557,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner Detail Analyze Response + * + * @opensearch.internal + */ public static class DetailAnalyzeResponse implements Writeable, ToXContentFragment { private final boolean customAnalyzer; @@ -702,6 +724,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner Analyze Token List + * + * @opensearch.internal + */ public static class AnalyzeTokenList implements Writeable, ToXContentObject { private final String name; private final AnalyzeToken[] tokens; @@ -794,6 +821,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Inner character filtered text + * + * @opensearch.internal + */ public static class CharFilteredText implements Writeable, ToXContentObject { private final String name; private final String[] texts; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java b/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java index cf578af8dbacb..f9fc16fe26e9a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/analyze/TransportAnalyzeAction.java @@ -465,6 +465,11 @@ private static String writeCharStream(Reader input) { return sb.toString(); } + /** + * Inner Token Counter + * + * @opensearch.internal + */ private static class TokenCounter { private int tokenCount = 0; private int maxTokenCount; @@ -486,6 +491,11 @@ private void increment() { } } + /** + * Inner Token List Creator + * + * @opensearch.internal + */ private static class TokenListCreator { int lastPosition = -1; int lastOffset = 0; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexResponse.java index 998ffc4af7028..93bf90f741a75 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/CloseIndexResponse.java @@ -100,6 +100,11 @@ public String toString() { return Strings.toString(this); } + /** + * Inner index result + * + * @opensearch.internal + */ public static class IndexResult implements Writeable, ToXContentFragment { private final Index index; @@ -195,6 +200,11 @@ public String toString() { } } + /** + * Shard Result from Close Index Response + * + * @opensearch.internal + */ public static class ShardResult implements Writeable, ToXContentFragment { private final int id; @@ -248,6 +258,11 @@ public String toString() { return Strings.toString(this); } + /** + * Inner Failure if something goes wrong + * + * @opensearch.internal + */ public static class Failure extends DefaultShardOperationFailedException { private @Nullable String nodeId; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/close/TransportVerifyShardBeforeCloseAction.java b/server/src/main/java/org/opensearch/action/admin/indices/close/TransportVerifyShardBeforeCloseAction.java index 8baf1f5d851ad..642026c15d81e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/close/TransportVerifyShardBeforeCloseAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/close/TransportVerifyShardBeforeCloseAction.java @@ -186,6 +186,11 @@ public void markShardCopyAsStaleIfNeeded( } } + /** + * Shard Request for verifying shards before closing + * + * @opensearch.internal + */ public static class ShardRequest extends ReplicationRequest { private final ClusterBlock clusterBlock; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/create/AutoCreateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/create/AutoCreateAction.java index 23cb728540ab3..fc4acf5abba0f 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/create/AutoCreateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/create/AutoCreateAction.java @@ -72,6 +72,11 @@ private AutoCreateAction() { super(NAME, CreateIndexResponse::new); } + /** + * Transport Action for Auto Create + * + * @opensearch.internal + */ public static final class TransportAction extends TransportMasterNodeAction { private final ActiveShardsObserver activeShardsObserver; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java index d412d3e323d68..4ba053078407a 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/dangling/list/ListDanglingIndicesResponse.java @@ -126,7 +126,13 @@ protected void writeNodesTo(StreamOutput out, List implements IndicesRequest { private final String name; @@ -119,6 +124,11 @@ public IndicesOptions indicesOptions() { } } + /** + * Transport Action for Creating Data Stream + * + * @opensearch.internal + */ public static class TransportAction extends TransportMasterNodeAction { private final MetadataCreateDataStreamService metadataCreateDataStreamService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/datastream/DataStreamsStatsAction.java b/server/src/main/java/org/opensearch/action/admin/indices/datastream/DataStreamsStatsAction.java index cca6b83015ecc..ef2b7e566ce0d 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/datastream/DataStreamsStatsAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/datastream/DataStreamsStatsAction.java @@ -87,6 +87,11 @@ public DataStreamsStatsAction() { super(NAME, DataStreamsStatsAction.Response::new); } + /** + * Request for Data Streams Stats + * + * @opensearch.internal + */ public static class Request extends BroadcastRequest { public Request() { super((String[]) null); @@ -97,6 +102,11 @@ public Request(StreamInput in) throws IOException { } } + /** + * Response for Data Streams Stats + * + * @opensearch.internal + */ public static class Response extends BroadcastResponse { private final int dataStreamCount; private final int backingIndices; @@ -198,6 +208,11 @@ public String toString() { } } + /** + * The Data Streams Stats container + * + * @opensearch.internal + */ public static class DataStreamStats implements ToXContentObject, Writeable { private final String dataStream; private final int backingIndices; @@ -289,6 +304,11 @@ public String toString() { } } + /** + * Per Shard Data Stream stats + * + * @opensearch.internal + */ public static class DataStreamShardStats implements Writeable { private final ShardRouting shardRouting; private final StoreStats storeStats; @@ -326,12 +346,22 @@ public long getMaxTimestamp() { } } + /** + * Aggregated data Stream stats + * + * @opensearch.internal + */ private static class AggregatedStats { Set backingIndices = new HashSet<>(); long storageBytes = 0L; long maxTimestamp = 0L; } + /** + * Transport Action for Data Stream Stats + * + * @opensearch.internal + */ public static class TransportAction extends TransportBroadcastByNodeAction { private final ClusterService clusterService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/datastream/DeleteDataStreamAction.java b/server/src/main/java/org/opensearch/action/admin/indices/datastream/DeleteDataStreamAction.java index 5d79f51cbab65..0fcb343c59055 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/datastream/DeleteDataStreamAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/datastream/DeleteDataStreamAction.java @@ -84,6 +84,11 @@ private DeleteDataStreamAction() { super(NAME, AcknowledgedResponse::new); } + /** + * Request for deleting data streams + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest implements IndicesRequest.Replaceable { private String[] names; @@ -149,6 +154,11 @@ public IndicesRequest indices(String... indices) { } } + /** + * Transport action for deleting data streams + * + * @opensearch.internal + */ public static class TransportAction extends TransportMasterNodeAction { private final MetadataDeleteIndexService deleteIndexService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/datastream/GetDataStreamAction.java b/server/src/main/java/org/opensearch/action/admin/indices/datastream/GetDataStreamAction.java index d519c80f6d6c2..3b57063034e7b 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/datastream/GetDataStreamAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/datastream/GetDataStreamAction.java @@ -82,6 +82,11 @@ private GetDataStreamAction() { super(NAME, Response::new); } + /** + * Request for getting data streams + * + * @opensearch.internal + */ public static class Request extends MasterNodeReadRequest implements IndicesRequest.Replaceable { private String[] names; @@ -143,9 +148,19 @@ public IndicesRequest indices(String... indices) { } } + /** + * Response for getting data streams + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { public static final ParseField DATASTREAMS_FIELD = new ParseField("data_streams"); + /** + * Data streams information + * + * @opensearch.internal + */ public static class DataStreamInfo extends AbstractDiffable implements ToXContentObject { public static final ParseField STATUS_FIELD = new ParseField("status"); @@ -262,6 +277,11 @@ public int hashCode() { } } + /** + * Transport Action for getting data streams + * + * @opensearch.internal + */ public static class TransportAction extends TransportMasterNodeReadAction { private static final Logger logger = LogManager.getLogger(TransportAction.class); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportShardFlushAction.java b/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportShardFlushAction.java index 53e774306e746..20ba92faaec41 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportShardFlushAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/flush/TransportShardFlushAction.java @@ -120,6 +120,11 @@ protected void shardOperationOnReplica(ShardFlushRequest request, IndexShard rep // TODO: Remove this transition in OpenSearch 3.0 private static final String PRE_SYNCED_FLUSH_ACTION_NAME = "internal:indices/flush/synced/pre"; + /** + * A Pre Shard Synced Flush Request + * + * @opensearch.internal + */ private static class PreShardSyncedFlushRequest extends TransportRequest { private final ShardId shardId; @@ -141,6 +146,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * Pre synced flush handler for the transport layer + * + * @opensearch.internal + */ private static final class PreSyncedFlushTransportHandler implements TransportRequestHandler { private final IndicesService indicesService; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequest.java index 605f39ffd1312..780c545dcdbae 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/forcemerge/ForceMergeRequest.java @@ -57,6 +57,11 @@ */ public class ForceMergeRequest extends BroadcastRequest { + /** + * Defaults for the Force Merge Request + * + * @opensearch.internal + */ public static final class Defaults { public static final int MAX_NUM_SEGMENTS = -1; public static final boolean ONLY_EXPUNGE_DELETES = false; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java index 12024ef455a32..7b37920e84d82 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/mapping/get/GetFieldMappingsResponse.java @@ -173,6 +173,11 @@ private void addFieldMappingsToBuilder(XContentBuilder builder, Params params, M } } + /** + * Metadata for field mappings for toXContent + * + * @opensearch.internal + */ public static class FieldMappingMetadata implements ToXContentFragment { private static final ParseField FULL_NAME = new ParseField("full_name"); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockResponse.java index 036a8ec635efc..5f67d6f491cfc 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/AddIndexBlockResponse.java @@ -90,6 +90,11 @@ public String toString() { return Strings.toString(this); } + /** + * Result for adding a block + * + * @opensearch.internal + */ public static class AddBlockResult implements Writeable, ToXContentFragment { private final Index index; @@ -185,6 +190,11 @@ public String toString() { } } + /** + * Per shard result for adding a block + * + * @opensearch.internal + */ public static class AddBlockShardResult implements Writeable, ToXContentFragment { private final int id; @@ -239,6 +249,11 @@ public String toString() { return Strings.toString(this); } + /** + * Contains failure information + * + * @opensearch.internal + */ public static class Failure extends DefaultShardOperationFailedException { private @Nullable String nodeId; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportVerifyShardIndexBlockAction.java b/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportVerifyShardIndexBlockAction.java index c96a94476c1fb..edf3efbbb190f 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportVerifyShardIndexBlockAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/readonly/TransportVerifyShardIndexBlockAction.java @@ -168,6 +168,8 @@ protected ReplicationOperation.Replicas newReplicasProxy() { * A {@link ReplicasProxy} that marks as stale the shards that are unavailable during the verification * and the flush of the shard. This is done to ensure that such shards won't be later promoted as primary * or reopened in an unverified state with potential non flushed translog operations. + * + * @opensearch.internal */ class VerifyShardReadOnlyActionReplicasProxy extends ReplicasProxy { @Override @@ -181,6 +183,11 @@ public void markShardCopyAsStaleIfNeeded( } } + /** + * Per shard request + * + * @opensearch.internal + */ public static class ShardRequest extends ReplicationRequest { private final ClusterBlock clusterBlock; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/resolve/ResolveIndexAction.java b/server/src/main/java/org/opensearch/action/admin/indices/resolve/ResolveIndexAction.java index 8a9df3f59bc4c..381fa6d933344 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/resolve/ResolveIndexAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/resolve/ResolveIndexAction.java @@ -88,6 +88,11 @@ private ResolveIndexAction() { super(NAME, Response::new); } + /** + * Request for resolving an index + * + * @opensearch.internal + */ public static class Request extends ActionRequest implements IndicesRequest.Replaceable { public static final IndicesOptions DEFAULT_INDICES_OPTIONS = IndicesOptions.strictExpandOpen(); @@ -157,6 +162,11 @@ public boolean includeDataStreams() { } } + /** + * Abstraction class for resolving an index + * + * @opensearch.internal + */ public static class ResolvedIndexAbstraction { static final ParseField NAME_FIELD = new ParseField("name"); @@ -178,6 +188,11 @@ public String getName() { } } + /** + * The resolved index + * + * @opensearch.internal + */ public static class ResolvedIndex extends ResolvedIndexAbstraction implements Writeable, ToXContentObject { static final ParseField ALIASES_FIELD = new ParseField("aliases"); @@ -261,6 +276,11 @@ public int hashCode() { } } + /** + * The resolved index alias + * + * @opensearch.internal + */ public static class ResolvedAlias extends ResolvedIndexAbstraction implements Writeable, ToXContentObject { static final ParseField INDICES_FIELD = new ParseField("indices"); @@ -318,6 +338,11 @@ public int hashCode() { } } + /** + * The resolved data stream + * + * @opensearch.internal + */ public static class ResolvedDataStream extends ResolvedIndexAbstraction implements Writeable, ToXContentObject { static final ParseField BACKING_INDICES_FIELD = new ParseField("backing_indices"); @@ -385,6 +410,11 @@ public int hashCode() { } } + /** + * Response for resolving an index + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { static final ParseField INDICES_FIELD = new ParseField("indices"); @@ -450,6 +480,11 @@ public int hashCode() { } } + /** + * Transport action for resolving an index + * + * @opensearch.internal + */ public static class TransportAction extends HandledTransportAction { private final ThreadPool threadPool; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/Condition.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/Condition.java index 7b2707ed16ca2..e997d9b00e17b 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/Condition.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/Condition.java @@ -93,6 +93,8 @@ public String name() { /** * Holder for index stats used to evaluate conditions + * + * @opensearch.internal */ public static class Stats { public final long numDocs; @@ -108,6 +110,8 @@ public Stats(long numDocs, long indexCreated, ByteSizeValue indexSize) { /** * Holder for evaluated condition result + * + * @opensearch.internal */ public static class Result { public final Condition condition; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MetadataRolloverService.java b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MetadataRolloverService.java index 19a7b8c95199b..3f85d9a1cd143 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/rollover/MetadataRolloverService.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/rollover/MetadataRolloverService.java @@ -92,6 +92,11 @@ public MetadataRolloverService( this.indexNameExpressionResolver = indexNameExpressionResolver; } + /** + * Result for rollover request + * + * @opensearch.internal + */ public static class RolloverResult { public final String rolloverIndexName; public final String sourceIndexName; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponse.java index 82fe438236d0f..37433b91c1033 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/segments/IndicesSegmentResponse.java @@ -207,6 +207,11 @@ private static void toXContent(XContentBuilder builder, Accountable tree) throws builder.endObject(); } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String INDICES = "indices"; static final String SHARDS = "shards"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresResponse.java index d09bf99ca7258..0d050533ccbc4 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shards/IndicesShardStoresResponse.java @@ -61,6 +61,8 @@ public class IndicesShardStoresResponse extends ActionResponse implements ToXCon /** * Shard store information from a node + * + * @opensearch.internal */ public static class StoreStatus implements Writeable, ToXContentFragment, Comparable { private final DiscoveryNode node; @@ -231,6 +233,8 @@ public int compareTo(StoreStatus other) { /** * Single node failure while retrieving shard store information + * + * @opensearch.internal */ public static class Failure extends DefaultShardOperationFailedException { private String nodeId; @@ -367,6 +371,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String INDICES = "indices"; static final String SHARDS = "shards"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java b/server/src/main/java/org/opensearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java index 32acd9e305130..6e3444e3758b1 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/shards/TransportIndicesShardStoresAction.java @@ -160,6 +160,11 @@ protected ClusterBlockException checkBlock(IndicesShardStoresRequest request, Cl .indicesBlockedException(ClusterBlockLevel.METADATA_READ, indexNameExpressionResolver.concreteIndexNames(state, request)); } + /** + * Information for async shard stores + * + * @opensearch.internal + */ private class AsyncShardStoresInfoFetches { private final DiscoveryNodes nodes; private final RoutingNodes routingNodes; @@ -193,6 +198,11 @@ void start() { } } + /** + * Internal async fetch + * + * @opensearch.internal + */ private class InternalAsyncFetch extends AsyncShardFetch { InternalAsyncFetch( @@ -307,6 +317,11 @@ protected void reroute(ShardId shardId, String reason) { // no-op } + /** + * Response for shard stores action + * + * @opensearch.internal + */ public class Response { private final ShardId shardId; private final List responses; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexStats.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexStats.java index f0eec4ebbd27a..b7cfe4ee6db33 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexStats.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndexStats.java @@ -127,6 +127,11 @@ public CommonStats getPrimaries() { return stats; } + /** + * Builder for Index Stats + * + * @opensearch.internal + */ public static class IndexStatsBuilder { private final String indexName; private final String uuid; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsResponse.java index 3614d8de6c884..38ad4a0dca481 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/IndicesStatsResponse.java @@ -208,6 +208,11 @@ protected void addCustomXContentFields(XContentBuilder builder, Params params) t } } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String INDICES = "indices"; static final String SHARDS = "shards"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/stats/ShardStats.java b/server/src/main/java/org/opensearch/action/admin/indices/stats/ShardStats.java index c5d3fba2a5805..bab1d793f50b5 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/stats/ShardStats.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/stats/ShardStats.java @@ -172,6 +172,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String ROUTING = "routing"; static final String STATE = "state"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComponentTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComponentTemplateAction.java index 1a4f0a1892ec7..3a05d99f65247 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComponentTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComponentTemplateAction.java @@ -52,6 +52,11 @@ private DeleteComponentTemplateAction() { super(NAME, AcknowledgedResponse::new); } + /** + * Inner Request class for deleting component template + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest { private String name; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComposableIndexTemplateAction.java index bc8b96f6259e8..635755e1be5ca 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComposableIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/delete/DeleteComposableIndexTemplateAction.java @@ -53,6 +53,11 @@ private DeleteComposableIndexTemplateAction() { super(NAME, AcknowledgedResponse::new); } + /** + * Inner Request class for deleting composable index template + * + * @opensearch.internal + */ public static class Request extends MasterNodeRequest { private String name; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComponentTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComponentTemplateAction.java index 7f01ec0717332..286be16ea9660 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComponentTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComponentTemplateAction.java @@ -62,6 +62,8 @@ private GetComponentTemplateAction() { /** * Request that to retrieve one or more component templates + * + * @opensearch.internal */ public static class Request extends MasterNodeReadRequest { @@ -106,6 +108,11 @@ public String name() { } } + /** + * Inner response for getting component template + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { public static final ParseField NAME = new ParseField("name"); public static final ParseField COMPONENT_TEMPLATES = new ParseField("component_templates"); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComposableIndexTemplateAction.java index 5f7ccb0b4f90f..0dc30a57d650e 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComposableIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/get/GetComposableIndexTemplateAction.java @@ -59,6 +59,8 @@ private GetComposableIndexTemplateAction() { /** * Request that to retrieve one or more index templates + * + * @opensearch.internal */ public static class Request extends MasterNodeReadRequest { @@ -120,6 +122,11 @@ public boolean equals(Object obj) { } } + /** + * Inner response for getting composable index template + * + * @opensearch.internal + */ public static class Response extends ActionResponse implements ToXContentObject { public static final ParseField NAME = new ParseField("name"); public static final ParseField INDEX_TEMPLATES = new ParseField("index_templates"); diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateTemplateAction.java index f53925e8abd50..744f401c87941 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/post/SimulateTemplateAction.java @@ -57,6 +57,11 @@ private SimulateTemplateAction() { super(NAME, SimulateIndexTemplateResponse::new); } + /** + * Request for simulating a template action + * + * @opensearch.internal + */ public static class Request extends MasterNodeReadRequest { @Nullable diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComponentTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComponentTemplateAction.java index 69149b953cc08..ac9905fd6d0ab 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComponentTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComponentTemplateAction.java @@ -60,6 +60,8 @@ private PutComponentTemplateAction() { /** * A request for putting a single component template into the cluster state + * + * @opensearch.internal */ public static class Request extends MasterNodeRequest { private final String name; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComposableIndexTemplateAction.java b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComposableIndexTemplateAction.java index 059f3be745bb0..c3bd81edfb9d6 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComposableIndexTemplateAction.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/template/put/PutComposableIndexTemplateAction.java @@ -62,6 +62,8 @@ private PutComposableIndexTemplateAction() { /** * A request for putting a single index template into the cluster state + * + * @opensearch.internal */ public static class Request extends MasterNodeRequest implements IndicesRequest { private final String name; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusResponse.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusResponse.java index a8bb5cfc8bba1..fbff92f197292 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusResponse.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/get/UpgradeStatusResponse.java @@ -200,6 +200,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String INDICES = "indices"; static final String SHARDS = "shards"; diff --git a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequest.java b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequest.java index 94d07075a8f3e..e9833c51b97a4 100644 --- a/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequest.java +++ b/server/src/main/java/org/opensearch/action/admin/indices/upgrade/post/UpgradeRequest.java @@ -47,6 +47,11 @@ */ public class UpgradeRequest extends BroadcastRequest { + /** + * Default config for Upgrade Requests + * + * @opensearch.internal + */ public static final class Defaults { public static final boolean UPGRADE_ONLY_ANCIENT_SEGMENTS = false; } diff --git a/server/src/main/java/org/opensearch/action/bulk/BackoffPolicy.java b/server/src/main/java/org/opensearch/action/bulk/BackoffPolicy.java index 0b20979c9673e..0b22ee04141ed 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BackoffPolicy.java +++ b/server/src/main/java/org/opensearch/action/bulk/BackoffPolicy.java @@ -119,6 +119,11 @@ private static TimeValue checkDelay(TimeValue delay) { return delay; } + /** + * Concrete No Back Off Policy + * + * @opensearch.internal + */ private static class NoBackoff extends BackoffPolicy { @Override public Iterator iterator() { @@ -136,6 +141,11 @@ public TimeValue next() { } } + /** + * Concrete Exponential Back Off Policy + * + * @opensearch.internal + */ private static class ExponentialBackoff extends BackoffPolicy { private final int start; @@ -154,6 +164,11 @@ public Iterator iterator() { } } + /** + * Concrete Exponential Back Off Iterator + * + * @opensearch.internal + */ private static class ExponentialBackoffIterator implements Iterator { private final int numberOfElements; @@ -182,6 +197,11 @@ public TimeValue next() { } } + /** + * Concrete Constant Back Off Policy + * + * @opensearch.internal + */ private static final class ConstantBackoff extends BackoffPolicy { private final TimeValue delay; @@ -199,6 +219,11 @@ public Iterator iterator() { } } + /** + * Concrete Constant Back Off Iterator + * + * @opensearch.internal + */ private static final class ConstantBackoffIterator implements Iterator { private final TimeValue delay; private final int numberOfElements; @@ -224,6 +249,11 @@ public TimeValue next() { } } + /** + * Concrete Wrapped Back Off Policy + * + * @opensearch.internal + */ private static final class WrappedBackoffPolicy extends BackoffPolicy { private final BackoffPolicy delegate; private final Runnable onBackoff; @@ -239,6 +269,11 @@ public Iterator iterator() { } } + /** + * Concrete Wrapped Back Off Iterator + * + * @opensearch.internal + */ private static final class WrappedBackoffIterator implements Iterator { private final Iterator delegate; private final Runnable onBackoff; diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkItemResponse.java b/server/src/main/java/org/opensearch/action/bulk/BulkItemResponse.java index e3252988c3b35..346e394bbb35e 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkItemResponse.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkItemResponse.java @@ -178,6 +178,8 @@ public static BulkItemResponse fromXContent(XContentParser parser, int id) throw /** * Represents a failure. + * + * @opensearch.internal */ public static class Failure implements Writeable, ToXContentFragment { public static final String INDEX_FIELD = "index"; diff --git a/server/src/main/java/org/opensearch/action/bulk/BulkProcessor.java b/server/src/main/java/org/opensearch/action/bulk/BulkProcessor.java index 166c4a535aaad..0ee289e8f5af7 100644 --- a/server/src/main/java/org/opensearch/action/bulk/BulkProcessor.java +++ b/server/src/main/java/org/opensearch/action/bulk/BulkProcessor.java @@ -94,6 +94,8 @@ public interface Listener { /** * A builder used to create a build an instance of a bulk processor. + * + * @opensearch.internal */ public static class Builder { @@ -545,6 +547,11 @@ public void flush() { } } + /** + * Flush for bulk processor + * + * @opensearch.internal + */ class Flush implements Runnable { @Override public void run() { diff --git a/server/src/main/java/org/opensearch/action/bulk/Retry.java b/server/src/main/java/org/opensearch/action/bulk/Retry.java index 9c7e8cd685b28..fdd4447144008 100644 --- a/server/src/main/java/org/opensearch/action/bulk/Retry.java +++ b/server/src/main/java/org/opensearch/action/bulk/Retry.java @@ -94,6 +94,11 @@ public PlainActionFuture withBackoff( return future; } + /** + * Retry handler + * + * @opensearch.internal + */ static class RetryHandler implements ActionListener { private static final RestStatus RETRY_STATUS = RestStatus.TOO_MANY_REQUESTS; private static final Logger logger = LogManager.getLogger(RetryHandler.class); diff --git a/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java b/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java index e557b6c8e897e..1fabc3b1a7ea8 100644 --- a/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java +++ b/server/src/main/java/org/opensearch/action/bulk/TransportBulkAction.java @@ -483,7 +483,9 @@ private long buildTookInMillis(long startTimeNanos) { /** * retries on retryable cluster blocks, resolves item requests, * constructs shard bulk requests and delegates execution to shard bulk action - * */ + * + * @opensearch.internal + */ private final class BulkOperation extends ActionRunnable { private final Task task; private BulkRequest bulkRequest; // set to null once all requests are sent out @@ -772,6 +774,11 @@ void executeBulk( new BulkOperation(task, bulkRequest, listener, responses, startTimeNanos, indicesThatCannotBeCreated).run(); } + /** + * Concrete indices + * + * @opensearch.internal + */ private static class ConcreteIndices { private final ClusterState state; private final IndexNameExpressionResolver indexNameExpressionResolver; @@ -874,6 +881,11 @@ public boolean isForceExecution() { ); } + /** + * A modifier for a bulk request + * + * @opensearch.internal + */ static final class BulkRequestModifier implements Iterator> { final BulkRequest bulkRequest; diff --git a/server/src/main/java/org/opensearch/action/delete/DeleteResponse.java b/server/src/main/java/org/opensearch/action/delete/DeleteResponse.java index 1d53524cd6c63..46049cdad58bd 100644 --- a/server/src/main/java/org/opensearch/action/delete/DeleteResponse.java +++ b/server/src/main/java/org/opensearch/action/delete/DeleteResponse.java @@ -111,6 +111,8 @@ public static void parseXContentFields(XContentParser parser, Builder context) t * Builder class for {@link DeleteResponse}. This builder is usually used during xcontent parsing to * temporarily store the parsed values, then the {@link DocWriteResponse.Builder#build()} method is called to * instantiate the {@link DeleteResponse}. + * + * @opensearch.internal */ public static class Builder extends DocWriteResponse.Builder { diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilities.java b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilities.java index 67fab82949c24..4fdf8d551af61 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilities.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/FieldCapabilities.java @@ -298,6 +298,11 @@ public String toString() { return Strings.toString(this); } + /** + * Builder for field capabilities + * + * @opensearch.internal + */ static class Builder { private String name; private String type; @@ -387,6 +392,11 @@ FieldCapabilities build(boolean withIndices) { } } + /** + * Inner index capabilities + * + * @opensearch.internal + */ private static class IndexCaps { final String name; final boolean isSearchable; diff --git a/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesIndexAction.java b/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesIndexAction.java index 9b42bc12f82a7..99962741299ca 100644 --- a/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesIndexAction.java +++ b/server/src/main/java/org/opensearch/action/fieldcaps/TransportFieldCapabilitiesIndexAction.java @@ -217,6 +217,8 @@ private ClusterBlockException checkRequestBlock(ClusterState state, String concr * An action that executes on each shard sequentially until it finds one that can match the provided * {@link FieldCapabilitiesIndexRequest#indexFilter()}. In which case the shard is used * to create the final {@link FieldCapabilitiesIndexResponse}. + * + * @opensearch.internal */ class AsyncShardsAction { private final FieldCapabilitiesIndexRequest request; @@ -341,6 +343,11 @@ public void handleException(TransportException exp) { } } + /** + * Shard transport handler for field capabilities index action + * + * @opensearch.internal + */ private class ShardTransportHandler implements TransportRequestHandler { @Override public void messageReceived(final FieldCapabilitiesIndexRequest request, final TransportChannel channel, Task task) diff --git a/server/src/main/java/org/opensearch/action/get/MultiGetRequest.java b/server/src/main/java/org/opensearch/action/get/MultiGetRequest.java index 1196b2f065312..00df8657736ae 100644 --- a/server/src/main/java/org/opensearch/action/get/MultiGetRequest.java +++ b/server/src/main/java/org/opensearch/action/get/MultiGetRequest.java @@ -90,6 +90,8 @@ public class MultiGetRequest extends ActionRequest /** * A single get item. + * + * @opensearch.internal */ public static class Item implements Writeable, IndicesRequest, ToXContentObject { diff --git a/server/src/main/java/org/opensearch/action/get/MultiGetResponse.java b/server/src/main/java/org/opensearch/action/get/MultiGetResponse.java index 674fd73650da1..b3664935b9489 100644 --- a/server/src/main/java/org/opensearch/action/get/MultiGetResponse.java +++ b/server/src/main/java/org/opensearch/action/get/MultiGetResponse.java @@ -66,6 +66,8 @@ public class MultiGetResponse extends ActionResponse implements Iterable { diff --git a/server/src/main/java/org/opensearch/action/resync/TransportResyncReplicationAction.java b/server/src/main/java/org/opensearch/action/resync/TransportResyncReplicationAction.java index f022e325dceb0..2249c7cace943 100644 --- a/server/src/main/java/org/opensearch/action/resync/TransportResyncReplicationAction.java +++ b/server/src/main/java/org/opensearch/action/resync/TransportResyncReplicationAction.java @@ -258,6 +258,8 @@ public void handleException(TransportException exp) { * A proxy for primary-replica resync operations which are performed on replicas when a new primary is promoted. * Replica shards fail to execute resync operations will be failed but won't be marked as stale. * This avoids marking shards as stale during cluster restart but enforces primary-replica resync mandatory. + * + * @opensearch.internal */ class ResyncActionReplicasProxy extends ReplicasProxy { diff --git a/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java b/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java index fd93d5f17fdef..1d6d3f284d546 100644 --- a/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java +++ b/server/src/main/java/org/opensearch/action/search/AbstractSearchAsyncAction.java @@ -751,6 +751,11 @@ void executeNext(Runnable runnable, Thread originalThread) { } } + /** + * Pending Executions + * + * @opensearch.internal + */ private static final class PendingExecutions { private final int permits; private int permitsTaken = 0; diff --git a/server/src/main/java/org/opensearch/action/search/CanMatchPreFilterSearchPhase.java b/server/src/main/java/org/opensearch/action/search/CanMatchPreFilterSearchPhase.java index 816ca45d13c10..ec4d45a0a7124 100644 --- a/server/src/main/java/org/opensearch/action/search/CanMatchPreFilterSearchPhase.java +++ b/server/src/main/java/org/opensearch/action/search/CanMatchPreFilterSearchPhase.java @@ -204,6 +204,11 @@ private static Comparator shardComparator( return comparator.thenComparing(index -> shardsIts.get(index).shardId()); } + /** + * Inner class for determining if canMatch search phase results + * + * @opensearch.internal + */ private static final class CanMatchSearchPhaseResults extends SearchPhaseResults { private final FixedBitSet possibleMatches; private final MinAndMax[] minAndMaxes; diff --git a/server/src/main/java/org/opensearch/action/search/MultiSearchResponse.java b/server/src/main/java/org/opensearch/action/search/MultiSearchResponse.java index 2349b3a0cab9a..6c25a16a65c75 100644 --- a/server/src/main/java/org/opensearch/action/search/MultiSearchResponse.java +++ b/server/src/main/java/org/opensearch/action/search/MultiSearchResponse.java @@ -77,6 +77,8 @@ public class MultiSearchResponse extends ActionResponse implements Iterable buffer = new ArrayList<>(); @@ -498,6 +503,11 @@ public synchronized List consumeAggs() { } } + /** + * A single merge result + * + * @opensearch.internal + */ private static class MergeResult { private final List processedShards; private final TopDocs reducedTopDocs; @@ -517,6 +527,11 @@ private MergeResult( } } + /** + * A single merge task + * + * @opensearch.internal + */ private static class MergeTask { private final List emptyResults; private QuerySearchResult[] buffer; diff --git a/server/src/main/java/org/opensearch/action/search/SearchPhaseController.java b/server/src/main/java/org/opensearch/action/search/SearchPhaseController.java index 4fb940675a5aa..d32e7753cd153 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchPhaseController.java +++ b/server/src/main/java/org/opensearch/action/search/SearchPhaseController.java @@ -613,6 +613,11 @@ static int getTopDocsSize(SearchRequest request) { : source.from()); } + /** + * The reduced query phase + * + * @opensearch.internal + */ public static final class ReducedQueryPhase { // the sum of all hits across all reduces shards final TotalHits totalHits; @@ -714,6 +719,11 @@ QueryPhaseResultConsumer newSearchPhaseResults( ); } + /** + * The top docs statistics + * + * @opensearch.internal + */ static final class TopDocsStats { final int trackTotalHitsUpTo; long totalHits; @@ -778,6 +788,11 @@ void add(TopDocsAndMaxScore topDocs, boolean timedOut, Boolean terminatedEarly) } } + /** + * Top docs that have been sorted + * + * @opensearch.internal + */ static final class SortedTopDocs { static final SortedTopDocs EMPTY = new SortedTopDocs(EMPTY_DOCS, false, null, null, null); // the searches merged top docs diff --git a/server/src/main/java/org/opensearch/action/search/SearchResponse.java b/server/src/main/java/org/opensearch/action/search/SearchResponse.java index a99de14d2a9e3..06ac642a0547f 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchResponse.java +++ b/server/src/main/java/org/opensearch/action/search/SearchResponse.java @@ -475,6 +475,8 @@ public String toString() { /** * Holds info about the clusters that the search was executed on: how many in total, how many of them were successful * and how many of them were skipped. + * + * @opensearch.internal */ public static class Clusters implements ToXContentFragment, Writeable { diff --git a/server/src/main/java/org/opensearch/action/search/SearchResponseMerger.java b/server/src/main/java/org/opensearch/action/search/SearchResponseMerger.java index 9c32da2d122e0..20a7f576071b2 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchResponseMerger.java +++ b/server/src/main/java/org/opensearch/action/search/SearchResponseMerger.java @@ -410,6 +410,11 @@ private static SearchHits topDocsToSearchHits(TopDocs topDocs, SearchPhaseContro ); } + /** + * Holds a field search hit and doc + * + * @opensearch.internal + */ private static final class FieldDocAndSearchHit extends FieldDoc { private final SearchHit searchHit; @@ -426,6 +431,8 @@ private static final class FieldDocAndSearchHit extends FieldDoc { * (see TopDocs#tieBreakLessThan line 86). Generally, indices with same names on different clusters have different index uuids which * make their ShardIds different, which is not the case if the index is really the same one from the same cluster, in which case we * need to look at the cluster alias and make sure to assign a different shardIndex based on that. + * + * @opensearch.internal */ private static final class ShardIdAndClusterAlias implements Comparable { private final ShardId shardId; diff --git a/server/src/main/java/org/opensearch/action/search/SearchTransportService.java b/server/src/main/java/org/opensearch/action/search/SearchTransportService.java index 4a901ebef10ce..f91276960397a 100644 --- a/server/src/main/java/org/opensearch/action/search/SearchTransportService.java +++ b/server/src/main/java/org/opensearch/action/search/SearchTransportService.java @@ -309,6 +309,11 @@ public Map getPendingSearchRequests() { return new HashMap<>(clientConnections); } + /** + * A scroll free context request + * + * @opensearch.internal + */ static class ScrollFreeContextRequest extends TransportRequest { private ShardSearchContextId contextId; @@ -333,6 +338,11 @@ public ShardSearchContextId id() { } + /** + * A search free context request + * + * @opensearch.internal + */ static class SearchFreeContextRequest extends ScrollFreeContextRequest implements IndicesRequest { private OriginalIndices originalIndices; @@ -370,6 +380,11 @@ public IndicesOptions indicesOptions() { } + /** + * A search free context response + * + * @opensearch.internal + */ public static class SearchFreeContextResponse extends TransportResponse { private boolean freed; @@ -564,6 +579,11 @@ public Transport.Connection getConnection(@Nullable String clusterAlias, Discove } } + /** + * A handler that counts connections + * + * @opensearch.internal + */ final class ConnectionCountingHandler extends ActionListenerResponseHandler { private final Map clientConnections; private final String nodeId; diff --git a/server/src/main/java/org/opensearch/action/search/TransportMultiSearchAction.java b/server/src/main/java/org/opensearch/action/search/TransportMultiSearchAction.java index 683b4b3eb2d19..58eb617a3d5fe 100644 --- a/server/src/main/java/org/opensearch/action/search/TransportMultiSearchAction.java +++ b/server/src/main/java/org/opensearch/action/search/TransportMultiSearchAction.java @@ -220,6 +220,11 @@ private long buildTookInMillis() { }); } + /** + * Slots a search request + * + * @opensearch.internal + */ static final class SearchRequestSlot { final SearchRequest request; diff --git a/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java b/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java index 6af56abba99cb..6ab49d975cddd 100644 --- a/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java +++ b/server/src/main/java/org/opensearch/action/search/TransportSearchAction.java @@ -232,6 +232,8 @@ private Map resolveIndexBoosts(SearchRequest searchRequest, Clust * clock for measuring how long an operation took (they often lack precision, they are subject * to moving backwards due to NTP and other such complexities, etc.). There are also issues with * using a relative clock for reporting real time. Thus, we simply separate these two uses. + * + * @opensearch.internal */ static final class SearchTimeProvider { @@ -1222,6 +1224,11 @@ private static void failIfOverShardCountLimit(ClusterService clusterService, int } } + /** + * xcluster search listener + * + * @opensearch.internal + */ abstract static class CCSActionListener implements ActionListener { private final String clusterAlias; private final boolean skipUnavailable; diff --git a/server/src/main/java/org/opensearch/action/support/AutoCreateIndex.java b/server/src/main/java/org/opensearch/action/support/AutoCreateIndex.java index c986730aa74da..f0c8a9a7a11ba 100644 --- a/server/src/main/java/org/opensearch/action/support/AutoCreateIndex.java +++ b/server/src/main/java/org/opensearch/action/support/AutoCreateIndex.java @@ -144,6 +144,11 @@ void setAutoCreate(AutoCreate autoCreate) { this.autoCreate = autoCreate; } + /** + * An auto create object + * + * @opensearch.internal + */ static class AutoCreate { private final boolean autoCreateIndex; private final List> expressions; diff --git a/server/src/main/java/org/opensearch/action/support/HandledTransportAction.java b/server/src/main/java/org/opensearch/action/support/HandledTransportAction.java index e4c6addec40f3..0bc46b21be3b8 100644 --- a/server/src/main/java/org/opensearch/action/support/HandledTransportAction.java +++ b/server/src/main/java/org/opensearch/action/support/HandledTransportAction.java @@ -90,6 +90,11 @@ protected HandledTransportAction( transportService.registerRequestHandler(actionName, executor, false, canTripCircuitBreaker, requestReader, new TransportHandler()); } + /** + * Inner transport handler + * + * @opensearch.internal + */ class TransportHandler implements TransportRequestHandler { @Override public final void messageReceived(final Request request, final TransportChannel channel, Task task) { diff --git a/server/src/main/java/org/opensearch/action/support/ListenerTimeouts.java b/server/src/main/java/org/opensearch/action/support/ListenerTimeouts.java index ffe506905326f..b01320369af6a 100644 --- a/server/src/main/java/org/opensearch/action/support/ListenerTimeouts.java +++ b/server/src/main/java/org/opensearch/action/support/ListenerTimeouts.java @@ -96,6 +96,11 @@ public static ActionListener wrapWithTimeout( return wrappedListener; } + /** + * Listener that can time out + * + * @opensearch.internal + */ private static class TimeoutableListener implements ActionListener, Runnable { private final AtomicBoolean isDone = new AtomicBoolean(false); diff --git a/server/src/main/java/org/opensearch/action/support/TimeoutTaskCancellationUtility.java b/server/src/main/java/org/opensearch/action/support/TimeoutTaskCancellationUtility.java index 759819d803f0e..a98df5b832bf5 100644 --- a/server/src/main/java/org/opensearch/action/support/TimeoutTaskCancellationUtility.java +++ b/server/src/main/java/org/opensearch/action/support/TimeoutTaskCancellationUtility.java @@ -104,6 +104,8 @@ public static ActionListener wrapWithCancellationListener( * Timeout listener which executes the provided runnable after timeout is expired and if a response/failure is not yet received. * If either a response/failure is received before timeout then the scheduled task is cancelled and response/failure is sent back to * the original listener. + * + * @opensearch.internal */ private static class TimeoutRunnableListener implements ActionListener, Runnable { diff --git a/server/src/main/java/org/opensearch/action/support/TransportAction.java b/server/src/main/java/org/opensearch/action/support/TransportAction.java index edcef8ef0c5fd..a60648e50ff31 100644 --- a/server/src/main/java/org/opensearch/action/support/TransportAction.java +++ b/server/src/main/java/org/opensearch/action/support/TransportAction.java @@ -176,6 +176,11 @@ public final void execute(Task task, Request request, ActionListener l protected abstract void doExecute(Task task, Request request, ActionListener listener); + /** + * A request filter chain + * + * @opensearch.internal + */ private static class RequestFilterChain implements ActionFilterChain { @@ -210,6 +215,8 @@ public void proceed(Task task, String actionName, Request request, ActionListene /** * Wrapper for an action listener that stores the result at the end of the execution + * + * @opensearch.internal */ private static class TaskResultStoringActionListener implements ActionListener { private final ActionListener delegate; diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/TransportBroadcastAction.java b/server/src/main/java/org/opensearch/action/support/broadcast/TransportBroadcastAction.java index 728497af8d0d5..a69853dc6a3c0 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/TransportBroadcastAction.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/TransportBroadcastAction.java @@ -124,6 +124,11 @@ protected void doExecute(Task task, Request request, ActionListener li protected abstract ClusterBlockException checkRequestBlock(ClusterState state, Request request, String[] concreteIndices); + /** + * Asynchronous broadcast action + * + * @opensearch.internal + */ protected class AsyncBroadcastAction { private final Task task; @@ -320,6 +325,11 @@ void setFailure(ShardIterator shardIt, int shardIndex, Exception e) { } } + /** + * A shard transport handler + * + * @opensearch.internal + */ class ShardTransportHandler implements TransportRequestHandler { @Override diff --git a/server/src/main/java/org/opensearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java b/server/src/main/java/org/opensearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java index 1c5b71c5a1fb7..f849be4db4e2b 100644 --- a/server/src/main/java/org/opensearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java +++ b/server/src/main/java/org/opensearch/action/support/broadcast/node/TransportBroadcastByNodeAction.java @@ -273,6 +273,11 @@ protected void doExecute(Task task, Request request, ActionListener li new AsyncAction(task, request, listener).start(); } + /** + * Asynchronous action + * + * @opensearch.internal + */ protected class AsyncAction { private final Task task; private final Request request; @@ -443,6 +448,11 @@ protected void onCompletion() { } } + /** + * Broadcast by a node's transport request handler + * + * @opensearch.internal + */ class BroadcastByNodeTransportRequestHandler implements TransportRequestHandler { @Override public void messageReceived(final NodeRequest request, TransportChannel channel, Task task) throws Exception { @@ -522,6 +532,11 @@ private void onShardOperation( } } + /** + * A node request + * + * @opensearch.internal + */ public class NodeRequest extends TransportRequest implements IndicesRequest { private String nodeId; @@ -569,6 +584,11 @@ public void writeTo(StreamOutput out) throws IOException { } } + /** + * A node response + * + * @opensearch.internal + */ class NodeResponse extends TransportResponse { protected String nodeId; protected int totalShards; @@ -633,6 +653,8 @@ public void writeTo(StreamOutput out) throws IOException { /** * Can be used for implementations of {@link #shardOperation(BroadcastRequest, ShardRouting) shardOperation} for * which there is no shard-level return value. + * + * @opensearch.internal */ public static final class EmptyResult implements Writeable { public static EmptyResult INSTANCE = new EmptyResult(); diff --git a/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java index 4ae490018e58f..4e0a180fe0cd4 100644 --- a/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java +++ b/server/src/main/java/org/opensearch/action/support/master/TransportMasterNodeAction.java @@ -142,6 +142,11 @@ protected void doExecute(Task task, final Request request, ActionListener listener; diff --git a/server/src/main/java/org/opensearch/action/support/nodes/TransportNodesAction.java b/server/src/main/java/org/opensearch/action/support/nodes/TransportNodesAction.java index 614740e6bc8a1..18fcdfad0bcc4 100644 --- a/server/src/main/java/org/opensearch/action/support/nodes/TransportNodesAction.java +++ b/server/src/main/java/org/opensearch/action/support/nodes/TransportNodesAction.java @@ -216,6 +216,11 @@ protected String getTransportNodeAction(DiscoveryNode node) { return transportNodeAction; } + /** + * Asynchronous action + * + * @opensearch.internal + */ class AsyncAction { private final NodesRequest request; @@ -311,6 +316,11 @@ private void finishHim() { } } + /** + * A node transport handler + * + * @opensearch.internal + */ class NodeTransportHandler implements TransportRequestHandler { @Override diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java index 6c6da7d9b5753..cf40e872fe9b8 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicationOperation.java @@ -596,6 +596,11 @@ public interface ReplicaResponse { } + /** + * Thrown if there are any errors retrying on primary + * + * @opensearch.internal + */ public static class RetryOnPrimaryException extends OpenSearchException { RetryOnPrimaryException(ShardId shardId, String msg) { this(shardId, msg, null); diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicationResponse.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicationResponse.java index 38fa7ac7520e5..1dfa9e53c5fee 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicationResponse.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicationResponse.java @@ -85,6 +85,11 @@ public void setShardInfo(ShardInfo shardInfo) { this.shardInfo = shardInfo; } + /** + * Holds shard information + * + * @opensearch.internal + */ public static class ShardInfo implements Writeable, ToXContentObject { private static final String TOTAL = "total"; @@ -227,6 +232,11 @@ public String toString() { return "ShardInfo{" + "total=" + total + ", successful=" + successful + ", failures=" + Arrays.toString(failures) + '}'; } + /** + * Holds failure information + * + * @opensearch.internal + */ public static class Failure extends ShardOperationFailedException implements ToXContentObject { private static final String _INDEX = "_index"; diff --git a/server/src/main/java/org/opensearch/action/support/replication/ReplicationTask.java b/server/src/main/java/org/opensearch/action/support/replication/ReplicationTask.java index 6fe658d338fae..b599dc405b8ab 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/ReplicationTask.java +++ b/server/src/main/java/org/opensearch/action/support/replication/ReplicationTask.java @@ -75,6 +75,11 @@ public Status getStatus() { return new Status(phase); } + /** + * Status of the replication task + * + * @opensearch.internal + */ public static class Status implements Task.Status { public static final String NAME = "replication"; diff --git a/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java b/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java index 476b679fedaf6..9d3ee8e49e8c2 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java +++ b/server/src/main/java/org/opensearch/action/support/replication/TransportReplicationAction.java @@ -386,6 +386,11 @@ protected Releasable checkPrimaryLimits(final Request request, boolean rerouteWa return () -> {}; } + /** + * Asynchronous primary action + * + * @opensearch.internal + */ class AsyncPrimaryAction extends AbstractRunnable { private final ActionListener onCompletionListener; private final ReplicationTask replicationTask; @@ -554,6 +559,11 @@ protected void adaptResponse(Response response, IndexShard indexShard) { } + /** + * The Primary Result + * + * @opensearch.internal + */ public static class PrimaryResult, Response extends ReplicationResponse> implements ReplicationOperation.PrimaryResult { @@ -603,6 +613,11 @@ public void runPostReplicationActions(ActionListener listener) { } } + /** + * The replica result + * + * @opensearch.internal + */ public static class ReplicaResult { final Exception finalFailure; @@ -645,6 +660,11 @@ protected Releasable checkReplicaLimits(final ReplicaRequest request) { return () -> {}; } + /** + * Thrown if there are any errors retrying on the replica + * + * @opensearch.internal + */ public static class RetryOnReplicaException extends OpenSearchException { public RetryOnReplicaException(ShardId shardId, String msg) { @@ -657,6 +677,11 @@ public RetryOnReplicaException(StreamInput in) throws IOException { } } + /** + * Asynchronous replica action + * + * @opensearch.internal + */ private final class AsyncReplicaAction extends AbstractRunnable implements ActionListener { private final ActionListener onCompletionListener; private final IndexShard replica; @@ -799,6 +824,8 @@ private IndexShard getIndexShard(final ShardId shardId) { * node with primary copy. * * Resolves index and shard id for the request before routing it to target node + * + * @opensearch.internal */ final class ReroutePhase extends AbstractRunnable { private final ActionListener listener; @@ -1133,6 +1160,11 @@ protected void acquireReplicaOperationPermit( replica.acquireReplicaOperationPermit(primaryTerm, globalCheckpoint, maxSeqNoOfUpdatesOrDeletes, onAcquired, executor, request); } + /** + * The primary shard reference + * + * @opensearch.internal + */ class PrimaryShardReference implements Releasable, @@ -1225,6 +1257,11 @@ public PendingReplicationActions getPendingReplicationActions() { } } + /** + * The replica response + * + * @opensearch.internal + */ public static class ReplicaResponse extends ActionResponse implements ReplicationOperation.ReplicaResponse { private long localCheckpoint; private long globalCheckpoint; @@ -1281,6 +1318,8 @@ public int hashCode() { * interface that performs the actual {@code ReplicaRequest} on the replica * shards. It also encapsulates the logic required for failing the replica * if deemed necessary as well as marking it as stale when needed. + * + * @opensearch.internal */ protected class ReplicasProxy implements ReplicationOperation.Replicas { @@ -1338,7 +1377,11 @@ public void markShardCopyAsStaleIfNeeded(ShardId shardId, String allocationId, l } } - /** a wrapper class to encapsulate a request when being sent to a specific allocation id **/ + /** + * a wrapper class to encapsulate a request when being sent to a specific allocation id + * + * @opensearch.internal + */ public static class ConcreteShardRequest extends TransportRequest { /** {@link AllocationId#getId()} of the shard this request is sent to **/ @@ -1442,6 +1485,11 @@ public String toString() { } } + /** + * Internal request for concrete replica + * + * @opensearch.internal + */ protected static final class ConcreteReplicaRequest extends ConcreteShardRequest { private final long globalCheckpoint; diff --git a/server/src/main/java/org/opensearch/action/support/replication/TransportWriteAction.java b/server/src/main/java/org/opensearch/action/support/replication/TransportWriteAction.java index 2104f60c2fd32..39fb89bc48568 100644 --- a/server/src/main/java/org/opensearch/action/support/replication/TransportWriteAction.java +++ b/server/src/main/java/org/opensearch/action/support/replication/TransportWriteAction.java @@ -267,6 +267,8 @@ protected abstract void dispatchedShardOperationOnReplica( * Result of taking the action on the primary. * * NOTE: public for testing + * + * @opensearch.internal */ public static class WritePrimaryResult< ReplicaRequest extends ReplicatedWriteRequest, @@ -322,6 +324,8 @@ public void onFailure(Exception ex) { /** * Result of taking the action on the replica. + * + * @opensearch.internal */ public static class WriteReplicaResult> extends ReplicaResult { public final Location location; @@ -394,6 +398,8 @@ interface RespondingWriteResult { * This class encapsulates post write actions like async waits for * translog syncs or waiting for a refresh to happen making the write operation * visible. + * + * @opensearch.internal */ static final class AsyncAfterWriteAction { private final Location location; @@ -492,6 +498,8 @@ void run() { * * This extends {@code TransportReplicationAction.ReplicasProxy} to do the * failing and stale-ing. + * + * @opensearch.internal */ class WriteActionReplicasProxy extends ReplicasProxy { diff --git a/server/src/main/java/org/opensearch/action/support/single/instance/TransportInstanceSingleOperationAction.java b/server/src/main/java/org/opensearch/action/support/single/instance/TransportInstanceSingleOperationAction.java index a6a16157ed264..bb9d685deedcd 100644 --- a/server/src/main/java/org/opensearch/action/support/single/instance/TransportInstanceSingleOperationAction.java +++ b/server/src/main/java/org/opensearch/action/support/single/instance/TransportInstanceSingleOperationAction.java @@ -140,6 +140,11 @@ protected TransportRequestOptions transportOptions() { */ protected abstract ShardIterator shards(ClusterState clusterState, Request request); + /** + * Asynchronous single action + * + * @opensearch.internal + */ class AsyncSingleAction { private final ActionListener listener; @@ -291,6 +296,11 @@ public void onTimeout(TimeValue timeout) { } } + /** + * Transport handler per shard + * + * @opensearch.internal + */ private class ShardTransportHandler implements TransportRequestHandler { @Override diff --git a/server/src/main/java/org/opensearch/action/support/single/shard/TransportSingleShardAction.java b/server/src/main/java/org/opensearch/action/support/single/shard/TransportSingleShardAction.java index 679360360eed4..df39bd29493dd 100644 --- a/server/src/main/java/org/opensearch/action/support/single/shard/TransportSingleShardAction.java +++ b/server/src/main/java/org/opensearch/action/support/single/shard/TransportSingleShardAction.java @@ -153,6 +153,11 @@ protected void resolveRequest(ClusterState state, InternalRequest request) { @Nullable protected abstract ShardsIterator shards(ClusterState state, InternalRequest request); + /** + * Asynchronous single action + * + * @opensearch.internal + */ class AsyncSingleAction { private final ActionListener listener; @@ -299,6 +304,11 @@ public void handleException(TransportException exp) { } } + /** + * Internal transport handler + * + * @opensearch.internal + */ private class TransportHandler implements TransportRequestHandler { @Override @@ -308,6 +318,11 @@ public void messageReceived(Request request, final TransportChannel channel, Tas } } + /** + * Shard level transport handler + * + * @opensearch.internal + */ private class ShardTransportHandler implements TransportRequestHandler { @Override @@ -321,6 +336,8 @@ public void messageReceived(final Request request, final TransportChannel channe /** * Internal request class that gets built on each node. Holds the original request plus additional info. + * + * @opensearch.internal */ protected class InternalRequest { final Request request; diff --git a/server/src/main/java/org/opensearch/action/support/tasks/TransportTasksAction.java b/server/src/main/java/org/opensearch/action/support/tasks/TransportTasksAction.java index 7a79d449538aa..460a0f7875558 100644 --- a/server/src/main/java/org/opensearch/action/support/tasks/TransportTasksAction.java +++ b/server/src/main/java/org/opensearch/action/support/tasks/TransportTasksAction.java @@ -237,6 +237,11 @@ protected TasksResponse newResponse(TasksRequest request, AtomicReferenceArray r */ protected abstract void taskOperation(TasksRequest request, OperationTask task, ActionListener listener); + /** + * Asynchronous single action + * + * @opensearch.internal + */ private class AsyncAction { private final TasksRequest request; @@ -353,6 +358,11 @@ private void finishHim() { } } + /** + * Node level transport handler + * + * @opensearch.internal + */ class NodeTransportHandler implements TransportRequestHandler { @Override @@ -368,6 +378,11 @@ public void messageReceived(final NodeTaskRequest request, final TransportChanne } } + /** + * Node level task request + * + * @opensearch.internal + */ private class NodeTaskRequest extends TransportRequest { private TasksRequest tasksRequest; @@ -389,6 +404,11 @@ protected NodeTaskRequest(TasksRequest tasksRequest) { } + /** + * Node level task response + * + * @opensearch.internal + */ private class NodeTasksResponse extends TransportResponse { protected String nodeId; protected List exceptions; diff --git a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java index 1dd4f524f86a2..1a9ec0b63f46c 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java +++ b/server/src/main/java/org/opensearch/action/termvectors/MultiTermVectorsResponse.java @@ -54,6 +54,8 @@ public class MultiTermVectorsResponse extends ActionResponse implements Iterable /** * Represents a failure. + * + * @opensearch.internal */ public static class Failure implements Writeable { private final String index; @@ -151,6 +153,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields used for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String DOCS = "docs"; static final String _INDEX = "_index"; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFields.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFields.java index 2349abcd5cbdc..0b2cd3bb2509f 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFields.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFields.java @@ -204,6 +204,11 @@ public int size() { return fieldMap.size(); } + /** + * Internal term vector + * + * @opensearch.internal + */ private final class TermVector extends Terms { private final StreamInput perFieldTermVectorInput; @@ -420,6 +425,11 @@ public boolean hasPayloads() { } } + /** + * Internal postings enumerator for term vectors + * + * @opensearch.internal + */ private final class TermVectorPostingsEnum extends PostingsEnum { private boolean hasPositions; private boolean hasOffsets; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFilter.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFilter.java index ea54cea675900..0e0202777794b 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFilter.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsFilter.java @@ -176,6 +176,11 @@ public void setMaxWordLength(int maxWordLength) { this.maxWordLength = maxWordLength; } + /** + * Internal score term + * + * @opensearch.internal + */ public static final class ScoreTerm { public String field; public String word; @@ -295,6 +300,11 @@ private float computeScore(long docFreq, int freq, long numDocs) { return freq * similarity.idf(docFreq, numDocs); } + /** + * Internal queue of score terms + * + * @opensearch.internal + */ private static class ScoreTermsQueue extends org.apache.lucene.util.PriorityQueue { private final int limit; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java index 7da1df1dbe308..25f33934dbb80 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsRequest.java @@ -115,6 +115,11 @@ public class TermVectorsRequest extends SingleShardRequest i private FilterSettings filterSettings; + /** + * Internal filter settings + * + * @opensearch.internal + */ public static final class FilterSettings { public Integer maxNumTerms; public Integer minTermFreq; diff --git a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsResponse.java b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsResponse.java index 80d80d01b9a93..9f4cd005f23b4 100644 --- a/server/src/main/java/org/opensearch/action/termvectors/TermVectorsResponse.java +++ b/server/src/main/java/org/opensearch/action/termvectors/TermVectorsResponse.java @@ -66,6 +66,11 @@ */ public class TermVectorsResponse extends ActionResponse implements ToXContentObject { + /** + * Fields used for parsing and toXContent + * + * @opensearch.internal + */ private static class FieldStrings { // term statistics strings public static final String TTF = "ttf"; diff --git a/server/src/main/java/org/opensearch/action/update/UpdateHelper.java b/server/src/main/java/org/opensearch/action/update/UpdateHelper.java index 7f4c9524d406d..09a0a6281b8fc 100644 --- a/server/src/main/java/org/opensearch/action/update/UpdateHelper.java +++ b/server/src/main/java/org/opensearch/action/update/UpdateHelper.java @@ -390,6 +390,11 @@ public static GetResult extractGetResult( ); } + /** + * Internal result + * + * @opensearch.internal + */ public static class Result { private final Writeable action; @@ -468,6 +473,8 @@ public String toString() { /** * Field names used to populate the script context + * + * @opensearch.internal */ public static class ContextFields { public static final String CTX = "ctx"; diff --git a/server/src/main/java/org/opensearch/action/update/UpdateResponse.java b/server/src/main/java/org/opensearch/action/update/UpdateResponse.java index b51210d2d202b..8fca544f2d53b 100644 --- a/server/src/main/java/org/opensearch/action/update/UpdateResponse.java +++ b/server/src/main/java/org/opensearch/action/update/UpdateResponse.java @@ -172,6 +172,8 @@ public static void parseXContentFields(XContentParser parser, Builder context) t * Builder class for {@link UpdateResponse}. This builder is usually used during xcontent parsing to * temporarily store the parsed values, then the {@link DocWriteResponse.Builder#build()} method is called to * instantiate the {@link UpdateResponse}. + * + * @opensearch.internal */ public static class Builder extends DocWriteResponse.Builder { diff --git a/server/src/main/java/org/opensearch/index/Index.java b/server/src/main/java/org/opensearch/index/Index.java index db620592d1ede..0dc0399d6bf80 100644 --- a/server/src/main/java/org/opensearch/index/Index.java +++ b/server/src/main/java/org/opensearch/index/Index.java @@ -136,6 +136,8 @@ public static Index fromXContent(final XContentParser parser) throws IOException /** * Builder for Index objects. Used by ObjectParser instances only. + * + * @opensearch.internal */ private static final class Builder { private String name; diff --git a/server/src/main/java/org/opensearch/index/IndexModule.java b/server/src/main/java/org/opensearch/index/IndexModule.java index acceee7562068..49daf8293656c 100644 --- a/server/src/main/java/org/opensearch/index/IndexModule.java +++ b/server/src/main/java/org/opensearch/index/IndexModule.java @@ -387,6 +387,11 @@ public static boolean isBuiltinType(String storeType) { return false; } + /** + * Type of file system + * + * @opensearch.internal + */ public enum Type { HYBRIDFS("hybridfs"), NIOFS("niofs"), diff --git a/server/src/main/java/org/opensearch/index/IndexService.java b/server/src/main/java/org/opensearch/index/IndexService.java index 54aa7f5097d61..0739e5afdffcd 100644 --- a/server/src/main/java/org/opensearch/index/IndexService.java +++ b/server/src/main/java/org/opensearch/index/IndexService.java @@ -279,6 +279,11 @@ static boolean needsMapperService(IndexSettings indexSettings, IndexCreationCont && indexCreationContext == IndexCreationContext.CREATE_INDEX); // metadata verification needs a mapper service } + /** + * Context for index creation + * + * @opensearch.internal + */ public enum IndexCreationContext { CREATE_INDEX, METADATA_VERIFICATION @@ -741,6 +746,11 @@ public void accept(ShardLock lock) { } } + /** + * Cache listener for bitsets + * + * @opensearch.internal + */ private static final class BitsetCacheListener implements BitsetFilterCache.Listener { final IndexService indexService; @@ -894,6 +904,11 @@ private void rescheduleRefreshTasks() { } } + /** + * Shard Store Deleter Interface + * + * @opensearch.internal + */ public interface ShardStoreDeleter { void deleteShardStore(String reason, ShardLock lock, IndexSettings indexSettings) throws IOException; @@ -1000,6 +1015,11 @@ private void sync(final Consumer sync, final String source) { } } + /** + * Base asynchronous task + * + * @opensearch.internal + */ abstract static class BaseAsyncTask extends AbstractAsyncTask { protected final IndexService indexService; @@ -1020,6 +1040,8 @@ protected boolean mustReschedule() { /** * FSyncs the translog for all shards of this index in a defined interval. + * + * @opensearch.internal */ static final class AsyncTranslogFSync extends BaseAsyncTask { diff --git a/server/src/main/java/org/opensearch/index/IndexSortConfig.java b/server/src/main/java/org/opensearch/index/IndexSortConfig.java index 3acc80e519785..179d79f90cc8c 100644 --- a/server/src/main/java/org/opensearch/index/IndexSortConfig.java +++ b/server/src/main/java/org/opensearch/index/IndexSortConfig.java @@ -244,6 +244,11 @@ private void validateIndexSortField(SortField sortField) { } } + /** + * Field sort specification + * + * @opensearch.internal + */ static class FieldSortSpec { final String field; SortOrder order; diff --git a/server/src/main/java/org/opensearch/index/IndexWarmer.java b/server/src/main/java/org/opensearch/index/IndexWarmer.java index 5251b49539ecb..4b49a6c92dd9f 100644 --- a/server/src/main/java/org/opensearch/index/IndexWarmer.java +++ b/server/src/main/java/org/opensearch/index/IndexWarmer.java @@ -108,7 +108,11 @@ void warm(OpenSearchDirectoryReader reader, IndexShard shard, IndexSettings sett } } - /** A handle on the execution of warm-up action. */ + /** + * A handle on the execution of warm-up action. + * + * @opensearch.internal + */ public interface TerminationHandle { TerminationHandle NO_WAIT = () -> {}; @@ -117,12 +121,22 @@ public interface TerminationHandle { void awaitTermination() throws InterruptedException; } + /** + * Listener for the index warmer + * + * @opensearch.internal + */ public interface Listener { /** Queue tasks to warm-up the given segments and return handles that allow to wait for termination of the * execution of those tasks. */ TerminationHandle warmReader(IndexShard indexShard, OpenSearchDirectoryReader reader); } + /** + * Warmer for field data + * + * @opensearch.internal + */ private static class FieldDataWarmer implements IndexWarmer.Listener { private final Executor executor; diff --git a/server/src/main/java/org/opensearch/index/IndexingSlowLog.java b/server/src/main/java/org/opensearch/index/IndexingSlowLog.java index c45d3f6b34d65..d6ec06d5a274c 100644 --- a/server/src/main/java/org/opensearch/index/IndexingSlowLog.java +++ b/server/src/main/java/org/opensearch/index/IndexingSlowLog.java @@ -211,6 +211,11 @@ public void postIndex(ShardId shardId, Engine.Index indexOperation, Engine.Index } } + /** + * Slow log message for indexing + * + * @opensearch.internal + */ static final class IndexingSlowLogMessage extends OpenSearchLogMessage { IndexingSlowLogMessage(Index index, ParsedDocument doc, long tookInNanos, boolean reformat, int maxSourceCharsToLog) { diff --git a/server/src/main/java/org/opensearch/index/SearchSlowLog.java b/server/src/main/java/org/opensearch/index/SearchSlowLog.java index c48c122580579..133fa6761c197 100644 --- a/server/src/main/java/org/opensearch/index/SearchSlowLog.java +++ b/server/src/main/java/org/opensearch/index/SearchSlowLog.java @@ -208,6 +208,11 @@ public void onFetchPhase(SearchContext context, long tookInNanos) { } } + /** + * Search slow log message + * + * @opensearch.internal + */ static final class SearchSlowLogMessage extends OpenSearchLogMessage { SearchSlowLogMessage(SearchContext context, long tookInNanos) { diff --git a/server/src/main/java/org/opensearch/index/ShardIndexingPressureTracker.java b/server/src/main/java/org/opensearch/index/ShardIndexingPressureTracker.java index c6031d80fa0a8..937424598bc24 100644 --- a/server/src/main/java/org/opensearch/index/ShardIndexingPressureTracker.java +++ b/server/src/main/java/org/opensearch/index/ShardIndexingPressureTracker.java @@ -92,6 +92,8 @@ public CommonOperationTracker getCommonOperationTracker() { * a. StatsTracker : To track request level aggregated statistics for a shard * b. RejectionTracker : To track the rejection statistics for a shard * c. Performance Tracker : To track the request performance statistics for a shard + * + * @opensearch.internal */ public static class OperationTracker { private final StatsTracker statsTracker = new StatsTracker(); @@ -116,6 +118,8 @@ public PerformanceTracker getPerformanceTracker() { * a. currentBytes - Bytes of data that is inflight/processing for a shard. * b. totalBytes - Total bytes that are processed/completed successfully for a shard. * c. requestCount - Total number of requests that are processed/completed successfully for a shard. + * + * @opensearch.internal */ public static class StatsTracker { private final AtomicLong currentBytes = new AtomicLong(); @@ -156,6 +160,8 @@ public long incrementRequestCount() { * last successful request limits breached for a shard i.e. complete path failure (black-hole). * d. throughputDegradationLimitsBreachedRejections - Total number of requests that were rejected due to the * throughput degradation in the request path for a shard i.e. partial failure. + * + * @opensearch.internal */ public static class RejectionTracker { private final AtomicLong totalRejections = new AtomicLong(); @@ -205,6 +211,8 @@ public long incrementThroughputDegradationLimitsBreachedRejections() { * e. ThroughputMovingQueue - Queue that holds the last N requests throughput such that there exists a sliding window * which keeps moving everytime a new request comes. At any given point it tracks last N requests only. * EWMA cannot be used here as it evaluate the historical average, while here it just needs the average of last N requests. + * + * @opensearch.internal */ public static class PerformanceTracker { private final AtomicLong latencyInMillis = new AtomicLong(); @@ -273,6 +281,8 @@ public long getThroughputMovingQueueSize() { * when primary is local to coordinator node. Hence common accounting for coordinator and primary operation. * b. totalCombinedCoordinatingAndPrimaryBytes - Total bytes that are processed/completed successfully for a shard * when primary is local to coordinator node. Hence common accounting for coordinator and primary operation. + * + * @opensearch.internal */ public static class CommonOperationTracker { private final AtomicLong currentCombinedCoordinatingAndPrimaryBytes = new AtomicLong(); diff --git a/server/src/main/java/org/opensearch/index/analysis/AnalysisRegistry.java b/server/src/main/java/org/opensearch/index/analysis/AnalysisRegistry.java index 07041978c812c..8ec2b70001fc9 100644 --- a/server/src/main/java/org/opensearch/index/analysis/AnalysisRegistry.java +++ b/server/src/main/java/org/opensearch/index/analysis/AnalysisRegistry.java @@ -570,6 +570,11 @@ private static AnalysisProvider getAnalysisProvider( return type; } + /** + * Internal prebuilt analysis class + * + * @opensearch.internal + */ private static class PrebuiltAnalysis implements Closeable { final Map>> analyzerProviderFactories; diff --git a/server/src/main/java/org/opensearch/index/analysis/PreBuiltAnalyzerProviderFactory.java b/server/src/main/java/org/opensearch/index/analysis/PreBuiltAnalyzerProviderFactory.java index ce1489d5de70c..6202f0a679c83 100644 --- a/server/src/main/java/org/opensearch/index/analysis/PreBuiltAnalyzerProviderFactory.java +++ b/server/src/main/java/org/opensearch/index/analysis/PreBuiltAnalyzerProviderFactory.java @@ -104,6 +104,8 @@ public void close() throws IOException { * * This can be removed when all analyzers have been moved away from PreBuiltAnalyzers to * PreBuiltAnalyzerProviderFactory either in server or analysis-common. + * + * @opensearch.internal */ static class PreBuiltAnalyzersDelegateCache implements PreBuiltCacheFactory.PreBuiltCache> { diff --git a/server/src/main/java/org/opensearch/index/analysis/ShingleTokenFilterFactory.java b/server/src/main/java/org/opensearch/index/analysis/ShingleTokenFilterFactory.java index 953479e3e0a19..701a9302fc164 100644 --- a/server/src/main/java/org/opensearch/index/analysis/ShingleTokenFilterFactory.java +++ b/server/src/main/java/org/opensearch/index/analysis/ShingleTokenFilterFactory.java @@ -121,6 +121,11 @@ public Factory getInnerFactory() { return this.factory; } + /** + * Factory for single token filter + * + * @opensearch.internal + */ public static final class Factory implements TokenFilterFactory { private final int maxShingleSize; diff --git a/server/src/main/java/org/opensearch/index/cache/bitset/BitsetFilterCache.java b/server/src/main/java/org/opensearch/index/cache/bitset/BitsetFilterCache.java index 12306f942d32f..cd3691ba66a17 100644 --- a/server/src/main/java/org/opensearch/index/cache/bitset/BitsetFilterCache.java +++ b/server/src/main/java/org/opensearch/index/cache/bitset/BitsetFilterCache.java @@ -192,6 +192,11 @@ public void onRemoval(RemovalNotification> getLoadedFilters() { /** * A listener interface that is executed for each onCache / onRemoval event + * + * @opensearch.internal */ public interface Listener { /** diff --git a/server/src/main/java/org/opensearch/index/cache/query/QueryCacheStats.java b/server/src/main/java/org/opensearch/index/cache/query/QueryCacheStats.java index e9cc26c378749..941899476e728 100644 --- a/server/src/main/java/org/opensearch/index/cache/query/QueryCacheStats.java +++ b/server/src/main/java/org/opensearch/index/cache/query/QueryCacheStats.java @@ -155,6 +155,11 @@ public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params par return builder; } + /** + * Fields used for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String QUERY_CACHE = "query_cache"; static final String MEMORY_SIZE = "memory_size"; diff --git a/server/src/main/java/org/opensearch/index/cache/request/RequestCacheStats.java b/server/src/main/java/org/opensearch/index/cache/request/RequestCacheStats.java index d03bfdad24226..2d0a3b5af1645 100644 --- a/server/src/main/java/org/opensearch/index/cache/request/RequestCacheStats.java +++ b/server/src/main/java/org/opensearch/index/cache/request/RequestCacheStats.java @@ -115,6 +115,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields used for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String REQUEST_CACHE_STATS = "request_cache"; static final String MEMORY_SIZE = "memory_size"; diff --git a/server/src/main/java/org/opensearch/index/engine/CombinedDeletionPolicy.java b/server/src/main/java/org/opensearch/index/engine/CombinedDeletionPolicy.java index 8772724c2353d..528bd556681cc 100644 --- a/server/src/main/java/org/opensearch/index/engine/CombinedDeletionPolicy.java +++ b/server/src/main/java/org/opensearch/index/engine/CombinedDeletionPolicy.java @@ -265,6 +265,8 @@ public static String commitDescription(IndexCommit commit) throws IOException { /** * A wrapper of an index commit that prevents it from being deleted. + * + * @opensearch.internal */ private static class SnapshotIndexCommit extends IndexCommit { private final IndexCommit delegate; diff --git a/server/src/main/java/org/opensearch/index/engine/CommitStats.java b/server/src/main/java/org/opensearch/index/engine/CommitStats.java index 1faed2cd16713..495ff2a5c2622 100644 --- a/server/src/main/java/org/opensearch/index/engine/CommitStats.java +++ b/server/src/main/java/org/opensearch/index/engine/CommitStats.java @@ -112,6 +112,11 @@ public void writeTo(StreamOutput out) throws IOException { out.writeInt(numDocs); } + /** + * Fields used for parsing and toXContent + * + * @opensearch.internal + */ static final class Fields { static final String GENERATION = "generation"; static final String USER_DATA = "user_data"; diff --git a/server/src/main/java/org/opensearch/index/engine/Engine.java b/server/src/main/java/org/opensearch/index/engine/Engine.java index 06ceb34ab2065..87803f280260f 100644 --- a/server/src/main/java/org/opensearch/index/engine/Engine.java +++ b/server/src/main/java/org/opensearch/index/engine/Engine.java @@ -243,6 +243,8 @@ public void verifyEngineBeforeIndexClosing() throws IllegalStateException { * A throttling class that can be activated, causing the * {@code acquireThrottle} method to block on a lock when throttling * is enabled + * + * @opensearch.internal */ protected static final class IndexThrottle { private final CounterMetric throttleTimeMillisMetric = new CounterMetric(); @@ -317,7 +319,11 @@ boolean throttleLockIsHeldByCurrentThread() { // to be used in assertions and te */ public abstract void trimOperationsFromTranslog(long belowTerm, long aboveSeqNo) throws EngineException; - /** A Lock implementation that always allows the lock to be acquired */ + /** + * A Lock implementation that always allows the lock to be acquired + * + * @opensearch.internal + */ protected static final class NoOpLock implements Lock { @Override @@ -371,6 +377,8 @@ public Condition newCondition() { * Base class for index and delete operation results * Holds result meta data (e.g. translog location, updated version) * for an executed write {@link Operation} + * + * @opensearch.internal **/ public abstract static class Result { private final Operation.TYPE operationType; @@ -484,6 +492,11 @@ void freeze() { freeze.set(true); } + /** + * Type of the result + * + * @opensearch.internal + */ public enum Type { SUCCESS, FAILURE, @@ -491,6 +504,11 @@ public enum Type { } } + /** + * Index result + * + * @opensearch.internal + */ public static class IndexResult extends Result { private final boolean created; @@ -523,6 +541,11 @@ public boolean isCreated() { } + /** + * The delete result + * + * @opensearch.internal + */ public static class DeleteResult extends Result { private final boolean found; @@ -555,6 +578,11 @@ public boolean isFound() { } + /** + * A noop result + * + * @opensearch.internal + */ public static class NoOpResult extends Result { NoOpResult(long term, long seqNo) { @@ -713,6 +741,11 @@ boolean assertSearcherIsWarmedUp(String source, SearcherScope scope) { return true; } + /** + * Scope of the searcher + * + * @opensearch.internal + */ public enum SearcherScope { EXTERNAL, INTERNAL @@ -1241,6 +1274,11 @@ protected boolean maybeFailEngine(String source, Exception e) { return false; } + /** + * Event listener for the engine + * + * @opensearch.internal + */ public interface EventListener { /** * Called when a fatal exception occurred @@ -1248,6 +1286,11 @@ public interface EventListener { default void onFailedEngine(String reason, @Nullable Exception e) {} } + /** + * Supplier for the searcher + * + * @opensearch.internal + */ public abstract static class SearcherSupplier implements Releasable { private final Function wrapper; private final AtomicBoolean released = new AtomicBoolean(false); @@ -1278,6 +1321,11 @@ public final void close() { protected abstract Searcher acquireSearcherInternal(String source); } + /** + * The engine searcher + * + * @opensearch.internal + */ public static final class Searcher extends IndexSearcher implements Releasable { private final String source; private final Closeable onClose; @@ -1325,9 +1373,18 @@ public void close() { } } + /** + * Base operation class + * + * @opensearch.internal + */ public abstract static class Operation { - /** type of operation (index, delete), subclasses use static types */ + /** + * type of operation (index, delete), subclasses use static types + * + * @opensearch.internal + */ public enum TYPE { INDEX, DELETE, @@ -1362,6 +1419,11 @@ public Operation(Term uid, long seqNo, long primaryTerm, long version, VersionTy this.startTime = startTime; } + /** + * Origin of the operation + * + * @opensearch.internal + */ public enum Origin { PRIMARY, REPLICA, @@ -1416,6 +1478,11 @@ public long startTime() { public abstract TYPE operationType(); } + /** + * Index operation + * + * @opensearch.internal + */ public static class Index extends Operation { private final ParsedDocument doc; @@ -1529,6 +1596,11 @@ public long getIfPrimaryTerm() { } } + /** + * Delete operation + * + * @opensearch.internal + */ public static class Delete extends Operation { private final String id; @@ -1612,6 +1684,11 @@ public long getIfPrimaryTerm() { } } + /** + * noop operation + * + * @opensearch.internal + */ public static class NoOp extends Operation { private final String reason; @@ -1657,6 +1734,11 @@ public int estimatedSizeInBytes() { } + /** + * Get operation + * + * @opensearch.internal + */ public static class Get { private final boolean realtime; private final Term uid; @@ -1728,6 +1810,11 @@ public long getIfPrimaryTerm() { } + /** + * The Get result + * + * @opensearch.internal + */ public static class GetResult implements Releasable { private final boolean exists; private final long version; @@ -1848,6 +1935,8 @@ public long getLastWriteNanos() { * Called for each new opened engine reader to warm new segments * * @see EngineConfig#getWarmer() + * + * @opensearch.internal */ public interface Warmer { /** @@ -1917,6 +2006,11 @@ public long getMaxSeenAutoIdTimestamp() { */ public abstract void updateMaxUnsafeAutoIdTimestamp(long newTimestamp); + /** + * The runner for translog recovery + * + * @opensearch.internal + */ @FunctionalInterface public interface TranslogRecoveryRunner { int run(Engine engine, Translog.Snapshot snapshot) throws IOException; diff --git a/server/src/main/java/org/opensearch/index/engine/EngineConfig.java b/server/src/main/java/org/opensearch/index/engine/EngineConfig.java index 52dff2826657b..0ea4a96a72362 100644 --- a/server/src/main/java/org/opensearch/index/engine/EngineConfig.java +++ b/server/src/main/java/org/opensearch/index/engine/EngineConfig.java @@ -463,6 +463,8 @@ public LongSupplier getPrimaryTermSupplier() { /** * A supplier supplies tombstone documents which will be used in soft-update methods. * The returned document consists only _uid, _seqno, _term and _version fields; other metadata fields are excluded. + * + * @opensearch.internal */ public interface TombstoneDocSupplier { /** diff --git a/server/src/main/java/org/opensearch/index/engine/InternalEngine.java b/server/src/main/java/org/opensearch/index/engine/InternalEngine.java index 70165adb6da60..23321db4f1a65 100644 --- a/server/src/main/java/org/opensearch/index/engine/InternalEngine.java +++ b/server/src/main/java/org/opensearch/index/engine/InternalEngine.java @@ -379,6 +379,8 @@ public CompletionStats completionStats(String... fieldNamePatterns) { * since no indexing is happening and refreshes are only happening to the external reader manager, while with * this specialized implementation an external refresh will immediately be reflected on the internal reader * and old segments can be released in the same way previous version did this (as a side-effect of _refresh) + * + * @opensearch.internal */ @SuppressForbidden(reason = "reference counting is required here") private static final class ExternalReaderManager extends ReferenceManager { @@ -1295,6 +1297,11 @@ private void addStaleDocs(final List docs, final IndexWri } } + /** + * The indexing strategy + * + * @opensearch.internal + */ protected static final class IndexingStrategy { final boolean currentNotFoundOrDeleted; final boolean useLuceneUpdateDocument; @@ -1644,6 +1651,11 @@ private DeleteResult deleteInLucene(Delete delete, DeletionStrategy plan) throws } } + /** + * The deletion strategy + * + * @opensearch.internal + */ protected static final class DeletionStrategy { // of a rare double delete final boolean deleteFromLucene; @@ -2457,7 +2469,11 @@ private IndexWriterConfig getIndexWriterConfig() { return iwc; } - /** A listener that warms the segments if needed when acquiring a new reader */ + /** + * A listener that warms the segments if needed when acquiring a new reader + * + * @opensearch.internal + */ static final class RefreshWarmerListener implements BiConsumer { private final Engine.Warmer warmer; private final Logger logger; @@ -2882,6 +2898,11 @@ private static Map commitDataAsMap(final IndexWriter indexWriter return commitData; } + /** + * Internal Asserting Index Writer + * + * @opensearch.internal + */ private static class AssertingIndexWriter extends IndexWriter { AssertingIndexWriter(Directory d, IndexWriterConfig conf) throws IOException { super(d, conf); diff --git a/server/src/main/java/org/opensearch/index/engine/LiveVersionMap.java b/server/src/main/java/org/opensearch/index/engine/LiveVersionMap.java index 943792171d2e5..87ff449ee74e0 100644 --- a/server/src/main/java/org/opensearch/index/engine/LiveVersionMap.java +++ b/server/src/main/java/org/opensearch/index/engine/LiveVersionMap.java @@ -55,6 +55,11 @@ final class LiveVersionMap implements ReferenceManager.RefreshListener, Accounta private final KeyedLock keyedLock = new KeyedLock<>(); + /** + * Looks up document version + * + * @opensearch.internal + */ private static final class VersionLookup { /** Tracks bytes used by current map, i.e. what is freed on refresh. For deletes, which are also added to tombstones, @@ -120,6 +125,11 @@ public void updateMinDeletedTimestamp(DeleteVersionValue delete) { } + /** + * Map of version lookups + * + * @opensearch.internal + */ private static final class Maps { // All writes (adds and deletes) go into here: diff --git a/server/src/main/java/org/opensearch/index/engine/LuceneChangesSnapshot.java b/server/src/main/java/org/opensearch/index/engine/LuceneChangesSnapshot.java index 6b3a8d76defb5..098115bf676a8 100644 --- a/server/src/main/java/org/opensearch/index/engine/LuceneChangesSnapshot.java +++ b/server/src/main/java/org/opensearch/index/engine/LuceneChangesSnapshot.java @@ -350,6 +350,11 @@ private boolean assertDocSoftDeleted(LeafReader leafReader, int segmentDocId) th return ndv.longValue() == 1; } + /** + * Parallel array to hold translog operations + * + * @opensearch.internal + */ private static final class ParallelArray { final LeafReaderContext[] leafReaderContexts; final long[] version; diff --git a/server/src/main/java/org/opensearch/index/engine/PrunePostingsMergePolicy.java b/server/src/main/java/org/opensearch/index/engine/PrunePostingsMergePolicy.java index 5b186b7a3d841..87ac032b7d81b 100644 --- a/server/src/main/java/org/opensearch/index/engine/PrunePostingsMergePolicy.java +++ b/server/src/main/java/org/opensearch/index/engine/PrunePostingsMergePolicy.java @@ -168,6 +168,11 @@ public CacheHelper getReaderCacheHelper() { }; } + /** + * Class holder for only live docs and the postings enumerator + * + * @opensearch.internal + */ private static final class OnlyLiveDocsPostingsEnum extends PostingsEnum { private final Bits liveDocs; diff --git a/server/src/main/java/org/opensearch/index/engine/RecoverySourcePruneMergePolicy.java b/server/src/main/java/org/opensearch/index/engine/RecoverySourcePruneMergePolicy.java index fb907b3acd2a3..0c064a8f188ad 100644 --- a/server/src/main/java/org/opensearch/index/engine/RecoverySourcePruneMergePolicy.java +++ b/server/src/main/java/org/opensearch/index/engine/RecoverySourcePruneMergePolicy.java @@ -100,6 +100,11 @@ private static CodecReader wrapReader(String recoverySourceField, CodecReader re } } + /** + * A codec reader that prunes the source using a filter + * + * @opensearch.internal + */ private static class SourcePruningFilterCodecReader extends FilterCodecReader { private final BitSet recoverySourceToKeep; private final String recoverySourceField; @@ -166,6 +171,11 @@ public CacheHelper getReaderCacheHelper() { return null; } + /** + * A producer of filtered doc vlaues + * + * @opensearch.internal + */ private static class FilterDocValuesProducer extends DocValuesProducer { private final DocValuesProducer in; @@ -209,6 +219,11 @@ public void close() throws IOException { } } + /** + * A fields reader that provides a filtered stored field + * + * @opensearch.internal + */ private abstract static class FilterStoredFieldsReader extends StoredFieldsReader { protected final StoredFieldsReader in; @@ -236,6 +251,11 @@ public void checkIntegrity() throws IOException { } } + /** + * A reader of pruned stored fields + * + * @opensearch.internal + */ private static class RecoverySourcePruningStoredFieldsReader extends FilterStoredFieldsReader { private final BitSet recoverySourceToKeep; @@ -276,6 +296,11 @@ public StoredFieldsReader clone() { } + /** + * A visitor pattern for filtered stored fields + * + * @opensearch.internal + */ private static class FilterStoredFieldVisitor extends StoredFieldVisitor { private final StoredFieldVisitor visitor; diff --git a/server/src/main/java/org/opensearch/index/engine/SegmentsStats.java b/server/src/main/java/org/opensearch/index/engine/SegmentsStats.java index af4a1dc6f4d6b..231b2da546d46 100644 --- a/server/src/main/java/org/opensearch/index/engine/SegmentsStats.java +++ b/server/src/main/java/org/opensearch/index/engine/SegmentsStats.java @@ -244,6 +244,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for segment statistics + * + * @opensearch.internal + */ static final class Fields { static final String SEGMENTS = "segments"; static final String COUNT = "count"; diff --git a/server/src/main/java/org/opensearch/index/fielddata/FieldData.java b/server/src/main/java/org/opensearch/index/fielddata/FieldData.java index a45cd79f68126..0f18944c67ebb 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/FieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/FieldData.java @@ -446,6 +446,11 @@ private interface ToStringValues { } + /** + * Values casted as a double type + * + * @opensearch.internal + */ private static class DoubleCastedValues extends NumericDoubleValues { private final NumericDocValues values; @@ -466,6 +471,11 @@ public boolean advanceExact(int doc) throws IOException { } + /** + * Sorted values casted as a double type + * + * @opensearch.internal + */ private static class SortedDoubleCastedValues extends SortedNumericDoubleValues { private final SortedNumericDocValues values; @@ -491,6 +501,11 @@ public int docValueCount() { } + /** + * Values casted as a long type + * + * @opensearch.internal + */ private static class LongCastedValues extends AbstractNumericDocValues { private final NumericDoubleValues values; @@ -517,6 +532,11 @@ public int docID() { } } + /** + * Sorted values casted as a long type + * + * @opensearch.internal + */ private static class SortedLongCastedValues extends AbstractSortedNumericDocValues { private final SortedNumericDoubleValues values; diff --git a/server/src/main/java/org/opensearch/index/fielddata/IndexFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/IndexFieldData.java index 9b9258efb1cc3..25437fb001978 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/IndexFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/IndexFieldData.java @@ -108,9 +108,13 @@ BucketedSort newBucketedSort( BucketedSort.ExtraData extra ); - // we need this extended source we we have custom comparators to reuse our field data - // in this case, we need to reduce type that will be used when search results are reduced - // on another node (we don't have the custom source them...) + /** + * we need this extended source we we have custom comparators to reuse our field data + * in this case, we need to reduce type that will be used when search results are reduced + * on another node (we don't have the custom source them...) + * + * @opensearch.internal + */ abstract class XFieldComparatorSource extends FieldComparatorSource { protected final MultiValueMode sortMode; @@ -273,11 +277,21 @@ public abstract BucketedSort newBucketedSort( ); } + /** + * Base builder interface + * + * @opensearch.internal + */ interface Builder { IndexFieldData build(IndexFieldDataCache cache, CircuitBreakerService breakerService); } + /** + * Base Global field data class + * + * @opensearch.internal + */ interface Global extends IndexFieldData { IndexFieldData loadGlobal(DirectoryReader indexReader); diff --git a/server/src/main/java/org/opensearch/index/fielddata/IndexFieldDataCache.java b/server/src/main/java/org/opensearch/index/fielddata/IndexFieldDataCache.java index 08aaadcac0d60..ef816099c7c58 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/IndexFieldDataCache.java +++ b/server/src/main/java/org/opensearch/index/fielddata/IndexFieldDataCache.java @@ -59,6 +59,11 @@ > IFD load(Direc */ void clear(String fieldName); + /** + * The listener interface + * + * @opensearch.internal + */ interface Listener { /** @@ -72,6 +77,11 @@ default void onCache(ShardId shardId, String fieldName, Accountable ramUsage) {} default void onRemoval(ShardId shardId, String fieldName, boolean wasEvicted, long sizeInBytes) {} } + /** + * No index field data cache + * + * @opensearch.internal + */ class None implements IndexFieldDataCache { @Override diff --git a/server/src/main/java/org/opensearch/index/fielddata/IndexNumericFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/IndexNumericFieldData.java index e4beb46b451f2..02748edfb4f83 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/IndexNumericFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/IndexNumericFieldData.java @@ -61,6 +61,8 @@ public abstract class IndexNumericFieldData implements IndexFieldData { /** * The type of number. + * + * @opensearch.internal */ public enum NumericType { BOOLEAN(false, SortField.Type.LONG, CoreValuesSourceType.BOOLEAN), diff --git a/server/src/main/java/org/opensearch/index/fielddata/ScriptDocValues.java b/server/src/main/java/org/opensearch/index/fielddata/ScriptDocValues.java index 5f2d899b9d1e8..0b5ace1657fd3 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/ScriptDocValues.java +++ b/server/src/main/java/org/opensearch/index/fielddata/ScriptDocValues.java @@ -93,6 +93,11 @@ public final void sort(Comparator c) { throw new UnsupportedOperationException("doc values are unmodifiable"); } + /** + * Long values for scripted doc values + * + * @opensearch.internal + */ public static final class Longs extends ScriptDocValues { private final SortedNumericDocValues in; private long[] values = new long[0]; @@ -147,6 +152,11 @@ public int size() { } } + /** + * Date values for scripted doc values + * + * @opensearch.internal + */ public static final class Dates extends ScriptDocValues { private final SortedNumericDocValues in; @@ -223,6 +233,11 @@ void refreshArray() throws IOException { } } + /** + * Double values for scripted doc values + * + * @opensearch.internal + */ public static final class Doubles extends ScriptDocValues { private final SortedNumericDoubleValues in; @@ -279,6 +294,11 @@ public int size() { } } + /** + * Geo points for scripted doc values + * + * @opensearch.internal + */ public static final class GeoPoints extends ScriptDocValues { private final MultiGeoPointValues in; @@ -399,6 +419,11 @@ public double geohashDistanceWithDefault(String geohash, double defaultValue) { } } + /** + * Boolean values for scripted doc values + * + * @opensearch.internal + */ public static final class Booleans extends ScriptDocValues { private final SortedNumericDocValues in; @@ -459,6 +484,11 @@ private static boolean[] grow(boolean[] array, int minSize) { } + /** + * Base class for binary script doc values + * + * @opensearch.internal + */ abstract static class BinaryScriptDocValues extends ScriptDocValues { private final SortedBinaryDocValues in; @@ -505,6 +535,11 @@ public int size() { } } + /** + * String class for scripted doc values + * + * @opensearch.internal + */ public static class Strings extends BinaryScriptDocValues { public Strings(SortedBinaryDocValues in) { super(in); @@ -533,6 +568,11 @@ public final String getValue() { } } + /** + * BytesRef values for scripted doc values + * + * @opensearch.internal + */ public static final class BytesRefs extends BinaryScriptDocValues { public BytesRefs(SortedBinaryDocValues in) { diff --git a/server/src/main/java/org/opensearch/index/fielddata/fieldcomparator/BytesRefFieldComparatorSource.java b/server/src/main/java/org/opensearch/index/fielddata/fieldcomparator/BytesRefFieldComparatorSource.java index 51dde57563ec6..e816b366c3153 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/fieldcomparator/BytesRefFieldComparatorSource.java +++ b/server/src/main/java/org/opensearch/index/fielddata/fieldcomparator/BytesRefFieldComparatorSource.java @@ -169,6 +169,8 @@ public BucketedSort newBucketedSort( /** * A view of a SortedDocValues where missing values * are replaced with the specified term + * + * @opensearch.internal */ // TODO: move this out if we need it for other reasons static class ReplaceMissing extends AbstractSortedDocValues { diff --git a/server/src/main/java/org/opensearch/index/fielddata/ordinals/MultiOrdinals.java b/server/src/main/java/org/opensearch/index/fielddata/ordinals/MultiOrdinals.java index e6e51ed83a6ab..6131bc33841b6 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/ordinals/MultiOrdinals.java +++ b/server/src/main/java/org/opensearch/index/fielddata/ordinals/MultiOrdinals.java @@ -129,6 +129,11 @@ public SortedSetDocValues ordinals(ValuesHolder values) { } } + /** + * Single doc type + * + * @opensearch.internal + */ private static class SingleDocs extends AbstractSortedDocValues { private final int valueCount; @@ -177,6 +182,11 @@ public int getValueCount() { } + /** + * Multiple docs + * + * @opensearch.internal + */ private static class MultiDocs extends AbstractSortedSetDocValues { private final long valueCount; diff --git a/server/src/main/java/org/opensearch/index/fielddata/ordinals/Ordinals.java b/server/src/main/java/org/opensearch/index/fielddata/ordinals/Ordinals.java index 6ce0c06be02ea..85ac535319e55 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/ordinals/Ordinals.java +++ b/server/src/main/java/org/opensearch/index/fielddata/ordinals/Ordinals.java @@ -62,6 +62,11 @@ public final SortedSetDocValues ordinals() { return ordinals(NO_VALUES); } + /** + * Holder of values + * + * @opensearch.internal + */ public interface ValuesHolder { BytesRef lookupOrd(long ord); diff --git a/server/src/main/java/org/opensearch/index/fielddata/ordinals/OrdinalsBuilder.java b/server/src/main/java/org/opensearch/index/fielddata/ordinals/OrdinalsBuilder.java index 85a9ba5358c3f..ea6baa1f2c684 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/ordinals/OrdinalsBuilder.java +++ b/server/src/main/java/org/opensearch/index/fielddata/ordinals/OrdinalsBuilder.java @@ -84,6 +84,8 @@ public final class OrdinalsBuilder implements Closeable { *

* In addition to these structures, there is another array which stores the current position (level + slice + offset in the slice) * in order to be able to append data in constant time. + * + * @opensearch.internal */ private static class OrdinalsStore { diff --git a/server/src/main/java/org/opensearch/index/fielddata/ordinals/SinglePackedOrdinals.java b/server/src/main/java/org/opensearch/index/fielddata/ordinals/SinglePackedOrdinals.java index 90582079d3f76..a3007cded317e 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/ordinals/SinglePackedOrdinals.java +++ b/server/src/main/java/org/opensearch/index/fielddata/ordinals/SinglePackedOrdinals.java @@ -84,6 +84,11 @@ public SortedSetDocValues ordinals(ValuesHolder values) { return (SortedSetDocValues) DocValues.singleton(new Docs(this, values)); } + /** + * Doc class + * + * @opensearch.internal + */ private static class Docs extends AbstractSortedDocValues { private final int maxOrd; diff --git a/server/src/main/java/org/opensearch/index/fielddata/plain/AbstractIndexOrdinalsFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/plain/AbstractIndexOrdinalsFieldData.java index 7dab513372235..0b3a5e09064ab 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/plain/AbstractIndexOrdinalsFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/plain/AbstractIndexOrdinalsFieldData.java @@ -182,6 +182,8 @@ public boolean supportsGlobalOrdinalsMapping() { *

* Note that the .beforeLoad(...) and .afterLoad(...) methods must be * manually called. + * + * @opensearch.internal */ public interface PerValueEstimator { diff --git a/server/src/main/java/org/opensearch/index/fielddata/plain/AbstractLatLonPointIndexFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/plain/AbstractLatLonPointIndexFieldData.java index d094acf4ca79d..6e9a13074a445 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/plain/AbstractLatLonPointIndexFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/plain/AbstractLatLonPointIndexFieldData.java @@ -100,6 +100,11 @@ public BucketedSort newBucketedSort( throw new IllegalArgumentException("can't sort on geo_point field without using specific sorting feature, like geo_distance"); } + /** + * Lucene LatLonPoint as indexed field data type + * + * @opensearch.internal + */ public static class LatLonPointIndexFieldData extends AbstractLatLonPointIndexFieldData { public LatLonPointIndexFieldData(String fieldName, ValuesSourceType valuesSourceType) { super(fieldName, valuesSourceType); @@ -138,6 +143,11 @@ static void checkCompatible(FieldInfo fieldInfo) { } } + /** + * Builder for LatLonPoint based field data + * + * @opensearch.internal + */ public static class Builder implements IndexFieldData.Builder { private final String name; private final ValuesSourceType valuesSourceType; diff --git a/server/src/main/java/org/opensearch/index/fielddata/plain/BinaryIndexFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/plain/BinaryIndexFieldData.java index 6d3c1b8c14430..3fbc605e35e1d 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/plain/BinaryIndexFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/plain/BinaryIndexFieldData.java @@ -54,6 +54,11 @@ */ public class BinaryIndexFieldData implements IndexFieldData { + /** + * Builder for binary index field data + * + * @opensearch.internal + */ public static class Builder implements IndexFieldData.Builder { private final String name; private final ValuesSourceType valuesSourceType; diff --git a/server/src/main/java/org/opensearch/index/fielddata/plain/BytesBinaryIndexFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/plain/BytesBinaryIndexFieldData.java index dbcbb26c5287e..e1a08344e68c7 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/plain/BytesBinaryIndexFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/plain/BytesBinaryIndexFieldData.java @@ -107,6 +107,11 @@ public BytesBinaryDVLeafFieldData loadDirect(LeafReaderContext context) throws E return load(context); } + /** + * Builder for bytes binary index field data + * + * @opensearch.internal + */ public static class Builder implements IndexFieldData.Builder { private final String name; private final ValuesSourceType valuesSourceType; diff --git a/server/src/main/java/org/opensearch/index/fielddata/plain/ConstantIndexFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/plain/ConstantIndexFieldData.java index 1092b5ecb847f..2b08498f2b58b 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/plain/ConstantIndexFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/plain/ConstantIndexFieldData.java @@ -66,6 +66,11 @@ */ public class ConstantIndexFieldData extends AbstractIndexOrdinalsFieldData { + /** + * Builder for Constant Index Field Data + * + * @opensearch.internal + */ public static class Builder implements IndexFieldData.Builder { private final String constantValue; @@ -84,6 +89,11 @@ public IndexFieldData build(IndexFieldDataCache cache, CircuitBreakerService } } + /** + * Field data for constant values + * + * @opensearch.internal + */ private static class ConstantLeafFieldData extends AbstractLeafOrdinalsFieldData { private final String value; diff --git a/server/src/main/java/org/opensearch/index/fielddata/plain/PagedBytesIndexFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/plain/PagedBytesIndexFieldData.java index 4b6cb287a078f..8f6a1e46ef417 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/plain/PagedBytesIndexFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/plain/PagedBytesIndexFieldData.java @@ -74,6 +74,11 @@ public class PagedBytesIndexFieldData extends AbstractIndexOrdinalsFieldData { private final double minFrequency, maxFrequency; private final int minSegmentSize; + /** + * Builder for paged bytes index field data + * + * @opensearch.internal + */ public static class Builder implements IndexFieldData.Builder { private final String name; private final double minFrequency, maxFrequency; @@ -280,6 +285,11 @@ public void afterLoad(TermsEnum termsEnum, long actualUsed) { } } + /** + * A frequency filter + * + * @opensearch.internal + */ private static final class FrequencyFilter extends FilteredTermsEnum { private final int minFreq; private final int maxFreq; diff --git a/server/src/main/java/org/opensearch/index/fielddata/plain/PagedBytesLeafFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/plain/PagedBytesLeafFieldData.java index b54dccfb82f8f..0dcdef19b1357 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/plain/PagedBytesLeafFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/plain/PagedBytesLeafFieldData.java @@ -89,6 +89,11 @@ public SortedSetDocValues getOrdinalsValues() { return ordinals.ordinals(new ValuesHolder(bytes, termOrdToBytesOffset)); } + /** + * Value holder for paged bytes leaf field data + * + * @opensearch.internal + */ private static class ValuesHolder implements Ordinals.ValuesHolder { private final BytesRef scratch = new BytesRef(); diff --git a/server/src/main/java/org/opensearch/index/fielddata/plain/SortedNumericIndexFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/plain/SortedNumericIndexFieldData.java index 65a3b8563a4ce..3ba11e3071192 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/plain/SortedNumericIndexFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/plain/SortedNumericIndexFieldData.java @@ -69,6 +69,12 @@ * @opensearch.internal */ public class SortedNumericIndexFieldData extends IndexNumericFieldData { + + /** + * Builder for sorted numeric index field data + * + * @opensearch.internal + */ public static class Builder implements IndexFieldData.Builder { private final String name; private final NumericType numericType; @@ -229,6 +235,8 @@ public Object nextValue() throws IOException { * for the case where documents have at most one value. In this case * {@link DocValues#unwrapSingleton(SortedNumericDocValues)} will return * the underlying single-valued NumericDocValues representation. + * + * @opensearch.internal */ static final class SortedNumericLongFieldData extends LeafLongFieldData { final LeafReader reader; @@ -267,6 +275,8 @@ public Collection getChildResources() { * for the case where documents have at most one value. In this case * {@link FieldData#unwrapSingleton(SortedNumericDoubleValues)} will return * the underlying single-valued NumericDoubleValues representation. + * + * @opensearch.internal */ static final class SortedNumericHalfFloatFieldData extends LeafDoubleFieldData { final LeafReader reader; @@ -302,6 +312,8 @@ public Collection getChildResources() { /** * Wraps a NumericDocValues and exposes a single 16-bit float per document. + * + * @opensearch.internal */ static final class SingleHalfFloatValues extends NumericDoubleValues { final NumericDocValues in; @@ -323,6 +335,8 @@ public boolean advanceExact(int doc) throws IOException { /** * Wraps a SortedNumericDocValues and exposes multiple 16-bit floats per document. + * + * @opensearch.internal */ static final class MultiHalfFloatValues extends SortedNumericDoubleValues { final SortedNumericDocValues in; @@ -359,6 +373,8 @@ public int docValueCount() { * for the case where documents have at most one value. In this case * {@link FieldData#unwrapSingleton(SortedNumericDoubleValues)} will return * the underlying single-valued NumericDoubleValues representation. + * + * @opensearch.internal */ static final class SortedNumericFloatFieldData extends LeafDoubleFieldData { final LeafReader reader; @@ -394,6 +410,8 @@ public Collection getChildResources() { /** * Wraps a NumericDocValues and exposes a single 32-bit float per document. + * + * @opensearch.internal */ static final class SingleFloatValues extends NumericDoubleValues { final NumericDocValues in; @@ -415,6 +433,8 @@ public boolean advanceExact(int doc) throws IOException { /** * Wraps a SortedNumericDocValues and exposes multiple 32-bit floats per document. + * + * @opensearch.internal */ static final class MultiFloatValues extends SortedNumericDoubleValues { final SortedNumericDocValues in; @@ -451,6 +471,8 @@ public int docValueCount() { * for the case where documents have at most one value. In this case * {@link FieldData#unwrapSingleton(SortedNumericDoubleValues)} will return * the underlying single-valued NumericDoubleValues representation. + * + * @opensearch.internal */ static final class SortedNumericDoubleFieldData extends LeafDoubleFieldData { final LeafReader reader; diff --git a/server/src/main/java/org/opensearch/index/fielddata/plain/SortedSetOrdinalsIndexFieldData.java b/server/src/main/java/org/opensearch/index/fielddata/plain/SortedSetOrdinalsIndexFieldData.java index 682b3de27a04a..801186bbc4379 100644 --- a/server/src/main/java/org/opensearch/index/fielddata/plain/SortedSetOrdinalsIndexFieldData.java +++ b/server/src/main/java/org/opensearch/index/fielddata/plain/SortedSetOrdinalsIndexFieldData.java @@ -62,6 +62,11 @@ */ public class SortedSetOrdinalsIndexFieldData extends AbstractIndexOrdinalsFieldData { + /** + * Builder for sorted set ordinals + * + * @opensearch.internal + */ public static class Builder implements IndexFieldData.Builder { private final String name; private final Function> scriptFunction; diff --git a/server/src/main/java/org/opensearch/index/flush/FlushStats.java b/server/src/main/java/org/opensearch/index/flush/FlushStats.java index 2490f22416c83..94be2c02df51b 100644 --- a/server/src/main/java/org/opensearch/index/flush/FlushStats.java +++ b/server/src/main/java/org/opensearch/index/flush/FlushStats.java @@ -125,6 +125,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for flush statistics + * + * @opensearch.internal + */ static final class Fields { static final String FLUSH = "flush"; static final String TOTAL = "total"; diff --git a/server/src/main/java/org/opensearch/index/get/GetStats.java b/server/src/main/java/org/opensearch/index/get/GetStats.java index 06dc19e6349c1..54f6dc679fadd 100644 --- a/server/src/main/java/org/opensearch/index/get/GetStats.java +++ b/server/src/main/java/org/opensearch/index/get/GetStats.java @@ -145,6 +145,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for get statistics + * + * @opensearch.internal + */ static final class Fields { static final String GET = "get"; static final String TOTAL = "total"; diff --git a/server/src/main/java/org/opensearch/index/mapper/AbstractGeometryFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/AbstractGeometryFieldMapper.java index dd7a1fd3e027a..a4d8222896bc3 100644 --- a/server/src/main/java/org/opensearch/index/mapper/AbstractGeometryFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/AbstractGeometryFieldMapper.java @@ -67,11 +67,21 @@ */ public abstract class AbstractGeometryFieldMapper extends FieldMapper { + /** + * String parameter names for the base geometry field mapper + * + * @opensearch.internal + */ public static class Names { public static final ParseField IGNORE_MALFORMED = new ParseField("ignore_malformed"); public static final ParseField IGNORE_Z_VALUE = new ParseField("ignore_z_value"); } + /** + * Default parameters for the base geometry field mapper + * + * @opensearch.internal + */ public static class Defaults { public static final Explicit IGNORE_MALFORMED = new Explicit<>(false, false); public static final Explicit IGNORE_Z_VALUE = new Explicit<>(true, false); @@ -86,6 +96,8 @@ public static class Defaults { /** * Interface representing an preprocessor in geometry indexing pipeline + * + * @opensearch.internal */ public interface Indexer { Processed prepareForIndexing(Parsed geometry); @@ -97,6 +109,8 @@ public interface Indexer { /** * Interface representing parser in geometry indexing pipeline. + * + * @opensearch.internal */ public abstract static class Parser { /** @@ -143,6 +157,11 @@ public Object parseAndFormatObject(Object value, String format) { } } + /** + * Builder for the base geometry field mapper + * + * @opensearch.internal + */ public abstract static class Builder, FT extends AbstractGeometryFieldType> extends FieldMapper.Builder { protected Boolean ignoreMalformed; protected Boolean ignoreZValue; @@ -200,6 +219,11 @@ public Builder ignoreZValue(final boolean ignoreZValue) { } } + /** + * Base type parser for geometry field mappers + * + * @opensearch.internal + */ public abstract static class TypeParser implements Mapper.TypeParser { protected abstract T newBuilder(String name, Map params); @@ -243,6 +267,11 @@ public T parse(String name, Map node, ParserContext parserContex } } + /** + * Base field type for all geometry fields + * + * @opensearch.internal + */ public abstract static class AbstractGeometryFieldType extends MappedFieldType { protected Indexer geometryIndexer; diff --git a/server/src/main/java/org/opensearch/index/mapper/AbstractPointGeometryFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/AbstractPointGeometryFieldMapper.java index a5e8f4d1d10e4..b546eeca1ec0a 100644 --- a/server/src/main/java/org/opensearch/index/mapper/AbstractPointGeometryFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/AbstractPointGeometryFieldMapper.java @@ -63,6 +63,11 @@ */ public abstract class AbstractPointGeometryFieldMapper extends AbstractGeometryFieldMapper { + /** + * Common parameter names for the base point geometry field mapper + * + * @opensearch.internal + */ public static class Names extends AbstractGeometryFieldMapper.Names { public static final ParseField NULL_VALUE = new ParseField("null_value"); } @@ -74,6 +79,11 @@ public static class Names extends AbstractGeometryFieldMapper.Names { DEFAULT_FIELD_TYPE.freeze(); } + /** + * Base builder for the base point geometry field mapper + * + * @opensearch.internal + */ public abstract static class Builder, FT extends AbstractPointGeometryFieldType> extends AbstractGeometryFieldMapper.Builder { @@ -113,6 +123,11 @@ public AbstractPointGeometryFieldMapper build(BuilderContext context) { } } + /** + * Base type parser for the base point geometry field mapper + * + * @opensearch.internal + */ public abstract static class TypeParser extends AbstractGeometryFieldMapper.TypeParser { protected abstract ParsedPoint parseNullValue(Object nullValue, boolean ignoreZValue, boolean ignoreMalformed); @@ -144,6 +159,11 @@ public T parse(String name, Map node, Map params ParsedPoint nullValue; + /** + * Base field type for the base point geometry field mapper + * + * @opensearch.internal + */ public abstract static class AbstractPointGeometryFieldType extends AbstractGeometryFieldType { protected AbstractPointGeometryFieldType( String name, @@ -197,7 +217,11 @@ public ParsedPoint nullValue() { return nullValue; } - /** represents a Point that has been parsed by {@link PointParser} */ + /** + * represents a Point that has been parsed by {@link PointParser} + * + * @opensearch.internal + */ public interface ParsedPoint { void validate(String fieldName); @@ -212,7 +236,11 @@ default boolean isNormalizable(double coord) { } } - /** A parser implementation that can parse the various point formats */ + /** + * A parser implementation that can parse the various point formats + * + * @opensearch.internal + */ public static class PointParser

extends Parser> { /** * Note that this parser is only used for formatting values. diff --git a/server/src/main/java/org/opensearch/index/mapper/AbstractShapeGeometryFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/AbstractShapeGeometryFieldMapper.java index 4586360f8ce82..8f3e76f7bc4dd 100644 --- a/server/src/main/java/org/opensearch/index/mapper/AbstractShapeGeometryFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/AbstractShapeGeometryFieldMapper.java @@ -53,16 +53,31 @@ */ public abstract class AbstractShapeGeometryFieldMapper extends AbstractGeometryFieldMapper { + /** + * Common parameters for the base shape geometry field mapper + * + * @opensearch.internal + */ public static class Names extends AbstractGeometryFieldMapper.Names { public static final ParseField ORIENTATION = new ParseField("orientation"); public static final ParseField COERCE = new ParseField("coerce"); } + /** + * Parameter defaults for the base shape geometry field mapper + * + * @opensearch.internal + */ public static class Defaults extends AbstractGeometryFieldMapper.Defaults { public static final Explicit ORIENTATION = new Explicit<>(Orientation.RIGHT, false); public static final Explicit COERCE = new Explicit<>(false, false); } + /** + * Base builder for the base shape geometry field mapper + * + * @opensearch.internal + */ public abstract static class Builder, FT extends AbstractShapeGeometryFieldType> extends AbstractGeometryFieldMapper.Builder { protected Boolean coerce; @@ -124,6 +139,11 @@ protected Explicit orientation() { protected static final String DEPRECATED_PARAMETERS_KEY = "deprecated_parameters"; + /** + * Base type parser for the base shape geometry field mapper + * + * @opensearch.internal + */ public abstract static class TypeParser extends AbstractGeometryFieldMapper.TypeParser { protected abstract Builder newBuilder(String name, Map params); @@ -180,6 +200,11 @@ public Builder parse(String name, Map node, Map } } + /** + * Base field type for the base shape geometry field mapper + * + * @opensearch.internal + */ public abstract static class AbstractShapeGeometryFieldType extends AbstractGeometryFieldType { protected Orientation orientation = Defaults.ORIENTATION.value(); diff --git a/server/src/main/java/org/opensearch/index/mapper/BinaryFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/BinaryFieldMapper.java index ccc532d0539be..fdcaaf6ba36c8 100644 --- a/server/src/main/java/org/opensearch/index/mapper/BinaryFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/BinaryFieldMapper.java @@ -72,6 +72,11 @@ private static BinaryFieldMapper toType(FieldMapper in) { return (BinaryFieldMapper) in; } + /** + * Builder for the binary field mapper + * + * @opensearch.internal + */ public static class Builder extends ParametrizedFieldMapper.Builder { private final Parameter stored = Parameter.storeParam(m -> toType(m).stored, false); @@ -106,6 +111,11 @@ public BinaryFieldMapper build(BuilderContext context) { public static final TypeParser PARSER = new TypeParser((n, c) -> new Builder(n)); + /** + * Binary field type + * + * @opensearch.internal + */ public static final class BinaryFieldType extends MappedFieldType { private BinaryFieldType(String name, boolean isStored, boolean hasDocValues, Map meta) { @@ -223,6 +233,11 @@ protected String contentType() { return CONTENT_TYPE; } + /** + * Custom binary doc values field for the binary field mapper + * + * @opensearch.internal + */ public static class CustomBinaryDocValuesField extends CustomDocValuesField { private final ObjectArrayList bytesList; diff --git a/server/src/main/java/org/opensearch/index/mapper/BooleanFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/BooleanFieldMapper.java index 5d22a0f097298..81584c4419753 100644 --- a/server/src/main/java/org/opensearch/index/mapper/BooleanFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/BooleanFieldMapper.java @@ -68,6 +68,11 @@ public class BooleanFieldMapper extends ParametrizedFieldMapper { public static final String CONTENT_TYPE = "boolean"; + /** + * Default parameters for the boolean field mapper + * + * @opensearch.internal + */ public static class Defaults { public static final FieldType FIELD_TYPE = new FieldType(); @@ -79,6 +84,11 @@ public static class Defaults { } } + /** + * Values that can be used for this field mapper + * + * @opensearch.internal + */ public static class Values { public static final BytesRef TRUE = new BytesRef("T"); public static final BytesRef FALSE = new BytesRef("F"); @@ -88,6 +98,11 @@ private static BooleanFieldMapper toType(FieldMapper in) { return (BooleanFieldMapper) in; } + /** + * Builder for this field mapper + * + * @opensearch.internal + */ public static class Builder extends ParametrizedFieldMapper.Builder { private final Parameter docValues = Parameter.docValuesParam(m -> toType(m).hasDocValues, true); @@ -131,6 +146,11 @@ public BooleanFieldMapper build(BuilderContext context) { public static final TypeParser PARSER = new TypeParser((n, c) -> new Builder(n)); + /** + * Field type for boolean field mapper + * + * @opensearch.internal + */ public static final class BooleanFieldType extends TermBasedFieldType { private final Boolean nullValue; diff --git a/server/src/main/java/org/opensearch/index/mapper/CompletionFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/CompletionFieldMapper.java index 73b2603f16221..143ee9a96a00c 100644 --- a/server/src/main/java/org/opensearch/index/mapper/CompletionFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/CompletionFieldMapper.java @@ -106,6 +106,11 @@ public ParametrizedFieldMapper.Builder getMergeBuilder() { return new Builder(simpleName(), defaultAnalyzer, indexVersionCreated).init(this); } + /** + * Default parameters + * + * @opensearch.internal + */ public static class Defaults { public static final FieldType FIELD_TYPE = new FieldType(); static { @@ -121,6 +126,11 @@ public static class Defaults { public static final int DEFAULT_MAX_INPUT_LENGTH = 50; } + /** + * Parameter fields + * + * @opensearch.internal + */ public static class Fields { // Content field names public static final String CONTENT_FIELD_NAME_INPUT = "input"; @@ -134,6 +144,8 @@ private static CompletionFieldMapper toType(FieldMapper in) { /** * Builder for {@link CompletionFieldMapper} + * + * @opensearch.internal */ public static class Builder extends ParametrizedFieldMapper.Builder { @@ -255,6 +267,11 @@ private void checkCompletionContextsLimit(BuilderContext context) { (n, c) -> new Builder(n, c.getIndexAnalyzers().get("simple"), c.indexVersionCreated()) ); + /** + * Field type for Completion Field Mapper + * + * @opensearch.internal + */ public static final class CompletionFieldType extends TermBasedFieldType { private static PostingsFormat postingsFormat; @@ -608,6 +625,11 @@ private void parse(ParseContext parseContext, Token token, XContentParser parser } } + /** + * Metadata for completion input + * + * @opensearch.internal + */ static class CompletionInputMetadata { public final String input; public final Map> contexts; diff --git a/server/src/main/java/org/opensearch/index/mapper/DataStreamFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/DataStreamFieldMapper.java index a94d85916338a..4d03d5f67e7d5 100644 --- a/server/src/main/java/org/opensearch/index/mapper/DataStreamFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/DataStreamFieldMapper.java @@ -32,11 +32,21 @@ public class DataStreamFieldMapper extends MetadataFieldMapper { public static final String NAME = "_data_stream_timestamp"; public static final String CONTENT_TYPE = "_data_stream_timestamp"; + /** + * Default parameters + * + * @opensearch.internal + */ public static final class Defaults { public static final boolean ENABLED = false; public static final TimestampField TIMESTAMP_FIELD = new TimestampField("@timestamp"); } + /** + * Builder for the field mapper + * + * @opensearch.internal + */ public static final class Builder extends MetadataFieldMapper.Builder { final Parameter enabledParam = Parameter.boolParam("enabled", false, mapper -> toType(mapper).enabled, Defaults.ENABLED); @@ -63,6 +73,11 @@ public MetadataFieldMapper build(BuilderContext context) { } } + /** + * Field type for data stream field mapper + * + * @opensearch.internal + */ public static final class DataStreamFieldType extends MappedFieldType { public static final DataStreamFieldType INSTANCE = new DataStreamFieldType(); diff --git a/server/src/main/java/org/opensearch/index/mapper/DateFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/DateFieldMapper.java index 0aef814f3dedb..8e01c1f41f078 100644 --- a/server/src/main/java/org/opensearch/index/mapper/DateFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/DateFieldMapper.java @@ -94,6 +94,11 @@ public final class DateFieldMapper extends ParametrizedFieldMapper { public static final String DATE_NANOS_CONTENT_TYPE = "date_nanos"; public static final DateFormatter DEFAULT_DATE_TIME_FORMATTER = DateFormatter.forPattern("strict_date_optional_time||epoch_millis"); + /** + * Resolution of the date time + * + * @opensearch.internal + */ public enum Resolution { MILLISECONDS(CONTENT_TYPE, NumericType.DATE) { @Override @@ -201,6 +206,11 @@ private static DateFieldMapper toType(FieldMapper in) { return (DateFieldMapper) in; } + /** + * Builder for the date field mapper + * + * @opensearch.internal + */ public static class Builder extends ParametrizedFieldMapper.Builder { private final Parameter index = Parameter.indexParam(m -> toType(m).indexed, true); @@ -312,6 +322,11 @@ public DateFieldMapper build(BuilderContext context) { return new Builder(n, Resolution.NANOSECONDS, c.getDateFormatter(), ignoreMalformedByDefault, c.indexVersionCreated()); }); + /** + * Field type for date field mapper + * + * @opensearch.internal + */ public static final class DateFieldType extends MappedFieldType { protected final DateFormatter dateTimeFormatter; protected final DateMathParser dateMathParser; diff --git a/server/src/main/java/org/opensearch/index/mapper/DocValueFetcher.java b/server/src/main/java/org/opensearch/index/mapper/DocValueFetcher.java index dd15f72bbd45e..bf14af809fbfd 100644 --- a/server/src/main/java/org/opensearch/index/mapper/DocValueFetcher.java +++ b/server/src/main/java/org/opensearch/index/mapper/DocValueFetcher.java @@ -74,6 +74,11 @@ public List fetchValues(SourceLookup lookup) throws IOException { return result; } + /** + * Leaf interface + * + * @opensearch.internal + */ public interface Leaf { /** * Advance the doc values reader to the provided doc. diff --git a/server/src/main/java/org/opensearch/index/mapper/DocumentMapper.java b/server/src/main/java/org/opensearch/index/mapper/DocumentMapper.java index 6c3851315fc60..1e5b3b4a9c93e 100644 --- a/server/src/main/java/org/opensearch/index/mapper/DocumentMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/DocumentMapper.java @@ -70,6 +70,11 @@ */ public class DocumentMapper implements ToXContentFragment { + /** + * Builder for the Document Field Mapper + * + * @opensearch.internal + */ public static class Builder { private final Map, MetadataFieldMapper> metadataMappers = new LinkedHashMap<>(); diff --git a/server/src/main/java/org/opensearch/index/mapper/DynamicTemplate.java b/server/src/main/java/org/opensearch/index/mapper/DynamicTemplate.java index 8a418a7272b0a..c91373860213d 100644 --- a/server/src/main/java/org/opensearch/index/mapper/DynamicTemplate.java +++ b/server/src/main/java/org/opensearch/index/mapper/DynamicTemplate.java @@ -51,6 +51,11 @@ */ public class DynamicTemplate implements ToXContentObject { + /** + * Match type of the template + * + * @opensearch.internal + */ public enum MatchType { SIMPLE { @Override @@ -88,7 +93,11 @@ public static MatchType fromString(String value) { public abstract boolean matches(String regex, String value); } - /** The type of a field as detected while parsing a json document. */ + /** + * The type of a field as detected while parsing a json document. + * + * @opensearch.internal + */ public enum XContentFieldType { OBJECT { @Override diff --git a/server/src/main/java/org/opensearch/index/mapper/FieldAliasMapper.java b/server/src/main/java/org/opensearch/index/mapper/FieldAliasMapper.java index 30f7de09e6304..7c0280a7272a0 100644 --- a/server/src/main/java/org/opensearch/index/mapper/FieldAliasMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/FieldAliasMapper.java @@ -52,6 +52,11 @@ public final class FieldAliasMapper extends Mapper { public static final String CONTENT_TYPE = "alias"; + /** + * Parameter names + * + * @opensearch.internal + */ public static class Names { public static final String PATH = "path"; } @@ -138,6 +143,11 @@ public void validate(MappingLookup mappers) { } } + /** + * The type parser + * + * @opensearch.internal + */ public static class TypeParser implements Mapper.TypeParser { @Override public Mapper.Builder parse(String name, Map node, ParserContext parserContext) throws MapperParsingException { @@ -151,6 +161,11 @@ public Mapper.Builder parse(String name, Map node, ParserContext } } + /** + * The bulider for the field alias field mapper + * + * @opensearch.internal + */ public static class Builder extends Mapper.Builder { private String name; private String path; diff --git a/server/src/main/java/org/opensearch/index/mapper/FieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/FieldMapper.java index bd5a671887ef2..137ca4be1ca87 100644 --- a/server/src/main/java/org/opensearch/index/mapper/FieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/FieldMapper.java @@ -73,6 +73,11 @@ public abstract class FieldMapper extends Mapper implements Cloneable { ); public static final Setting COERCE_SETTING = Setting.boolSetting("index.mapping.coerce", false, Property.IndexScope); + /** + * Base builder for all field mappers + * + * @opensearch.internal + */ public abstract static class Builder> extends Mapper.Builder { protected final FieldType fieldType; @@ -560,12 +565,22 @@ protected static String indexOptionToString(IndexOptions indexOption) { protected abstract String contentType(); + /** + * Multi field implementation used across field mappers + * + * @opensearch.internal + */ public static class MultiFields implements Iterable { public static MultiFields empty() { return new MultiFields(ImmutableOpenMap.of()); } + /** + * Concrete builder for field mappers + * + * @opensearch.internal + */ public static class Builder { private final ImmutableOpenMap.Builder mapperBuilders = ImmutableOpenMap.builder(); @@ -689,6 +704,8 @@ public int compare(Mapper o1, Mapper o2) { /** * Represents a list of fields with optional boost factor where the current field should be copied to + * + * @opensearch.internal */ public static class CopyTo { @@ -715,6 +732,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Builder for the copyTo field + * + * @opensearch.internal + */ public static class Builder { private final List copyToBuilders = new ArrayList<>(); diff --git a/server/src/main/java/org/opensearch/index/mapper/FieldNamesFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/FieldNamesFieldMapper.java index 24793e916047b..dc2ea1f35f8b8 100644 --- a/server/src/main/java/org/opensearch/index/mapper/FieldNamesFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/FieldNamesFieldMapper.java @@ -64,6 +64,11 @@ public ParametrizedFieldMapper.Builder getMergeBuilder() { return new Builder(indexVersionCreated).init(this); } + /** + * Parameter defaults + * + * @opensearch.internal + */ public static class Defaults { public static final String NAME = FieldNamesFieldMapper.NAME; @@ -87,6 +92,11 @@ private static FieldNamesFieldMapper toType(FieldMapper in) { "Disabling _field_names is not necessary because it no longer carries a large index overhead. Support for the `enabled` " + "setting will be removed in a future major version. Please remove it from your mappings and templates."; + /** + * Builder for the FieldNames field mapper + * + * @opensearch.internal + */ static class Builder extends MetadataFieldMapper.Builder { private final Parameter> enabled = updateableBoolParam( @@ -122,6 +132,11 @@ public FieldNamesFieldMapper build(BuilderContext context) { c -> new Builder(c.indexVersionCreated()) ); + /** + * Field type for FieldNames field mapper + * + * @opensearch.internal + */ public static final class FieldNamesFieldType extends TermBasedFieldType { private final boolean enabled; diff --git a/server/src/main/java/org/opensearch/index/mapper/GeoPointFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/GeoPointFieldMapper.java index 3dfdfdb87f8b9..e3dab3f892949 100644 --- a/server/src/main/java/org/opensearch/index/mapper/GeoPointFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/GeoPointFieldMapper.java @@ -78,6 +78,11 @@ public class GeoPointFieldMapper extends AbstractPointGeometryFieldMapper { public Builder(String name) { @@ -107,6 +112,11 @@ public GeoPointFieldMapper build( } } + /** + * Concrete parser for geo_point types + * + * @opensearch.internal + */ public static class TypeParser extends AbstractPointGeometryFieldMapper.TypeParser { @Override protected Builder newBuilder(String name, Map params) { @@ -189,6 +199,11 @@ public GeoPointFieldType fieldType() { return (GeoPointFieldType) mappedFieldType; } + /** + * Concrete field type for geo_point + * + * @opensearch.internal + */ public static class GeoPointFieldType extends AbstractPointGeometryFieldType, List> implements GeoShapeQueryable { @@ -242,6 +257,11 @@ public Query distanceFeatureQuery(Object origin, String pivot, float boost, Quer // Eclipse requires the AbstractPointGeometryFieldMapper prefix or it can't find ParsedPoint // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=565255 + /** + * A geo point parsed from geojson + * + * @opensearch.internal + */ protected static class ParsedGeoPoint extends GeoPoint implements AbstractPointGeometryFieldMapper.ParsedPoint { @Override public void validate(String fieldName) { @@ -299,6 +319,11 @@ public int hashCode() { } } + /** + * The indexer for geo_point + * + * @opensearch.internal + */ protected static class GeoPointIndexer implements Indexer, List> { protected final GeoPointFieldType fieldType; diff --git a/server/src/main/java/org/opensearch/index/mapper/GeoShapeFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/GeoShapeFieldMapper.java index aeda2a2d93f12..f0cc6839d6e7c 100644 --- a/server/src/main/java/org/opensearch/index/mapper/GeoShapeFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/GeoShapeFieldMapper.java @@ -78,6 +78,11 @@ public class GeoShapeFieldMapper extends AbstractShapeGeometryFieldMapper { public Builder(String name) { @@ -110,6 +115,11 @@ public GeoShapeFieldMapper build(BuilderContext context) { } } + /** + * Concrete field type for geo_shape fields + * + * @opensearch.internal + */ public static class GeoShapeFieldType extends AbstractShapeGeometryFieldType implements GeoShapeQueryable { private final VectorGeoShapeQueryProcessor queryProcessor; @@ -130,6 +140,11 @@ public Query geoShapeQuery(Geometry shape, String fieldName, ShapeRelation relat } } + /** + * The type parser + * + * @opensearch.internal + */ public static final class TypeParser extends AbstractShapeGeometryFieldMapper.TypeParser { @Override diff --git a/server/src/main/java/org/opensearch/index/mapper/GeoShapeIndexer.java b/server/src/main/java/org/opensearch/index/mapper/GeoShapeIndexer.java index 8a1712c0f9645..758798dc514c2 100644 --- a/server/src/main/java/org/opensearch/index/mapper/GeoShapeIndexer.java +++ b/server/src/main/java/org/opensearch/index/mapper/GeoShapeIndexer.java @@ -202,6 +202,11 @@ public List indexShape(ParseContext context, Geometry shape) { return visitor.fields(); } + /** + * The shape indexer + * + * @opensearch.internal + */ private static class LuceneGeometryIndexer implements GeometryVisitor { private List fields = new ArrayList<>(); private final String name; diff --git a/server/src/main/java/org/opensearch/index/mapper/IdFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/IdFieldMapper.java index a3c4153ec5373..4b1395ac02bf1 100644 --- a/server/src/main/java/org/opensearch/index/mapper/IdFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/IdFieldMapper.java @@ -87,6 +87,11 @@ public class IdFieldMapper extends MetadataFieldMapper { public static final String CONTENT_TYPE = "_id"; + /** + * Default parameters + * + * @opensearch.internal + */ public static class Defaults { public static final String NAME = IdFieldMapper.NAME; @@ -112,6 +117,11 @@ public static class Defaults { public static final TypeParser PARSER = new FixedTypeParser(c -> new IdFieldMapper(() -> c.mapperService().isIdFieldDataEnabled())); + /** + * Field type for ID field + * + * @opensearch.internal + */ static final class IdFieldType extends TermBasedFieldType { private final Supplier fieldDataEnabled; diff --git a/server/src/main/java/org/opensearch/index/mapper/IgnoredFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/IgnoredFieldMapper.java index 69e0c414bbcde..0db795d99c7e0 100644 --- a/server/src/main/java/org/opensearch/index/mapper/IgnoredFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/IgnoredFieldMapper.java @@ -53,6 +53,11 @@ public final class IgnoredFieldMapper extends MetadataFieldMapper { public static final String CONTENT_TYPE = "_ignored"; + /** + * Default parameters + * + * @opensearch.internal + */ public static class Defaults { public static final String NAME = IgnoredFieldMapper.NAME; @@ -69,6 +74,11 @@ public static class Defaults { public static final TypeParser PARSER = new FixedTypeParser(c -> new IgnoredFieldMapper()); + /** + * Field type for Ignored fields + * + * @opensearch.internal + */ public static final class IgnoredFieldType extends StringFieldType { public static final IgnoredFieldType INSTANCE = new IgnoredFieldType(); diff --git a/server/src/main/java/org/opensearch/index/mapper/IndexFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/IndexFieldMapper.java index 22feeed3fe675..8cc307f7697c6 100644 --- a/server/src/main/java/org/opensearch/index/mapper/IndexFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/IndexFieldMapper.java @@ -57,6 +57,11 @@ public class IndexFieldMapper extends MetadataFieldMapper { public static final TypeParser PARSER = new FixedTypeParser(c -> new IndexFieldMapper()); + /** + * Field type for Index field mapper + * + * @opensearch.internal + */ static final class IndexFieldType extends ConstantFieldType { static final IndexFieldType INSTANCE = new IndexFieldType(); diff --git a/server/src/main/java/org/opensearch/index/mapper/IpFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/IpFieldMapper.java index aa5a5638776cf..2a677d8bc1352 100644 --- a/server/src/main/java/org/opensearch/index/mapper/IpFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/IpFieldMapper.java @@ -78,6 +78,11 @@ private static IpFieldMapper toType(FieldMapper in) { return (IpFieldMapper) in; } + /** + * Builder + * + * @opensearch.internal + */ public static class Builder extends ParametrizedFieldMapper.Builder { private final Parameter indexed = Parameter.indexParam(m -> toType(m).indexed, true); @@ -155,6 +160,11 @@ public IpFieldMapper build(BuilderContext context) { return new Builder(n, ignoreMalformedByDefault, c.indexVersionCreated()); }); + /** + * Field type for IP fields + * + * @opensearch.internal + */ public static final class IpFieldType extends SimpleMappedFieldType { private final InetAddress nullValue; @@ -305,6 +315,11 @@ public static Query rangeQuery( return builder.apply(lower, upper); } + /** + * Field type for IP Scripted doc values + * + * @opensearch.internal + */ public static final class IpScriptDocValues extends ScriptDocValues { private final SortedSetDocValues in; diff --git a/server/src/main/java/org/opensearch/index/mapper/KeywordFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/KeywordFieldMapper.java index cde2fb1b93668..0b85ba0d2ccd8 100644 --- a/server/src/main/java/org/opensearch/index/mapper/KeywordFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/KeywordFieldMapper.java @@ -68,6 +68,11 @@ public final class KeywordFieldMapper extends ParametrizedFieldMapper { public static final String CONTENT_TYPE = "keyword"; + /** + * Default parameters + * + * @opensearch.internal + */ public static class Defaults { public static final FieldType FIELD_TYPE = new FieldType(); @@ -79,6 +84,11 @@ public static class Defaults { } } + /** + * The keyword field for the field mapper + * + * @opensearch.internal + */ public static class KeywordField extends Field { public KeywordField(String field, BytesRef term, FieldType ft) { @@ -91,6 +101,11 @@ private static KeywordFieldMapper toType(FieldMapper in) { return (KeywordFieldMapper) in; } + /** + * The builder for the field mapper + * + * @opensearch.internal + */ public static class Builder extends ParametrizedFieldMapper.Builder { private final Parameter indexed = Parameter.indexParam(m -> toType(m).indexed, true); @@ -225,6 +240,11 @@ public KeywordFieldMapper build(BuilderContext context) { public static final TypeParser PARSER = new TypeParser((n, c) -> new Builder(n, c.getIndexAnalyzers())); + /** + * Field type for keyword fields + * + * @opensearch.internal + */ public static final class KeywordFieldType extends StringFieldType { private final int ignoreAbove; diff --git a/server/src/main/java/org/opensearch/index/mapper/LegacyGeoShapeFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/LegacyGeoShapeFieldMapper.java index fc64d173d75f2..71d76c6a835c2 100644 --- a/server/src/main/java/org/opensearch/index/mapper/LegacyGeoShapeFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/LegacyGeoShapeFieldMapper.java @@ -101,8 +101,18 @@ public class LegacyGeoShapeFieldMapper extends AbstractShapeGeometryFieldMapper< public static final String CONTENT_TYPE = "geo_shape"; + /** + * Legacy prefix tree parameters that are now deprecated + * + * @opensearch.internal + */ @Deprecated public static class DeprecatedParameters { + /** + * Deprecated parameter names for Prefix trees + * + * @opensearch.internal + */ public static class Names { public static final ParseField STRATEGY = new ParseField("strategy"); public static final ParseField TREE = new ParseField("tree"); @@ -112,12 +122,22 @@ public static class Names { public static final ParseField POINTS_ONLY = new ParseField("points_only"); } + /** + * Deprecated prefix tree types + * + * @opensearch.internal + */ public static class PrefixTrees { public static final String LEGACY_QUADTREE = "legacyquadtree"; public static final String QUADTREE = "quadtree"; public static final String GEOHASH = "geohash"; } + /** + * Deprecated defaults for legacy prefix trees + * + * @opensearch.internal + */ public static class Defaults { public static final SpatialStrategy STRATEGY = SpatialStrategy.RECURSIVE; public static final String TREE = "quadtree"; @@ -203,6 +223,11 @@ private static void checkPrefixTreeSupport(String fieldName) { private static final DeprecationLogger DEPRECATION_LOGGER = DeprecationLogger.getLogger(LegacyGeoShapeFieldMapper.class); + /** + * The builder for the deprecated prefix tree implementation + * + * @opensearch.internal + */ public static class Builder extends AbstractShapeGeometryFieldMapper.Builder { DeprecatedParameters deprecatedParameters; @@ -325,6 +350,11 @@ public LegacyGeoShapeFieldMapper build(BuilderContext context) { } } + /** + * A legacy parser for prefix trees + * + * @opensearch.internal + */ private static class LegacyGeoShapeParser extends Parser> { /** * Note that this parser is only used for formatting values. @@ -347,6 +377,11 @@ public Object format(ShapeBuilder value, String format) { } } + /** + * Field type for GeoShape fields + * + * @opensearch.internal + */ public static final class GeoShapeFieldType extends AbstractShapeGeometryFieldType, Shape> implements GeoShapeQueryable { diff --git a/server/src/main/java/org/opensearch/index/mapper/MappedFieldType.java b/server/src/main/java/org/opensearch/index/mapper/MappedFieldType.java index e37325b246727..ead901a25e6fd 100644 --- a/server/src/main/java/org/opensearch/index/mapper/MappedFieldType.java +++ b/server/src/main/java/org/opensearch/index/mapper/MappedFieldType.java @@ -378,6 +378,8 @@ public IntervalsSource intervals(String query, int max_gaps, IntervalMode mode, /** * An enum used to describe the relation between the range of terms in a * shard when compared with a query range + * + * @opensearch.internal */ public enum Relation { WITHIN, diff --git a/server/src/main/java/org/opensearch/index/mapper/Mapper.java b/server/src/main/java/org/opensearch/index/mapper/Mapper.java index 2f763ec0e35c1..0a0f32597a2d1 100644 --- a/server/src/main/java/org/opensearch/index/mapper/Mapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/Mapper.java @@ -55,6 +55,11 @@ */ public abstract class Mapper implements ToXContentFragment, Iterable { + /** + * The builder context used in field mappings + * + * @opensearch.internal + */ public static class BuilderContext { private final Settings indexSettings; private final ContentPath contentPath; @@ -86,6 +91,11 @@ public Version indexCreatedVersionOrDefault(@Nullable Version defaultValue) { } } + /** + * Base mapper builder + * + * @opensearch.internal + */ public abstract static class Builder { public String name; @@ -104,8 +114,18 @@ public String name() { public abstract Mapper build(BuilderContext context); } + /** + * Type parser for the mapper + * + * @opensearch.internal + */ public interface TypeParser { + /** + * Parser context for the type parser + * + * @opensearch.internal + */ class ParserContext { private final Function similarityLookupService; @@ -200,6 +220,11 @@ public ParserContext createMultiFieldContext(ParserContext in) { return new MultiFieldParserContext(in); } + /** + * Base mutiple field parser context + * + * @opensearch.internal + */ static class MultiFieldParserContext extends ParserContext { MultiFieldParserContext(ParserContext in) { super( diff --git a/server/src/main/java/org/opensearch/index/mapper/MapperService.java b/server/src/main/java/org/opensearch/index/mapper/MapperService.java index 980259fec7e44..f0d0b77396b0e 100644 --- a/server/src/main/java/org/opensearch/index/mapper/MapperService.java +++ b/server/src/main/java/org/opensearch/index/mapper/MapperService.java @@ -96,6 +96,8 @@ public class MapperService extends AbstractIndexComponent implements Closeable { /** * The reason why a mapping is being merged. + * + * @opensearch.internal */ public enum MergeReason { /** diff --git a/server/src/main/java/org/opensearch/index/mapper/MetadataFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/MetadataFieldMapper.java index b4142de9b097c..17a2451bf4dd1 100644 --- a/server/src/main/java/org/opensearch/index/mapper/MetadataFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/MetadataFieldMapper.java @@ -47,6 +47,11 @@ */ public abstract class MetadataFieldMapper extends ParametrizedFieldMapper { + /** + * Type parser for the field mapper + * + * @opensearch.internal + */ public interface TypeParser extends Mapper.TypeParser { @Override @@ -91,6 +96,8 @@ public static Parameter> updateableBoolParam( /** * A type parser for an unconfigurable metadata field. + * + * @opensearch.internal */ public static class FixedTypeParser implements TypeParser { @@ -111,6 +118,11 @@ public MetadataFieldMapper getDefault(MappedFieldType defaultFieldType, ParserCo } } + /** + * Type parser that is configurable + * + * @opensearch.internal + */ public static class ConfigurableTypeParser implements TypeParser { final Function defaultMapperParser; @@ -137,6 +149,11 @@ public MetadataFieldMapper getDefault(MappedFieldType defaultFieldType, ParserCo } } + /** + * Base builder for internal metadata fields + * + * @opensearch.internal + */ public abstract static class Builder extends ParametrizedFieldMapper.Builder { protected Builder(String name) { diff --git a/server/src/main/java/org/opensearch/index/mapper/NestedPathFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/NestedPathFieldMapper.java index 6b441df47b9fd..06db3fd38c062 100644 --- a/server/src/main/java/org/opensearch/index/mapper/NestedPathFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/NestedPathFieldMapper.java @@ -31,6 +31,11 @@ public class NestedPathFieldMapper extends MetadataFieldMapper { public static final String LEGACY_NAME = "_type"; public static final String NAME = "_nested_path"; + /** + * Default parameters for the field mapper + * + * @opensearch.internal + */ public static class Defaults { public static final FieldType FIELD_TYPE = new FieldType(); static { @@ -77,7 +82,11 @@ public static Query filter(Version version, String path) { return new TermQuery(new Term(name(version), new BytesRef(path))); } - /** field type for the NestPath field */ + /** + * field type for the NestPath field + * + * @opensearch.internal + */ public static final class NestedPathFieldType extends StringFieldType { private NestedPathFieldType(String name) { super(name, true, false, false, TextSearchInfo.SIMPLE_MATCH_ONLY, Collections.emptyMap()); diff --git a/server/src/main/java/org/opensearch/index/mapper/NumberFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/NumberFieldMapper.java index 343a1235ba8e6..92b970895837f 100644 --- a/server/src/main/java/org/opensearch/index/mapper/NumberFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/NumberFieldMapper.java @@ -90,6 +90,11 @@ private static NumberFieldMapper toType(FieldMapper in) { return (NumberFieldMapper) in; } + /** + * Builder for the number field mappers + * + * @opensearch.internal + */ public static class Builder extends ParametrizedFieldMapper.Builder { private final Parameter indexed = Parameter.indexParam(m -> toType(m).indexed, true); @@ -156,6 +161,11 @@ public NumberFieldMapper build(BuilderContext context) { } } + /** + * Type of number + * + * @opensearch.internal + */ public enum NumberType { HALF_FLOAT("half_float", NumericType.HALF_FLOAT) { @Override @@ -964,6 +974,11 @@ public static Query longRangeQuery( } } + /** + * Field type for numeric fields + * + * @opensearch.internal + */ public static class NumberFieldType extends SimpleMappedFieldType { private final NumberType type; diff --git a/server/src/main/java/org/opensearch/index/mapper/ObjectMapper.java b/server/src/main/java/org/opensearch/index/mapper/ObjectMapper.java index 5fbebc0206270..fcbca6049ec0b 100644 --- a/server/src/main/java/org/opensearch/index/mapper/ObjectMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/ObjectMapper.java @@ -67,18 +67,33 @@ public class ObjectMapper extends Mapper implements Cloneable { public static final String CONTENT_TYPE = "object"; public static final String NESTED_CONTENT_TYPE = "nested"; + /** + * Parameter defaults + * + * @opensearch.internal + */ public static class Defaults { public static final boolean ENABLED = true; public static final Nested NESTED = Nested.NO; public static final Dynamic DYNAMIC = null; // not set, inherited from root } + /** + * Dynamic field mapping specification + * + * @opensearch.internal + */ public enum Dynamic { TRUE, FALSE, STRICT } + /** + * Nested objects + * + * @opensearch.internal + */ public static class Nested { public static final Nested NO = new Nested(false, new Explicit<>(false, false), new Explicit<>(false, false)); @@ -150,6 +165,11 @@ public void setIncludeInRoot(boolean value) { } } + /** + * Builder for object field mapper + * + * @opensearch.internal + */ @SuppressWarnings("rawtypes") public static class Builder extends Mapper.Builder { @@ -227,6 +247,11 @@ protected ObjectMapper createMapper( } } + /** + * Type parser for object field mapper + * + * @opensearch.internal + */ public static class TypeParser implements Mapper.TypeParser { @Override public Mapper.Builder parse(String name, Map node, ParserContext parserContext) throws MapperParsingException { diff --git a/server/src/main/java/org/opensearch/index/mapper/ParametrizedFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/ParametrizedFieldMapper.java index 5697d2fffcf3b..26af9b7faeae9 100644 --- a/server/src/main/java/org/opensearch/index/mapper/ParametrizedFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/ParametrizedFieldMapper.java @@ -173,6 +173,8 @@ protected interface SerializerCheck { /** * A configurable parameter for a field mapper * @param the type of the value the parameter holds + * + * @opensearch.internal */ public static final class Parameter implements Supplier { @@ -544,6 +546,11 @@ public static Parameter boostParam() { } + /** + * Conflicts in the field mapper + * + * @opensearch.internal + */ private static final class Conflicts { private final String mapperName; @@ -569,6 +576,8 @@ void check() { /** * A Builder for a ParametrizedFieldMapper + * + * @opensearch.internal */ public abstract static class Builder extends Mapper.Builder { @@ -725,6 +734,8 @@ private static boolean isDeprecatedParameter(String propName, Version indexCreat /** * TypeParser implementation that automatically handles parsing + * + * @opensearch.internal */ public static final class TypeParser implements Mapper.TypeParser { diff --git a/server/src/main/java/org/opensearch/index/mapper/ParseContext.java b/server/src/main/java/org/opensearch/index/mapper/ParseContext.java index 3dd68bb6d7c58..24f27139f6f4c 100644 --- a/server/src/main/java/org/opensearch/index/mapper/ParseContext.java +++ b/server/src/main/java/org/opensearch/index/mapper/ParseContext.java @@ -56,7 +56,11 @@ */ public abstract class ParseContext implements Iterable { - /** Fork of {@link org.apache.lucene.document.Document} with additional functionality. */ + /** + * Fork of {@link org.apache.lucene.document.Document} with additional functionality. + * + * @opensearch.internal + */ public static class Document implements Iterable { private final Document parent; @@ -171,6 +175,11 @@ public BytesRef getBinaryValue(String name) { } + /** + * Filter parse context. + * + * @opensearch.internal + */ private static class FilterParseContext extends ParseContext { private final ParseContext in; @@ -305,6 +314,11 @@ public Collection getIgnoredFields() { } } + /** + * An internal parse context + * + * @opensearch.internal + */ public static class InternalParseContext extends ParseContext { private final DocumentMapper docMapper; diff --git a/server/src/main/java/org/opensearch/index/mapper/RangeFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/RangeFieldMapper.java index adc0cbaae7d1c..5257609e0cba9 100644 --- a/server/src/main/java/org/opensearch/index/mapper/RangeFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/RangeFieldMapper.java @@ -86,6 +86,11 @@ public class RangeFieldMapper extends ParametrizedFieldMapper { public static final boolean DEFAULT_INCLUDE_UPPER = true; public static final boolean DEFAULT_INCLUDE_LOWER = true; + /** + * Default parameters for range fields + * + * @opensearch.internal + */ public static class Defaults { public static final Explicit COERCE = new Explicit<>(true, false); public static final DateFormatter DATE_FORMATTER = DateFieldMapper.DEFAULT_DATE_TIME_FORMATTER; @@ -98,6 +103,11 @@ private static RangeFieldMapper toType(FieldMapper in) { return (RangeFieldMapper) in; } + /** + * Builder for range fields + * + * @opensearch.internal + */ public static class Builder extends ParametrizedFieldMapper.Builder { private final Parameter index = Parameter.indexParam(m -> toType(m).index, true); @@ -233,6 +243,11 @@ public RangeFieldMapper build(BuilderContext context) { } } + /** + * Field type for range fields + * + * @opensearch.internal + */ public static final class RangeFieldType extends MappedFieldType { protected final RangeType rangeType; protected final DateFormatter dateTimeFormatter; @@ -559,7 +574,11 @@ private static Range parseIpRangeFromCidr(final XContentParser parser) throws IO } } - /** Class defining a range */ + /** + * Class defining a range + * + * @opensearch.internal + */ public static class Range { RangeType type; Object from; @@ -618,6 +637,11 @@ public Object getTo() { } } + /** + * Doc values field for binary ranges + * + * @opensearch.internal + */ static class BinaryRangesDocValuesField extends CustomDocValuesField { private final Set ranges; diff --git a/server/src/main/java/org/opensearch/index/mapper/RangeType.java b/server/src/main/java/org/opensearch/index/mapper/RangeType.java index ce31b5e6ac5df..a9e2a638843ea 100644 --- a/server/src/main/java/org/opensearch/index/mapper/RangeType.java +++ b/server/src/main/java/org/opensearch/index/mapper/RangeType.java @@ -982,6 +982,11 @@ public final Mapper.TypeParser parser() { private final NumberFieldMapper.NumberType numberType; public final LengthType lengthType; + /** + * Type of length + * + * @opensearch.internal + */ public enum LengthType { FIXED_4 { @Override diff --git a/server/src/main/java/org/opensearch/index/mapper/RootObjectMapper.java b/server/src/main/java/org/opensearch/index/mapper/RootObjectMapper.java index cee9ba9f7507c..7a76a9b4c18a9 100644 --- a/server/src/main/java/org/opensearch/index/mapper/RootObjectMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/RootObjectMapper.java @@ -65,6 +65,11 @@ public class RootObjectMapper extends ObjectMapper { private static final DeprecationLogger DEPRECATION_LOGGER = DeprecationLogger.getLogger(RootObjectMapper.class); + /** + * Default parameters for root object + * + * @opensearch.internal + */ public static class Defaults { public static final DateFormatter[] DYNAMIC_DATE_TIME_FORMATTERS = new DateFormatter[] { DateFieldMapper.DEFAULT_DATE_TIME_FORMATTER, @@ -73,6 +78,11 @@ public static class Defaults { public static final boolean NUMERIC_DETECTION = false; } + /** + * Builder for the root object + * + * @opensearch.internal + */ public static class Builder extends ObjectMapper.Builder { protected Explicit dynamicTemplates = new Explicit<>(new DynamicTemplate[0], false); @@ -153,6 +163,11 @@ private static void fixRedundantIncludes(ObjectMapper objectMapper, boolean pare } } + /** + * Type parser for the root object + * + * @opensearch.internal + */ public static class TypeParser extends ObjectMapper.TypeParser { @Override diff --git a/server/src/main/java/org/opensearch/index/mapper/RoutingFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/RoutingFieldMapper.java index f8bc833983391..222ba70a5ce0c 100644 --- a/server/src/main/java/org/opensearch/index/mapper/RoutingFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/RoutingFieldMapper.java @@ -57,6 +57,11 @@ public ParametrizedFieldMapper.Builder getMergeBuilder() { return new Builder().init(this); } + /** + * Default parameters for routing fields + * + * @opensearch.internal + */ public static class Defaults { public static final FieldType FIELD_TYPE = new FieldType(); @@ -75,6 +80,11 @@ private static RoutingFieldMapper toType(FieldMapper in) { return (RoutingFieldMapper) in; } + /** + * Builder for routing fields + * + * @opensearch.internal + */ public static class Builder extends MetadataFieldMapper.Builder { final Parameter required = Parameter.boolParam("required", false, m -> toType(m).required, Defaults.REQUIRED); @@ -96,6 +106,11 @@ public RoutingFieldMapper build(BuilderContext context) { public static final TypeParser PARSER = new ConfigurableTypeParser(c -> new RoutingFieldMapper(Defaults.REQUIRED), c -> new Builder()); + /** + * Field type for routing fields + * + * @opensearch.internal + */ static final class RoutingFieldType extends StringFieldType { static RoutingFieldType INSTANCE = new RoutingFieldType(); diff --git a/server/src/main/java/org/opensearch/index/mapper/SeqNoFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/SeqNoFieldMapper.java index 9b2e561acc841..16f76f087e403 100644 --- a/server/src/main/java/org/opensearch/index/mapper/SeqNoFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/SeqNoFieldMapper.java @@ -73,6 +73,8 @@ public class SeqNoFieldMapper extends MetadataFieldMapper { /** * A sequence ID, which is made up of a sequence number (both the searchable * and doc_value version of the field) and the primary term. + * + * @opensearch.internal */ public static class SequenceIDFields { @@ -108,6 +110,11 @@ public static SequenceIDFields emptySeqID() { public static final TypeParser PARSER = new FixedTypeParser(c -> new SeqNoFieldMapper()); + /** + * Field type for internal sequence numbers + * + * @opensearch.internal + */ static final class SeqNoFieldType extends SimpleMappedFieldType { private static final SeqNoFieldType INSTANCE = new SeqNoFieldType(); diff --git a/server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java index 4a5778db590dc..6a9db10de6266 100644 --- a/server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/SourceFieldMapper.java @@ -73,6 +73,11 @@ public class SourceFieldMapper extends MetadataFieldMapper { public static final String CONTENT_TYPE = "_source"; private final Function, Map> filter; + /** + * Default parameters for source fields + * + * @opensearch.internal + */ public static class Defaults { public static final String NAME = SourceFieldMapper.NAME; public static final boolean ENABLED = true; @@ -91,6 +96,11 @@ private static SourceFieldMapper toType(FieldMapper in) { return (SourceFieldMapper) in; } + /** + * Builder for source fields + * + * @opensearch.internal + */ public static class Builder extends MetadataFieldMapper.Builder { private final Parameter enabled = Parameter.boolParam("enabled", false, m -> toType(m).enabled, Defaults.ENABLED); @@ -128,6 +138,11 @@ public SourceFieldMapper build(BuilderContext context) { public static final TypeParser PARSER = new ConfigurableTypeParser(c -> new SourceFieldMapper(), c -> new Builder()); + /** + * Field type for source field mapper + * + * @opensearch.internal + */ static final class SourceFieldType extends MappedFieldType { private SourceFieldType(boolean enabled) { diff --git a/server/src/main/java/org/opensearch/index/mapper/SourceToParse.java b/server/src/main/java/org/opensearch/index/mapper/SourceToParse.java index 7993c3f0a3b36..8afc0e25b079d 100644 --- a/server/src/main/java/org/opensearch/index/mapper/SourceToParse.java +++ b/server/src/main/java/org/opensearch/index/mapper/SourceToParse.java @@ -90,6 +90,11 @@ public XContentType getXContentType() { return this.xContentType; } + /** + * Origin of the source + * + * @opensearch.internal + */ public enum Origin { PRIMARY, REPLICA diff --git a/server/src/main/java/org/opensearch/index/mapper/TextFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/TextFieldMapper.java index bad09e76ecab6..82bd8ebb4d362 100644 --- a/server/src/main/java/org/opensearch/index/mapper/TextFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/TextFieldMapper.java @@ -113,6 +113,11 @@ public class TextFieldMapper extends ParametrizedFieldMapper { private static final int POSITION_INCREMENT_GAP_USE_ANALYZER = -1; private static final String FAST_PHRASE_SUFFIX = "._index_phrase"; + /** + * Default paramters for text fields + * + * @opensearch.internal + */ public static class Defaults { public static final double FIELDDATA_MIN_FREQUENCY = 0; public static final double FIELDDATA_MAX_FREQUENCY = Integer.MAX_VALUE; @@ -142,6 +147,11 @@ private static Builder builder(FieldMapper in) { return ((TextFieldMapper) in).builder; } + /** + * Prefix configuration + * + * @opensearch.internal + */ private static final class PrefixConfig implements ToXContent { final int minChars; final int maxChars; @@ -199,6 +209,11 @@ private static PrefixConfig parsePrefixConfig(String propName, ParserContext par return new PrefixConfig(minChars, maxChars); } + /** + * Frequency filter for field data + * + * @opensearch.internal + */ private static final class FielddataFrequencyFilter implements ToXContent { final double minFreq; final double maxFreq; @@ -256,6 +271,11 @@ private static FielddataFrequencyFilter parseFrequencyFilter(String name, Parser return new FielddataFrequencyFilter(minFrequency, maxFrequency, minSegmentSize); } + /** + * Builder for text fields + * + * @opensearch.internal + */ public static class Builder extends ParametrizedFieldMapper.Builder { private final Version indexCreatedVersion; @@ -456,6 +476,11 @@ public TextFieldMapper build(BuilderContext context) { public static final TypeParser PARSER = new TypeParser((n, c) -> new Builder(n, c.indexVersionCreated(), c.getIndexAnalyzers())); + /** + * A phrase wrapped field analyzer + * + * @opensearch.internal + */ private static class PhraseWrappedAnalyzer extends AnalyzerWrapper { private final Analyzer delegate; @@ -476,6 +501,11 @@ protected TokenStreamComponents wrapComponents(String fieldName, TokenStreamComp } } + /** + * A prefix wrapped analyzer + * + * @opensearch.internal + */ private static class PrefixWrappedAnalyzer extends AnalyzerWrapper { private final int minChars; @@ -501,6 +531,11 @@ protected TokenStreamComponents wrapComponents(String fieldName, TokenStreamComp } } + /** + * Field type for phrase fields + * + * @opensearch.internal + */ static final class PhraseFieldType extends StringFieldType { final TextFieldType parent; @@ -533,6 +568,11 @@ public Query existsQuery(QueryShardContext context) { } } + /** + * Field type for prefix fields + * + * @opensearch.internal + */ static final class PrefixFieldType extends StringFieldType { final int minChars; @@ -626,6 +666,11 @@ public Query existsQuery(QueryShardContext context) { } } + /** + * Field mapper for phrase fields + * + * @opensearch.internal + */ private static final class PhraseFieldMapper extends FieldMapper { PhraseFieldMapper(FieldType fieldType, PhraseFieldType mappedFieldType) { @@ -648,6 +693,11 @@ protected String contentType() { } } + /** + * Field mapper for prefix fields + * + * @opensearch.internal + */ private static final class PrefixFieldMapper extends FieldMapper { protected PrefixFieldMapper(FieldType fieldType, PrefixFieldType mappedFieldType) { @@ -679,6 +729,11 @@ public String toString() { } } + /** + * Field type for text fields + * + * @opensearch.internal + */ public static class TextFieldType extends StringFieldType { private boolean fielddata; diff --git a/server/src/main/java/org/opensearch/index/mapper/TextParams.java b/server/src/main/java/org/opensearch/index/mapper/TextParams.java index f8fd02edafb11..0f46ddb021aad 100644 --- a/server/src/main/java/org/opensearch/index/mapper/TextParams.java +++ b/server/src/main/java/org/opensearch/index/mapper/TextParams.java @@ -54,6 +54,11 @@ public final class TextParams { private TextParams() {} + /** + * Analyzers for text + * + * @opensearch.internal + */ public static final class Analyzers { public final Parameter indexAnalyzer; public final Parameter searchAnalyzer; diff --git a/server/src/main/java/org/opensearch/index/mapper/TextSearchInfo.java b/server/src/main/java/org/opensearch/index/mapper/TextSearchInfo.java index 79cb5f1ab2a54..535fba6c39371 100644 --- a/server/src/main/java/org/opensearch/index/mapper/TextSearchInfo.java +++ b/server/src/main/java/org/opensearch/index/mapper/TextSearchInfo.java @@ -144,6 +144,8 @@ public boolean isTokenized() { /** * What sort of term vectors are available + * + * @opensearch.internal */ public enum TermVector { NONE, diff --git a/server/src/main/java/org/opensearch/index/mapper/VersionFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/VersionFieldMapper.java index f5c36a3d30495..6cef46be86a6a 100644 --- a/server/src/main/java/org/opensearch/index/mapper/VersionFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/VersionFieldMapper.java @@ -54,6 +54,11 @@ public class VersionFieldMapper extends MetadataFieldMapper { public static final TypeParser PARSER = new FixedTypeParser(c -> new VersionFieldMapper()); + /** + * Field type for internal version field + * + * @opensearch.internal + */ static final class VersionFieldType extends MappedFieldType { public static final VersionFieldType INSTANCE = new VersionFieldType(); diff --git a/server/src/main/java/org/opensearch/index/merge/MergeStats.java b/server/src/main/java/org/opensearch/index/merge/MergeStats.java index 2bd6bc88b8659..6c872514f402e 100644 --- a/server/src/main/java/org/opensearch/index/merge/MergeStats.java +++ b/server/src/main/java/org/opensearch/index/merge/MergeStats.java @@ -244,6 +244,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields used for merge statistics + * + * @opensearch.internal + */ static final class Fields { static final String MERGES = "merges"; static final String CURRENT = "current"; diff --git a/server/src/main/java/org/opensearch/index/query/AbstractGeometryQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/AbstractGeometryQueryBuilder.java index a72447402d3c5..4f0a873ac7bdb 100644 --- a/server/src/main/java/org/opensearch/index/query/AbstractGeometryQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/AbstractGeometryQueryBuilder.java @@ -524,7 +524,11 @@ protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) throws return this; } - /** local class that encapsulates xcontent parsed shape parameters */ + /** + * local class that encapsulates xcontent parsed shape parameters + * + * @opensearch.internal + */ protected abstract static class ParsedGeometryQueryParams { public String fieldName; public ShapeRelation relation; diff --git a/server/src/main/java/org/opensearch/index/query/DistanceFeatureQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/DistanceFeatureQueryBuilder.java index dee6e3f8a762f..697e1579fb88f 100644 --- a/server/src/main/java/org/opensearch/index/query/DistanceFeatureQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/DistanceFeatureQueryBuilder.java @@ -158,6 +158,11 @@ protected boolean doEquals(DistanceFeatureQueryBuilder other) { return this.field.equals(other.field) && Objects.equals(this.origin, other.origin) && this.pivot.equals(other.pivot); } + /** + * Origin of a distance feature query + * + * @opensearch.internal + */ public static class Origin { private final Object origin; diff --git a/server/src/main/java/org/opensearch/index/query/GeoShapeQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/GeoShapeQueryBuilder.java index 589c733eafe00..cedc142a2f0eb 100644 --- a/server/src/main/java/org/opensearch/index/query/GeoShapeQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/GeoShapeQueryBuilder.java @@ -231,6 +231,11 @@ protected GeoShapeQueryBuilder doRewrite(QueryRewriteContext queryRewriteContext return builder; } + /** + * Geoshape query parameters that have been parsed from xcontent + * + * @opensearch.internal + */ private static class ParsedGeoShapeQueryParams extends ParsedGeometryQueryParams { SpatialStrategy strategy; diff --git a/server/src/main/java/org/opensearch/index/query/IntervalFilterScript.java b/server/src/main/java/org/opensearch/index/query/IntervalFilterScript.java index a5513e560d15f..f94a8bf0f310c 100644 --- a/server/src/main/java/org/opensearch/index/query/IntervalFilterScript.java +++ b/server/src/main/java/org/opensearch/index/query/IntervalFilterScript.java @@ -43,6 +43,11 @@ */ public abstract class IntervalFilterScript { + /** + * Internal interval + * + * @opensearch.internal + */ public static class Interval { private IntervalIterator iterator; @@ -66,6 +71,11 @@ public int getGaps() { public abstract boolean execute(Interval interval); + /** + * Factory to create a script + * + * @opensearch.internal + */ public interface Factory extends ScriptFactory { IntervalFilterScript newInstance(); } diff --git a/server/src/main/java/org/opensearch/index/query/IntervalsSourceProvider.java b/server/src/main/java/org/opensearch/index/query/IntervalsSourceProvider.java index 9409a264fa8a0..cc69a44c9c80c 100644 --- a/server/src/main/java/org/opensearch/index/query/IntervalsSourceProvider.java +++ b/server/src/main/java/org/opensearch/index/query/IntervalsSourceProvider.java @@ -127,6 +127,11 @@ private static IntervalsSourceProvider parseInnerIntervals(XContentParser parser return isp; } + /** + * Match interval + * + * @opensearch.internal + */ public static class Match extends IntervalsSourceProvider { public static final String NAME = "match"; @@ -312,6 +317,11 @@ String getUseField() { } } + /** + * Disjunction interval + * + * @opensearch.internal + */ public static class Disjunction extends IntervalsSourceProvider { public static final String NAME = "any_of"; @@ -417,6 +427,11 @@ IntervalFilter getFilter() { } } + /** + * Combine interval + * + * @opensearch.internal + */ public static class Combine extends IntervalsSourceProvider { public static final String NAME = "all_of"; @@ -567,6 +582,11 @@ IntervalFilter getFilter() { } } + /** + * Prefix interval + * + * @opensearch.internal + */ public static class Prefix extends IntervalsSourceProvider { public static final String NAME = "prefix"; @@ -681,6 +701,11 @@ String getUseField() { } } + /** + * Regular expression interval + * + * @opensearch.internal + */ public static class Regexp extends IntervalsSourceProvider { public static final String NAME = "regexp"; @@ -860,6 +885,11 @@ boolean isCaseInsensitive() { } } + /** + * Wildcard interval + * + * @opensearch.internal + */ public static class Wildcard extends IntervalsSourceProvider { public static final String NAME = "wildcard"; @@ -1010,6 +1040,11 @@ Integer getMaxExpansions() { } } + /** + * Fuzzy interval + * + * @opensearch.internal + */ public static class Fuzzy extends IntervalsSourceProvider { public static final String NAME = "fuzzy"; @@ -1180,6 +1215,11 @@ String getUseField() { } } + /** + * Script filter source + * + * @opensearch.internal + */ static class ScriptFilterSource extends FilteredIntervalsSource { final IntervalFilterScript script; @@ -1197,6 +1237,11 @@ protected boolean accept(IntervalIterator it) { } } + /** + * An interval filter + * + * @opensearch.internal + */ public static class IntervalFilter implements ToXContentObject, Writeable { public static final String NAME = "filter"; diff --git a/server/src/main/java/org/opensearch/index/query/MoreLikeThisQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/MoreLikeThisQueryBuilder.java index fe13aef627f7b..71275e53fce95 100644 --- a/server/src/main/java/org/opensearch/index/query/MoreLikeThisQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/MoreLikeThisQueryBuilder.java @@ -161,6 +161,8 @@ public class MoreLikeThisQueryBuilder extends AbstractQueryBuilder innerHit } } + /** + * Context builder for nested inner hits + * + * @opensearch.internal + */ static class NestedInnerHitContextBuilder extends InnerHitContextBuilder { private final String path; @@ -396,6 +401,11 @@ protected void doBuild(SearchContext parentSearchContext, InnerHitsContext inner } } + /** + * Inner hits sub context + * + * @opensearch.internal + */ static final class NestedInnerHitSubContext extends InnerHitsContext.InnerHitSubContext { private final ObjectMapper parentObjectMapper; diff --git a/server/src/main/java/org/opensearch/index/query/ScriptQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/ScriptQueryBuilder.java index b4e6a6d9a9cdd..a477237816d9b 100644 --- a/server/src/main/java/org/opensearch/index/query/ScriptQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/ScriptQueryBuilder.java @@ -164,6 +164,11 @@ protected Query doToQuery(QueryShardContext context) throws IOException { return new ScriptQuery(script, filterScript, queryName); } + /** + * Internal script query + * + * @opensearch.internal + */ static class ScriptQuery extends Query { final Script script; diff --git a/server/src/main/java/org/opensearch/index/query/SpanNearQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/SpanNearQueryBuilder.java index ccc0b8f9dbde7..d7fd41435fab7 100644 --- a/server/src/main/java/org/opensearch/index/query/SpanNearQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/SpanNearQueryBuilder.java @@ -306,6 +306,8 @@ public String getWriteableName() { * can be invoked for it. * This QueryBuilder is only applicable as a clause in SpanGapQueryBuilder but * yet to enforce this restriction. + * + * @opensearch.internal */ public static class SpanGapQueryBuilder implements SpanQueryBuilder { public static final String NAME = "span_gap"; diff --git a/server/src/main/java/org/opensearch/index/query/SpanQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/SpanQueryBuilder.java index 29aa4cfbcc6ce..9ff8bad4adc36 100644 --- a/server/src/main/java/org/opensearch/index/query/SpanQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/SpanQueryBuilder.java @@ -42,6 +42,11 @@ */ public interface SpanQueryBuilder extends QueryBuilder { + /** + * Utility for span query builders + * + * @opensearch.internal + */ class SpanQueryBuilderUtil { private SpanQueryBuilderUtil() { // utility class diff --git a/server/src/main/java/org/opensearch/index/query/TermsSetQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/TermsSetQueryBuilder.java index 6bb42f8ff5d39..fa432216b67e8 100644 --- a/server/src/main/java/org/opensearch/index/query/TermsSetQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/TermsSetQueryBuilder.java @@ -298,6 +298,11 @@ private LongValuesSource createValuesSource(QueryShardContext context) { return longValuesSource; } + /** + * Values Source for scripted long values + * + * @opensearch.internal + */ static final class ScriptLongValueSource extends LongValuesSource { private final Script script; @@ -366,8 +371,12 @@ public LongValuesSource rewrite(IndexSearcher searcher) throws IOException { } - // Forked from LongValuesSource.FieldValuesSource and changed getValues() method to always use sorted numeric - // doc values, because that is what is being used in NumberFieldMapper. + /** + * Forked from LongValuesSource.FieldValuesSource and changed getValues() method to always use sorted numeric + * doc values, because that is what is being used in NumberFieldMapper. + * + * @opensearch.internal + */ static class FieldValuesSource extends LongValuesSource { private final String fieldName; diff --git a/server/src/main/java/org/opensearch/index/query/VectorGeoShapeQueryProcessor.java b/server/src/main/java/org/opensearch/index/query/VectorGeoShapeQueryProcessor.java index 47766c6c8521e..e11b22e9296cf 100644 --- a/server/src/main/java/org/opensearch/index/query/VectorGeoShapeQueryProcessor.java +++ b/server/src/main/java/org/opensearch/index/query/VectorGeoShapeQueryProcessor.java @@ -88,6 +88,11 @@ private Query getVectorQueryFromShape(Geometry queryShape, String fieldName, Sha ); } + /** + * Geometry collector for LatLonShape indexing types + * + * @opensearch.internal + */ private static class LuceneGeometryCollector implements GeometryVisitor { private final List geometries = new ArrayList<>(); private final String name; diff --git a/server/src/main/java/org/opensearch/index/query/functionscore/DecayFunctionBuilder.java b/server/src/main/java/org/opensearch/index/query/functionscore/DecayFunctionBuilder.java index b90462baed612..be3ca83f54a0f 100644 --- a/server/src/main/java/org/opensearch/index/query/functionscore/DecayFunctionBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/functionscore/DecayFunctionBuilder.java @@ -424,6 +424,11 @@ private AbstractDistanceScoreFunction parseDateVariable( ); } + /** + * Score function for geo field data + * + * @opensearch.internal + */ static class GeoFieldDataScoreFunction extends AbstractDistanceScoreFunction { private final GeoPoint origin; @@ -520,6 +525,11 @@ protected int doHashCode() { } } + /** + * Score function for numeric data + * + * @opensearch.internal + */ static class NumericFieldDataScoreFunction extends AbstractDistanceScoreFunction { private final IndexNumericFieldData fieldData; @@ -610,7 +620,8 @@ protected boolean doEquals(ScoreFunction other) { /** * This is the base class for scoring a single field. * - * */ + * @opensearch.internal + */ public abstract static class AbstractDistanceScoreFunction extends ScoreFunction { private final double scale; diff --git a/server/src/main/java/org/opensearch/index/query/functionscore/ExponentialDecayFunctionBuilder.java b/server/src/main/java/org/opensearch/index/query/functionscore/ExponentialDecayFunctionBuilder.java index 96754466bb0e1..c541ab84c8141 100644 --- a/server/src/main/java/org/opensearch/index/query/functionscore/ExponentialDecayFunctionBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/functionscore/ExponentialDecayFunctionBuilder.java @@ -96,6 +96,11 @@ public DecayFunction getDecayFunction() { return EXP_DECAY_FUNCTION; } + /** + * Exponential decay + * + * @opensearch.internal + */ private static final class ExponentialDecayScoreFunction implements DecayFunction { @Override diff --git a/server/src/main/java/org/opensearch/index/query/functionscore/FunctionScoreQueryBuilder.java b/server/src/main/java/org/opensearch/index/query/functionscore/FunctionScoreQueryBuilder.java index 9f39b8f74d819..19edcfc2b0b48 100644 --- a/server/src/main/java/org/opensearch/index/query/functionscore/FunctionScoreQueryBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/functionscore/FunctionScoreQueryBuilder.java @@ -371,6 +371,8 @@ protected Query doToQuery(QueryShardContext context) throws IOException { /** * Function to be associated with an optional filter, meaning it will be executed only for the documents * that match the given filter. + * + * @opensearch.internal */ public static class FilterFunctionBuilder implements ToXContentObject, Writeable { private final QueryBuilder filter; diff --git a/server/src/main/java/org/opensearch/index/query/functionscore/GaussDecayFunctionBuilder.java b/server/src/main/java/org/opensearch/index/query/functionscore/GaussDecayFunctionBuilder.java index b3e42292addeb..e7906eb65c738 100644 --- a/server/src/main/java/org/opensearch/index/query/functionscore/GaussDecayFunctionBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/functionscore/GaussDecayFunctionBuilder.java @@ -96,6 +96,11 @@ public DecayFunction getDecayFunction() { return GAUSS_DECAY_FUNCTION; } + /** + * Gaussian scoring + * + * @opensearch.internal + */ private static final class GaussScoreFunction implements DecayFunction { @Override public double evaluate(double value, double scale) { diff --git a/server/src/main/java/org/opensearch/index/query/functionscore/LinearDecayFunctionBuilder.java b/server/src/main/java/org/opensearch/index/query/functionscore/LinearDecayFunctionBuilder.java index b3b948677756a..0b4e84393af1c 100644 --- a/server/src/main/java/org/opensearch/index/query/functionscore/LinearDecayFunctionBuilder.java +++ b/server/src/main/java/org/opensearch/index/query/functionscore/LinearDecayFunctionBuilder.java @@ -94,6 +94,11 @@ public DecayFunction getDecayFunction() { return LINEAR_DECAY_FUNCTION; } + /** + * Linear decay + * + * @opensearch.internal + */ private static final class LinearDecayScoreFunction implements DecayFunction { @Override diff --git a/server/src/main/java/org/opensearch/index/recovery/RecoveryStats.java b/server/src/main/java/org/opensearch/index/recovery/RecoveryStats.java index 14d8fa6f70939..9490e51d36ab4 100644 --- a/server/src/main/java/org/opensearch/index/recovery/RecoveryStats.java +++ b/server/src/main/java/org/opensearch/index/recovery/RecoveryStats.java @@ -127,6 +127,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for recovery statistics + * + * @opensearch.internal + */ static final class Fields { static final String RECOVERY = "recovery"; static final String CURRENT_AS_SOURCE = "current_as_source"; diff --git a/server/src/main/java/org/opensearch/index/reindex/BulkByScrollTask.java b/server/src/main/java/org/opensearch/index/reindex/BulkByScrollTask.java index 7751b2d848535..5d8adf03040ee 100644 --- a/server/src/main/java/org/opensearch/index/reindex/BulkByScrollTask.java +++ b/server/src/main/java/org/opensearch/index/reindex/BulkByScrollTask.java @@ -222,6 +222,8 @@ public boolean shouldCancelChildrenOnCancellation() { * This class acts as a builder for {@link Status}. Once the {@link Status} object is built by calling * {@link #buildStatus()} it is immutable. Used by an instance of {@link ObjectParser} when parsing from * XContent. + * + * @opensearch.internal */ public static class StatusBuilder { private Integer sliceId = null; @@ -355,6 +357,8 @@ public Status buildStatus() { * implementations, this one has become defacto standardized because Kibana * parses it. As such, we should be very careful about removing things from * this. + * + * @opensearch.internal */ public static class Status implements Task.Status, SuccessfullyProcessed { public static final String NAME = "bulk-by-scroll"; @@ -927,6 +931,8 @@ private long checkPositive(long value, String name) { /** * The status of a slice of the request. Successful requests store the {@link StatusOrException#status} while failing requests store a * {@link StatusOrException#exception}. + * + * @opensearch.internal */ public static class StatusOrException implements Writeable, ToXContentObject { private final Status status; diff --git a/server/src/main/java/org/opensearch/index/reindex/ClientScrollableHitSource.java b/server/src/main/java/org/opensearch/index/reindex/ClientScrollableHitSource.java index 82008746f06f8..f01f90ef68bcd 100644 --- a/server/src/main/java/org/opensearch/index/reindex/ClientScrollableHitSource.java +++ b/server/src/main/java/org/opensearch/index/reindex/ClientScrollableHitSource.java @@ -179,6 +179,11 @@ private Response wrapSearchResponse(SearchResponse response) { return new Response(response.isTimedOut(), failures, total, hits, response.getScrollId()); } + /** + * A Client hit + * + * @opensearch.internal + */ private static class ClientHit implements Hit { private final SearchHit delegate; private final BytesReference source; diff --git a/server/src/main/java/org/opensearch/index/reindex/LeaderBulkByScrollTaskState.java b/server/src/main/java/org/opensearch/index/reindex/LeaderBulkByScrollTaskState.java index bef696fe18ed4..973ceeefe43b7 100644 --- a/server/src/main/java/org/opensearch/index/reindex/LeaderBulkByScrollTaskState.java +++ b/server/src/main/java/org/opensearch/index/reindex/LeaderBulkByScrollTaskState.java @@ -156,6 +156,11 @@ private void recordSliceCompletionAndRespondIfAllDone(ActionListener { private Request(StreamInput in) throws IOException { diff --git a/server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java b/server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java index ac611a4af4318..d63a178b4213a 100644 --- a/server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java +++ b/server/src/main/java/org/opensearch/index/seqno/ReplicationTracker.java @@ -662,6 +662,11 @@ public synchronized void renewPeerRecoveryRetentionLeases() { assert invariant(); } + /** + * The state of the lucene checkpoint + * + * @opensearch.internal + */ public static class CheckpointState implements Writeable { /** @@ -1594,6 +1599,8 @@ private synchronized void waitForLocalCheckpointToAdvance() throws InterruptedEx /** * Represents the sequence number component of the primary context. This is the knowledge on the primary of the in-sync and initializing * shards and their local checkpoints. + * + * @opensearch.internal */ public static class PrimaryContext implements Writeable { diff --git a/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseActions.java b/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseActions.java index 3827666a5678c..2ce0f1f524a43 100644 --- a/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseActions.java +++ b/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseActions.java @@ -71,6 +71,11 @@ public class RetentionLeaseActions { public static final long RETAIN_ALL = -1; + /** + * Base class for transport retention lease actions + * + * @opensearch.internal + */ abstract static class TransportRetentionLeaseAction> extends TransportSingleShardAction { private final IndicesService indicesService; @@ -134,6 +139,11 @@ protected boolean resolveIndex(final T request) { } + /** + * Add retention lease action + * + * @opensearch.internal + */ public static class Add extends ActionType { public static final Add INSTANCE = new Add(); @@ -143,6 +153,11 @@ private Add() { super(ACTION_NAME, Response::new); } + /** + * Internal transport action + * + * @opensearch.internal + */ public static class TransportAction extends TransportRetentionLeaseAction { @Inject @@ -184,6 +199,11 @@ protected Writeable.Reader getResponseReader() { } } + /** + * Renew the retention lease + * + * @opensearch.internal + */ public static class Renew extends ActionType { public static final Renew INSTANCE = new Renew(); @@ -193,6 +213,11 @@ private Renew() { super(ACTION_NAME, Response::new); } + /** + * Internal transport action for renew + * + * @opensearch.internal + */ public static class TransportAction extends TransportRetentionLeaseAction { @Inject @@ -225,6 +250,11 @@ void doRetentionLeaseAction(final IndexShard indexShard, final RenewRequest requ } } + /** + * Remove retention lease action + * + * @opensearch.internal + */ public static class Remove extends ActionType { public static final Remove INSTANCE = new Remove(); @@ -234,6 +264,11 @@ private Remove() { super(ACTION_NAME, Response::new); } + /** + * Internal transport action for remove + * + * @opensearch.internal + */ public static class TransportAction extends TransportRetentionLeaseAction { @Inject @@ -265,6 +300,11 @@ void doRetentionLeaseAction(final IndexShard indexShard, final RemoveRequest req } } + /** + * Base request + * + * @opensearch.internal + */ private abstract static class Request> extends SingleShardRequest { private final ShardId shardId; @@ -305,6 +345,11 @@ public void writeTo(final StreamOutput out) throws IOException { } + /** + * Base add or renew request + * + * @opensearch.internal + */ private abstract static class AddOrRenewRequest> extends Request { private final long retainingSequenceNumber; @@ -343,6 +388,11 @@ public void writeTo(final StreamOutput out) throws IOException { } + /** + * Add retention lease request + * + * @opensearch.internal + */ public static class AddRequest extends AddOrRenewRequest { AddRequest(StreamInput in) throws IOException { @@ -355,6 +405,11 @@ public AddRequest(final ShardId shardId, final String id, final long retainingSe } + /** + * Renew Request action + * + * @opensearch.internal + */ public static class RenewRequest extends AddOrRenewRequest { RenewRequest(StreamInput in) throws IOException { @@ -367,6 +422,11 @@ public RenewRequest(final ShardId shardId, final String id, final long retaining } + /** + * Remove request + * + * @opensearch.internal + */ public static class RemoveRequest extends Request { RemoveRequest(StreamInput in) throws IOException { @@ -379,6 +439,11 @@ public RemoveRequest(final ShardId shardId, final String id) { } + /** + * The response + * + * @opensearch.internal + */ public static class Response extends ActionResponse { public Response() {} diff --git a/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseBackgroundSyncAction.java b/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseBackgroundSyncAction.java index 891b55f0e8391..6de6aeaef5018 100644 --- a/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseBackgroundSyncAction.java +++ b/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseBackgroundSyncAction.java @@ -198,6 +198,11 @@ protected void shardOperationOnReplica(Request request, IndexShard replica, Acti }); } + /** + * Request for retention lease bground sync action + * + * @opensearch.internal + */ public static final class Request extends ReplicationRequest { private RetentionLeases retentionLeases; diff --git a/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseSyncAction.java b/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseSyncAction.java index a6aebeb21a76a..afcf5c6766194 100644 --- a/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseSyncAction.java +++ b/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseSyncAction.java @@ -211,6 +211,11 @@ public ClusterBlockLevel indexBlockLevel() { return null; } + /** + * Request for retention lease sync action + * + * @opensearch.internal + */ public static final class Request extends ReplicatedWriteRequest { private RetentionLeases retentionLeases; @@ -260,6 +265,11 @@ public String toString() { } + /** + * Response for retention lease sync action + * + * @opensearch.internal + */ public static final class Response extends ReplicationResponse implements WriteResponse { public Response() {} diff --git a/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseSyncer.java b/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseSyncer.java index 25a768868f5d5..bfe5fc75a0991 100644 --- a/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseSyncer.java +++ b/server/src/main/java/org/opensearch/index/seqno/RetentionLeaseSyncer.java @@ -80,6 +80,8 @@ public void backgroundSync(ShardId shardId, String primaryAllocationId, long pri /** * Represents an action that is invoked to sync retention leases to replica shards after a retention lease is added * or removed on the primary. The specified listener is invoked when the syncing completes with success or failure. + * + * @opensearch.internal */ public interface SyncAction { void sync( @@ -94,6 +96,8 @@ void sync( /** * Represents an action that is invoked periodically to sync retention leases to replica shards after some retention * lease has been renewed or expired. + * + * @opensearch.internal */ public interface BackgroundSyncAction { void backgroundSync(ShardId shardId, String primaryAllocationId, long primaryTerm, RetentionLeases retentionLeases); diff --git a/server/src/main/java/org/opensearch/index/seqno/SequenceNumbers.java b/server/src/main/java/org/opensearch/index/seqno/SequenceNumbers.java index f8639595d9195..210976ffba58a 100644 --- a/server/src/main/java/org/opensearch/index/seqno/SequenceNumbers.java +++ b/server/src/main/java/org/opensearch/index/seqno/SequenceNumbers.java @@ -129,6 +129,11 @@ public static long max(final long maxSeqNo, final long seqNo) { } } + /** + * Commit information + * + * @opensearch.internal + */ public static final class CommitInfo { public final long maxSeqNo; public final long localCheckpoint; diff --git a/server/src/main/java/org/opensearch/index/shard/DocsStats.java b/server/src/main/java/org/opensearch/index/shard/DocsStats.java index 952f94d26e1ef..ebb7091c4acd6 100644 --- a/server/src/main/java/org/opensearch/index/shard/DocsStats.java +++ b/server/src/main/java/org/opensearch/index/shard/DocsStats.java @@ -121,6 +121,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for document statistics + * + * @opensearch.internal + */ static final class Fields { static final String DOCS = "docs"; static final String COUNT = "count"; diff --git a/server/src/main/java/org/opensearch/index/shard/GlobalCheckpointListeners.java b/server/src/main/java/org/opensearch/index/shard/GlobalCheckpointListeners.java index e26f2ccca4fd1..6dbbb62e231af 100644 --- a/server/src/main/java/org/opensearch/index/shard/GlobalCheckpointListeners.java +++ b/server/src/main/java/org/opensearch/index/shard/GlobalCheckpointListeners.java @@ -65,6 +65,8 @@ public class GlobalCheckpointListeners implements Closeable { /** * A global checkpoint listener consisting of a callback that is notified when the global checkpoint is updated or the shard is closed. + * + * @opensearch.internal */ public interface GlobalCheckpointListener { diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShard.java b/server/src/main/java/org/opensearch/index/shard/IndexShard.java index b11148a9a2ef1..e54c08d4cbad3 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShard.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShard.java @@ -1503,6 +1503,11 @@ static Engine.Searcher wrapSearcher( } } + /** + * Wrapper for a non-closing reader + * + * @opensearch.internal + */ private static final class NonClosingReaderWrapper extends FilterDirectoryReader { private NonClosingReaderWrapper(DirectoryReader in) throws IOException { @@ -3620,6 +3625,8 @@ private RefreshListeners buildRefreshListeners() { * Simple struct encapsulating a shard failure * * @see IndexShard#addShardFailureCallback(Consumer) + * + * @opensearch.internal */ public static final class ShardFailure { public final ShardRouting routing; @@ -3785,6 +3792,11 @@ public void addRefreshListener(Translog.Location location, Consumer lis } } + /** + * Metrics updater for a refresh + * + * @opensearch.internal + */ private static class RefreshMetricUpdater implements ReferenceManager.RefreshListener { private final MeanMetric refreshMetric; diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShardOperationPermits.java b/server/src/main/java/org/opensearch/index/shard/IndexShardOperationPermits.java index 3e788b55c6f32..9d500db1d8036 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShardOperationPermits.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShardOperationPermits.java @@ -361,6 +361,11 @@ List getActiveOperations() { .collect(Collectors.toList()); } + /** + * Represents a delayed operation + * + * @opensearch.internal + */ private static class DelayedOperation { private final ActionListener listener; private final String debugInfo; diff --git a/server/src/main/java/org/opensearch/index/shard/IndexShardState.java b/server/src/main/java/org/opensearch/index/shard/IndexShardState.java index 5a0808ece96d5..dc6f2fc3a86d9 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexShardState.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexShardState.java @@ -34,6 +34,8 @@ /** * Index Shard States + * + * @opensearch.internal */ public enum IndexShardState { CREATED((byte) 0), diff --git a/server/src/main/java/org/opensearch/index/shard/IndexingStats.java b/server/src/main/java/org/opensearch/index/shard/IndexingStats.java index c57be2b2b689c..11004fa3e52c3 100644 --- a/server/src/main/java/org/opensearch/index/shard/IndexingStats.java +++ b/server/src/main/java/org/opensearch/index/shard/IndexingStats.java @@ -52,6 +52,11 @@ */ public class IndexingStats implements Writeable, ToXContentFragment { + /** + * Internal statistics for indexing + * + * @opensearch.internal + */ public static class Stats implements Writeable, ToXContentFragment { private long indexCount; @@ -269,6 +274,11 @@ public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params par return builder; } + /** + * Fields for indexing statistics + * + * @opensearch.internal + */ static final class Fields { static final String INDEXING = "indexing"; static final String INDEX_TOTAL = "index_total"; diff --git a/server/src/main/java/org/opensearch/index/shard/InternalIndexingStats.java b/server/src/main/java/org/opensearch/index/shard/InternalIndexingStats.java index 25500ceafb2ef..f0b87ee3c2b41 100644 --- a/server/src/main/java/org/opensearch/index/shard/InternalIndexingStats.java +++ b/server/src/main/java/org/opensearch/index/shard/InternalIndexingStats.java @@ -129,6 +129,11 @@ void noopUpdate() { totalStats.noopUpdates.inc(); } + /** + * Holder for base indexing statistics + * + * @opensearch.internal + */ static class StatsHolder { private final MeanMetric indexMetric = new MeanMetric(); private final MeanMetric deleteMetric = new MeanMetric(); diff --git a/server/src/main/java/org/opensearch/index/shard/PrimaryReplicaSyncer.java b/server/src/main/java/org/opensearch/index/shard/PrimaryReplicaSyncer.java index 463c9b7ca4af2..bff556c498c67 100644 --- a/server/src/main/java/org/opensearch/index/shard/PrimaryReplicaSyncer.java +++ b/server/src/main/java/org/opensearch/index/shard/PrimaryReplicaSyncer.java @@ -225,6 +225,11 @@ public void onFailure(Exception e) { } } + /** + * Synchronous action + * + * @opensearch.internal + */ public interface SyncAction { void sync( ResyncReplicationRequest request, @@ -235,6 +240,11 @@ void sync( ); } + /** + * Sends a snapshot + * + * @opensearch.internal + */ static class SnapshotSender extends AbstractRunnable implements ActionListener { private final Logger logger; private final SyncAction syncAction; @@ -348,6 +358,11 @@ protected void doRun() throws Exception { } } + /** + * Request to resync primary and replica + * + * @opensearch.internal + */ public static class ResyncRequest extends ActionRequest { private final ShardId shardId; @@ -379,6 +394,11 @@ public ActionRequestValidationException validate() { } } + /** + * Task to resync primary and replica + * + * @opensearch.internal + */ public static class ResyncTask extends Task { private volatile String phase = "starting"; private volatile int totalOperations; @@ -441,6 +461,11 @@ public ResyncTask.Status getStatus() { return new ResyncTask.Status(phase, totalOperations, resyncedOperations, skippedOperations); } + /** + * Status for primary replica syncer + * + * @opensearch.internal + */ public static class Status implements Task.Status { public static final String NAME = "resync"; diff --git a/server/src/main/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommand.java b/server/src/main/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommand.java index feceb017a3663..ccc620fc8cf64 100644 --- a/server/src/main/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommand.java +++ b/server/src/main/java/org/opensearch/index/shard/RemoveCorruptedShardDataCommand.java @@ -528,6 +528,11 @@ private Path getNodePath(ShardPath shardPath) { return nodePath; } + /** + * Status of the shard cleaning operation + * + * @opensearch.internal + */ public enum CleanStatus { CLEAN("clean"), CLEAN_WITH_CORRUPTED_MARKER("marked corrupted, but no corruption detected"), diff --git a/server/src/main/java/org/opensearch/index/shard/ShardSplittingQuery.java b/server/src/main/java/org/opensearch/index/shard/ShardSplittingQuery.java index 5f3297fa08b08..6d559a6cc0673 100644 --- a/server/src/main/java/org/opensearch/index/shard/ShardSplittingQuery.java +++ b/server/src/main/java/org/opensearch/index/shard/ShardSplittingQuery.java @@ -296,6 +296,8 @@ boolean matches(int doc) throws IOException { /** * This two phase iterator visits every live doc and selects all docs that don't belong into this * shard based on their id and routing value. This is only used in a routing partitioned index. + * + * @opensearch.internal */ private static final class RoutingPartitionedDocIdSetIterator extends TwoPhaseIterator { private final Visitor visitor; @@ -318,6 +320,8 @@ public float matchCost() { /** * This TwoPhaseIterator marks all nested docs of matching parents as matches as well. + * + * @opensearch.internal */ private static final class NestedRoutingPartitionedDocIdSetIterator extends TwoPhaseIterator { private final Visitor visitor; diff --git a/server/src/main/java/org/opensearch/index/shard/StoreRecovery.java b/server/src/main/java/org/opensearch/index/shard/StoreRecovery.java index 7ed424e9623eb..df501d24265c3 100644 --- a/server/src/main/java/org/opensearch/index/shard/StoreRecovery.java +++ b/server/src/main/java/org/opensearch/index/shard/StoreRecovery.java @@ -231,6 +231,8 @@ void addIndices( /** * Directory wrapper that records copy process for recovery statistics + * + * @opensearch.internal */ static final class StatsDirectoryWrapper extends FilterDirectory { private final RecoveryState.Index index; diff --git a/server/src/main/java/org/opensearch/index/similarity/ScriptedSimilarity.java b/server/src/main/java/org/opensearch/index/similarity/ScriptedSimilarity.java index 53604606887eb..5b39c03b7276a 100644 --- a/server/src/main/java/org/opensearch/index/similarity/ScriptedSimilarity.java +++ b/server/src/main/java/org/opensearch/index/similarity/ScriptedSimilarity.java @@ -163,7 +163,11 @@ public Explanation explain(Explanation freq, long norm) { } } - /** Scoring factors that come from the query. */ + /** + * Scoring factors that come from the query. + * + * @opensearch.internal + */ public static class Query { private final float boost; @@ -177,7 +181,11 @@ public float getBoost() { } } - /** Statistics that are specific to a given field. */ + /** + * Statistics that are specific to a given field. + * + * @opensearch.internal + */ public static class Field { private final long docCount; private final long sumDocFreq; @@ -207,7 +215,11 @@ public long getSumTotalTermFreq() { } } - /** Statistics that are specific to a given term. */ + /** + * Statistics that are specific to a given term. + * + * @opensearch.internal + */ public static class Term { private final long docFreq; private final long totalTermFreq; @@ -228,7 +240,11 @@ public long getTotalTermFreq() { } } - /** Statistics that are specific to a document. */ + /** + * Statistics that are specific to a document. + * + * @opensearch.internal + */ public static class Doc { private float freq; private long norm; diff --git a/server/src/main/java/org/opensearch/index/similarity/SimilarityService.java b/server/src/main/java/org/opensearch/index/similarity/SimilarityService.java index 1bfcc302c3bfc..d575ec508acb6 100644 --- a/server/src/main/java/org/opensearch/index/similarity/SimilarityService.java +++ b/server/src/main/java/org/opensearch/index/similarity/SimilarityService.java @@ -208,6 +208,11 @@ Similarity getDefaultSimilarity() { return defaultSimilarity; } + /** + * Similarity per field + * + * @opensearch.internal + */ static class PerFieldSimilarity extends PerFieldSimilarityWrapper { private final Similarity defaultSimilarity; diff --git a/server/src/main/java/org/opensearch/index/snapshots/IndexShardSnapshotStatus.java b/server/src/main/java/org/opensearch/index/snapshots/IndexShardSnapshotStatus.java index f0ce45e290c16..d48da6f462502 100644 --- a/server/src/main/java/org/opensearch/index/snapshots/IndexShardSnapshotStatus.java +++ b/server/src/main/java/org/opensearch/index/snapshots/IndexShardSnapshotStatus.java @@ -44,6 +44,8 @@ public class IndexShardSnapshotStatus { /** * Snapshot stage + * + * @opensearch.internal */ public enum Stage { /** @@ -245,6 +247,8 @@ public static IndexShardSnapshotStatus newDone( /** * Returns an immutable state of {@link IndexShardSnapshotStatus} at a given point in time. + * + * @opensearch.internal */ public static class Copy { diff --git a/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java b/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java index f3b6e91a79535..a0e783727ee27 100644 --- a/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java +++ b/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java @@ -61,6 +61,8 @@ public class BlobStoreIndexShardSnapshot implements ToXContentFragment { /** * Information about snapshotted file + * + * @opensearch.internal */ public static class FileInfo { diff --git a/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshots.java b/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshots.java index 4f59f65e25553..c5e48890cb392 100644 --- a/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshots.java +++ b/server/src/main/java/org/opensearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshots.java @@ -178,11 +178,21 @@ public Iterator iterator() { return shardSnapshots.iterator(); } + /** + * Fields for blob store index shard snapshot + * + * @opensearch.internal + */ static final class Fields { static final String FILES = "files"; static final String SNAPSHOTS = "snapshots"; } + /** + * Parse fields for blob store index shard snapshots + * + * @opensearch.internal + */ static final class ParseFields { static final ParseField FILES = new ParseField("files"); static final ParseField SHARD_STATE_ID = new ParseField("shard_state_id"); diff --git a/server/src/main/java/org/opensearch/index/snapshots/blobstore/RateLimitingInputStream.java b/server/src/main/java/org/opensearch/index/snapshots/blobstore/RateLimitingInputStream.java index b95814f92624c..86ecef1173e48 100644 --- a/server/src/main/java/org/opensearch/index/snapshots/blobstore/RateLimitingInputStream.java +++ b/server/src/main/java/org/opensearch/index/snapshots/blobstore/RateLimitingInputStream.java @@ -52,6 +52,11 @@ public class RateLimitingInputStream extends FilterInputStream { private long bytesSinceLastRateLimit; + /** + * Internal listener + * + * @opensearch.internal + */ public interface Listener { void onPause(long nanos); } diff --git a/server/src/main/java/org/opensearch/index/store/ByteSizeCachingDirectory.java b/server/src/main/java/org/opensearch/index/store/ByteSizeCachingDirectory.java index 76836391cb9d6..9fe72c0da1062 100644 --- a/server/src/main/java/org/opensearch/index/store/ByteSizeCachingDirectory.java +++ b/server/src/main/java/org/opensearch/index/store/ByteSizeCachingDirectory.java @@ -54,6 +54,11 @@ */ final class ByteSizeCachingDirectory extends FilterDirectory { + /** + * Internal caching size and modulo count + * + * @opensearch.internal + */ private static class SizeAndModCount { final long size; final long modCount; diff --git a/server/src/main/java/org/opensearch/index/store/FsDirectoryFactory.java b/server/src/main/java/org/opensearch/index/store/FsDirectoryFactory.java index 02e9eb50e7309..57cc9f09ac37d 100644 --- a/server/src/main/java/org/opensearch/index/store/FsDirectoryFactory.java +++ b/server/src/main/java/org/opensearch/index/store/FsDirectoryFactory.java @@ -135,6 +135,11 @@ public static boolean isHybridFs(Directory directory) { return unwrap instanceof HybridDirectory; } + /** + * A hybrid directory implementation + * + * @opensearch.internal + */ static final class HybridDirectory extends NIOFSDirectory { private final MMapDirectory delegate; @@ -201,6 +206,11 @@ MMapDirectory getDelegate() { } } + /** + * Pre loaded mmap directory + * + * @opensearch.internal + */ // TODO it would be nice to share code between PreLoadMMapDirectory and HybridDirectory but due to the nesting aspect of // directories here makes it tricky. It would be nice to allow MMAPDirectory to pre-load on a per IndexInput basis. static final class PreLoadMMapDirectory extends MMapDirectory { diff --git a/server/src/main/java/org/opensearch/index/store/Store.java b/server/src/main/java/org/opensearch/index/store/Store.java index e21cf8e3e5b58..65c47f66b7654 100644 --- a/server/src/main/java/org/opensearch/index/store/Store.java +++ b/server/src/main/java/org/opensearch/index/store/Store.java @@ -736,6 +736,11 @@ public void beforeClose() { shardLock.setDetails("closing shard"); } + /** + * A store directory + * + * @opensearch.internal + */ static final class StoreDirectory extends FilterDirectory { private final Logger deletesLogger; @@ -792,6 +797,8 @@ public Set getPendingDeletions() throws IOException { * change concurrently for safety reasons. * * @see StoreFileMetadata + * + * @opensearch.internal */ public static final class MetadataSnapshot implements Iterable, Writeable { private final Map metadata; @@ -865,6 +872,11 @@ public long getNumDocs() { return numDocs; } + /** + * Metadata that is currently loaded + * + * @opensearch.internal + */ static class LoadedMetadata { final Map fileMetadata; final Map userData; @@ -1162,6 +1174,8 @@ public String getSyncId() { * A class representing the diff between a recovery source and recovery target * * @see MetadataSnapshot#recoveryDiff(org.opensearch.index.store.Store.MetadataSnapshot) + * + * @opensearch.internal */ public static final class RecoveryDiff { /** @@ -1211,6 +1225,11 @@ public static String digestToString(long digest) { return Long.toString(digest, Character.MAX_RADIX); } + /** + * Class to verify the lucene index output + * + * @opensearch.internal + */ static class LuceneVerifyingIndexOutput extends VerifyingIndexOutput { private final StoreFileMetadata metadata; @@ -1309,6 +1328,8 @@ public void writeBytes(byte[] b, int offset, int length) throws IOException { * This class supports random access (it is possible to seek backward and forward) in order to accommodate retry * mechanism that is used in some repository plugins (S3 for example). However, the checksum is only calculated on * the first read. All consecutive reads of the same data are not used to calculate the checksum. + * + * @opensearch.internal */ static class VerifyingIndexInput extends ChecksumIndexInput { private final IndexInput input; @@ -1481,6 +1502,8 @@ public void markStoreCorrupted(IOException exception) throws IOException { /** * A listener that is executed once the store is closed and all references to it are released + * + * @opensearch.internal */ public interface OnClose extends Consumer { OnClose EMPTY = new OnClose() { diff --git a/server/src/main/java/org/opensearch/index/store/StoreStats.java b/server/src/main/java/org/opensearch/index/store/StoreStats.java index fdda71aaaeebb..8a8af673713e9 100644 --- a/server/src/main/java/org/opensearch/index/store/StoreStats.java +++ b/server/src/main/java/org/opensearch/index/store/StoreStats.java @@ -138,6 +138,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for store statistics + * + * @opensearch.internal + */ static final class Fields { static final String STORE = "store"; static final String SIZE = "size"; diff --git a/server/src/main/java/org/opensearch/index/termvectors/TermVectorsService.java b/server/src/main/java/org/opensearch/index/termvectors/TermVectorsService.java index 7648f151851c0..ff75c6e3ddc45 100644 --- a/server/src/main/java/org/opensearch/index/termvectors/TermVectorsService.java +++ b/server/src/main/java/org/opensearch/index/termvectors/TermVectorsService.java @@ -423,7 +423,11 @@ private static Fields mergeFields(Fields fields1, Fields fields2) throws IOExcep return parallelFields; } - // Poached from Lucene ParallelLeafReader + /** + * Poached from Lucene ParallelLeafReader + * + * @opensearch.internal + */ private static final class ParallelFields extends Fields { final Map fields = new TreeMap<>(); diff --git a/server/src/main/java/org/opensearch/index/translog/MultiSnapshot.java b/server/src/main/java/org/opensearch/index/translog/MultiSnapshot.java index f1de0ddab97c4..bda8bbecb81f0 100644 --- a/server/src/main/java/org/opensearch/index/translog/MultiSnapshot.java +++ b/server/src/main/java/org/opensearch/index/translog/MultiSnapshot.java @@ -98,6 +98,11 @@ public void close() throws IOException { onClose.close(); } + /** + * Sequence number set + * + * @opensearch.internal + */ static final class SeqNoSet { static final short BIT_SET_SIZE = 1024; private final LongObjectHashMap bitSets = new LongObjectHashMap<>(); diff --git a/server/src/main/java/org/opensearch/index/translog/Translog.java b/server/src/main/java/org/opensearch/index/translog/Translog.java index 4a11db2bc6a1d..7f22ad1bf320d 100644 --- a/server/src/main/java/org/opensearch/index/translog/Translog.java +++ b/server/src/main/java/org/opensearch/index/translog/Translog.java @@ -952,6 +952,11 @@ public TranslogDeletionPolicy getDeletionPolicy() { return deletionPolicy; } + /** + * Location in the translot + * + * @opensearch.internal + */ public static class Location implements Comparable { public final long generation; @@ -1008,6 +1013,8 @@ public int hashCode() { /** * A snapshot of the transaction log, allows to iterate over all the transaction log operations. + * + * @opensearch.internal */ public interface Snapshot extends Closeable { @@ -1035,6 +1042,8 @@ default int skippedOperations() { * between {@code fromSeqNo} (inclusive) and {@code toSeqNo} (inclusive). This filtered snapshot * shares the same underlying resources with the {@code delegate} snapshot, therefore we should not * use the {@code delegate} after passing it to this filtered snapshot. + * + * @opensearch.internal */ private static final class SeqNoFilterSnapshot implements Snapshot { private final Snapshot delegate; @@ -1090,8 +1099,15 @@ public void close() throws IOException { /** * A generic interface representing an operation performed on the transaction log. * Each is associated with a type. + * + * @opensearch.internal */ public interface Operation { + /** + * The type of operation + * + * @opensearch.internal + */ enum Type { @Deprecated CREATE((byte) 1), @@ -1179,6 +1195,11 @@ static void writeOperation(final StreamOutput output, final Operation operation) } + /** + * The source in the translog + * + * @opensearch.internal + */ public static class Source { public final BytesReference source; @@ -1191,6 +1212,11 @@ public Source(BytesReference source, String routing) { } + /** + * Indexing operation + * + * @opensearch.internal + */ public static class Index implements Operation { public static final int FORMAT_6_0 = 8; // since 6.0.0 @@ -1378,6 +1404,11 @@ public long getAutoGeneratedIdTimestamp() { } + /** + * Delete operation + * + * @opensearch.internal + */ public static class Delete implements Operation { private static final int FORMAT_6_0 = 4; // 6.0 - * @@ -1509,6 +1540,11 @@ public String toString() { } } + /** + * Translog no op + * + * @opensearch.internal + */ public static class NoOp implements Operation { private final long seqNo; @@ -1588,6 +1624,11 @@ public String toString() { } } + /** + * How to sync the translog + * + * @opensearch.internal + */ public enum Durability { /** @@ -1844,6 +1885,8 @@ void closeFilesIfNoPendingRetentionLocks() throws IOException { /** * References a transaction log generation + * + * @opensearch.internal */ public static final class TranslogGeneration { public final String translogUUID; diff --git a/server/src/main/java/org/opensearch/index/warmer/WarmerStats.java b/server/src/main/java/org/opensearch/index/warmer/WarmerStats.java index 79fba31d015d3..ca2c3f4d27328 100644 --- a/server/src/main/java/org/opensearch/index/warmer/WarmerStats.java +++ b/server/src/main/java/org/opensearch/index/warmer/WarmerStats.java @@ -120,6 +120,11 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws return builder; } + /** + * Fields for warmer statistics + * + * @opensearch.internal + */ static final class Fields { static final String WARMER = "warmer"; static final String CURRENT = "current"; diff --git a/server/src/main/java/org/opensearch/transport/ConnectionManager.java b/server/src/main/java/org/opensearch/transport/ConnectionManager.java index 3fcd05029a4c9..d48f2eb4e0bb1 100644 --- a/server/src/main/java/org/opensearch/transport/ConnectionManager.java +++ b/server/src/main/java/org/opensearch/transport/ConnectionManager.java @@ -76,11 +76,21 @@ void connectToNode( ConnectionProfile getConnectionProfile(); + /** + * Validates a connection + * + * @opensearch.internal + */ @FunctionalInterface interface ConnectionValidator { void validate(Transport.Connection connection, ConnectionProfile profile, ActionListener listener); } + /** + * Connection listener for a delegating node + * + * @opensearch.internal + */ final class DelegatingNodeConnectionListener implements TransportConnectionListener { private final CopyOnWriteArrayList listeners = new CopyOnWriteArrayList<>(); diff --git a/server/src/main/java/org/opensearch/transport/ConnectionProfile.java b/server/src/main/java/org/opensearch/transport/ConnectionProfile.java index 5b657efcabd3e..708d1a3a0e4c1 100644 --- a/server/src/main/java/org/opensearch/transport/ConnectionProfile.java +++ b/server/src/main/java/org/opensearch/transport/ConnectionProfile.java @@ -174,6 +174,8 @@ private ConnectionProfile( /** * A builder to build a new {@link ConnectionProfile} + * + * @opensearch.internal */ public static class Builder { private final List handles = new ArrayList<>(); diff --git a/server/src/main/java/org/opensearch/transport/InboundAggregator.java b/server/src/main/java/org/opensearch/transport/InboundAggregator.java index 321db13751906..c8cfaa8339e33 100644 --- a/server/src/main/java/org/opensearch/transport/InboundAggregator.java +++ b/server/src/main/java/org/opensearch/transport/InboundAggregator.java @@ -239,6 +239,11 @@ private void checkBreaker(final Header header, final int contentLength, final Br } } + /** + * Internal circuit breaker control + * + * @opensearch.internal + */ private static class BreakerControl implements Releasable { private static final int CLOSED = -1; diff --git a/server/src/main/java/org/opensearch/transport/InboundHandler.java b/server/src/main/java/org/opensearch/transport/InboundHandler.java index 21a23461c1b8a..37604151603d0 100644 --- a/server/src/main/java/org/opensearch/transport/InboundHandler.java +++ b/server/src/main/java/org/opensearch/transport/InboundHandler.java @@ -432,6 +432,11 @@ static void assertRemoteVersion(StreamInput in, Version version) { assert version.equals(in.getVersion()) : "Stream version [" + in.getVersion() + "] does not match version [" + version + "]"; } + /** + * Internal request handler + * + * @opensearch.internal + */ private static class RequestHandler extends AbstractRunnable { private final RequestHandlerRegistry reg; private final T request; diff --git a/server/src/main/java/org/opensearch/transport/OutboundHandler.java b/server/src/main/java/org/opensearch/transport/OutboundHandler.java index 726fb940ee3e0..e890929cfc29f 100644 --- a/server/src/main/java/org/opensearch/transport/OutboundHandler.java +++ b/server/src/main/java/org/opensearch/transport/OutboundHandler.java @@ -212,6 +212,11 @@ void setMessageListener(TransportMessageListener listener) { } } + /** + * Internal message serializer + * + * @opensearch.internal + */ private static class MessageSerializer implements CheckedSupplier, Releasable { private final OutboundMessage message; diff --git a/server/src/main/java/org/opensearch/transport/OutboundMessage.java b/server/src/main/java/org/opensearch/transport/OutboundMessage.java index 2747a93420282..8d51f58bbe53e 100644 --- a/server/src/main/java/org/opensearch/transport/OutboundMessage.java +++ b/server/src/main/java/org/opensearch/transport/OutboundMessage.java @@ -117,6 +117,11 @@ protected BytesReference writeMessage(CompressibleBytesOutputStream stream) thro } } + /** + * Internal outbound message request + * + * @opensearch.internal + */ static class Request extends OutboundMessage { private final String[] features; @@ -158,6 +163,11 @@ private static byte setStatus(boolean compress, boolean isHandshake, Writeable m } } + /** + * Internal message response + * + * @opensearch.internal + */ static class Response extends OutboundMessage { private final Set features; diff --git a/server/src/main/java/org/opensearch/transport/ProxyConnectionStrategy.java b/server/src/main/java/org/opensearch/transport/ProxyConnectionStrategy.java index c1b35ca00a92b..dfb317fd76212 100644 --- a/server/src/main/java/org/opensearch/transport/ProxyConnectionStrategy.java +++ b/server/src/main/java/org/opensearch/transport/ProxyConnectionStrategy.java @@ -344,6 +344,11 @@ private static TransportAddress resolveAddress(String address) { return new TransportAddress(parseConfiguredAddress(address)); } + /** + * Contains information about the proxy mode + * + * @opensearch.internal + */ public static class ProxyModeInfo implements RemoteConnectionInfo.ModeInfo { private final String address; diff --git a/server/src/main/java/org/opensearch/transport/RemoteClusterService.java b/server/src/main/java/org/opensearch/transport/RemoteClusterService.java index fcdeec36f865c..d39f80ea6b383 100644 --- a/server/src/main/java/org/opensearch/transport/RemoteClusterService.java +++ b/server/src/main/java/org/opensearch/transport/RemoteClusterService.java @@ -436,6 +436,11 @@ Collection getConnections() { return remoteClusters.values(); } + /** + * Internal class to hold cluster alias and key and track a remote connection + * + * @opensearch.internal + */ private static class RemoteConnectionEnabled implements Setting.Validator { private final String clusterAlias; diff --git a/server/src/main/java/org/opensearch/transport/RemoteConnectionInfo.java b/server/src/main/java/org/opensearch/transport/RemoteConnectionInfo.java index 7ca1d646a9507..ac88eae624813 100644 --- a/server/src/main/java/org/opensearch/transport/RemoteConnectionInfo.java +++ b/server/src/main/java/org/opensearch/transport/RemoteConnectionInfo.java @@ -222,6 +222,11 @@ public int hashCode() { return Objects.hash(modeInfo, initialConnectionTimeout, clusterAlias, skipUnavailable); } + /** + * Mode information + * + * @opensearch.internal + */ public interface ModeInfo extends ToXContentFragment, Writeable { boolean isConnected(); diff --git a/server/src/main/java/org/opensearch/transport/RemoteConnectionStrategy.java b/server/src/main/java/org/opensearch/transport/RemoteConnectionStrategy.java index 8d5727858ec6f..6a3063a835d5e 100644 --- a/server/src/main/java/org/opensearch/transport/RemoteConnectionStrategy.java +++ b/server/src/main/java/org/opensearch/transport/RemoteConnectionStrategy.java @@ -422,6 +422,11 @@ private boolean connectionProfileChanged(ConnectionProfile oldProfile, Connectio || Objects.equals(oldProfile.getPingInterval(), newProfile.getPingInterval()) == false; } + /** + * Internal strategy validation object + * + * @opensearch.internal + */ static class StrategyValidator implements Setting.Validator { private final String key; diff --git a/server/src/main/java/org/opensearch/transport/SniffConnectionStrategy.java b/server/src/main/java/org/opensearch/transport/SniffConnectionStrategy.java index c84c5599bb746..3e95c937a296f 100644 --- a/server/src/main/java/org/opensearch/transport/SniffConnectionStrategy.java +++ b/server/src/main/java/org/opensearch/transport/SniffConnectionStrategy.java @@ -561,6 +561,11 @@ private boolean proxyChanged(String oldProxy, String newProxy) { return Objects.equals(oldProxy, newProxy) == false; } + /** + * Information about the sniff mode + * + * @opensearch.internal + */ public static class SniffModeInfo implements RemoteConnectionInfo.ModeInfo { final List seedNodes; diff --git a/server/src/main/java/org/opensearch/transport/TcpChannel.java b/server/src/main/java/org/opensearch/transport/TcpChannel.java index 4202b906ce161..14012ec5dd43c 100644 --- a/server/src/main/java/org/opensearch/transport/TcpChannel.java +++ b/server/src/main/java/org/opensearch/transport/TcpChannel.java @@ -96,6 +96,11 @@ public interface TcpChannel extends CloseableChannel { */ ChannelStats getChannelStats(); + /** + * Channel statistics + * + * @opensearch.internal + */ class ChannelStats { private volatile long lastAccessedTime; diff --git a/server/src/main/java/org/opensearch/transport/TcpTransport.java b/server/src/main/java/org/opensearch/transport/TcpTransport.java index 76a0671a40c3e..7aedebb946e58 100644 --- a/server/src/main/java/org/opensearch/transport/TcpTransport.java +++ b/server/src/main/java/org/opensearch/transport/TcpTransport.java @@ -244,6 +244,11 @@ public void setSlowLogThreshold(TimeValue slowLogThreshold) { inboundHandler.setSlowLogThreshold(slowLogThreshold); } + /** + * List of node connection channels + * + * @opensearch.internal + */ public final class NodeChannels extends CloseableConnection { private final Map typeMapping; private final List channels; @@ -872,6 +877,8 @@ private static boolean bufferStartsWith(BytesReference buffer, String method) { /** * A helper exception to mark an incoming connection as potentially being HTTP * so an appropriate error code can be returned + * + * @opensearch.internal */ public static class HttpRequestOnTransportException extends OpenSearchException { diff --git a/server/src/main/java/org/opensearch/transport/Transport.java b/server/src/main/java/org/opensearch/transport/Transport.java index cf917d2a532dc..fbf6b3ef350d8 100644 --- a/server/src/main/java/org/opensearch/transport/Transport.java +++ b/server/src/main/java/org/opensearch/transport/Transport.java @@ -268,6 +268,11 @@ public TransportResponseHandler onResponseReceived( } } + /** + * Request handler implementations + * + * @opensearch.internal + */ final class RequestHandlers { private volatile Map> requestHandlers = Collections.emptyMap(); diff --git a/server/src/main/java/org/opensearch/transport/TransportActionProxy.java b/server/src/main/java/org/opensearch/transport/TransportActionProxy.java index b7cf18e88d924..6ab4a86071746 100644 --- a/server/src/main/java/org/opensearch/transport/TransportActionProxy.java +++ b/server/src/main/java/org/opensearch/transport/TransportActionProxy.java @@ -53,6 +53,11 @@ public final class TransportActionProxy { private TransportActionProxy() {} // no instance + /** + * Handler for proxy requests + * + * @opensearch.internal + */ private static class ProxyRequestHandler implements TransportRequestHandler { private final TransportService service; @@ -82,6 +87,11 @@ public void messageReceived(T request, TransportChannel channel, Task task) thro } } + /** + * Handler for the proxy response + * + * @opensearch.internal + */ private static class ProxyResponseHandler implements TransportResponseHandler { private final Writeable.Reader reader; @@ -121,6 +131,11 @@ public String executor() { } } + /** + * The proxy request + * + * @opensearch.internal + */ static class ProxyRequest extends TransportRequest { final T wrapped; final DiscoveryNode targetNode; diff --git a/server/src/main/java/org/opensearch/transport/TransportRequest.java b/server/src/main/java/org/opensearch/transport/TransportRequest.java index 6d599f9faf927..b089ed538e041 100644 --- a/server/src/main/java/org/opensearch/transport/TransportRequest.java +++ b/server/src/main/java/org/opensearch/transport/TransportRequest.java @@ -45,6 +45,11 @@ * @opensearch.internal */ public abstract class TransportRequest extends TransportMessage implements TaskAwareRequest { + /** + * Empty transport request + * + * @opensearch.internal + */ public static class Empty extends TransportRequest { public static final Empty INSTANCE = new Empty(); diff --git a/server/src/main/java/org/opensearch/transport/TransportRequestOptions.java b/server/src/main/java/org/opensearch/transport/TransportRequestOptions.java index 082d4dc3dd8a5..fe54d8185ea5f 100644 --- a/server/src/main/java/org/opensearch/transport/TransportRequestOptions.java +++ b/server/src/main/java/org/opensearch/transport/TransportRequestOptions.java @@ -59,6 +59,11 @@ public Type type() { public static final TransportRequestOptions EMPTY = new TransportRequestOptions.Builder().build(); + /** + * Type of transport request + * + * @opensearch.internal + */ public enum Type { RECOVERY, BULK, @@ -71,6 +76,11 @@ public static Builder builder() { return new Builder(); } + /** + * Builder for transport request options + * + * @opensearch.internal + */ public static class Builder { private TimeValue timeout; private Type type = Type.REG; diff --git a/server/src/main/java/org/opensearch/transport/TransportResponse.java b/server/src/main/java/org/opensearch/transport/TransportResponse.java index aeef9c71499fb..59cbcc8c25dc0 100644 --- a/server/src/main/java/org/opensearch/transport/TransportResponse.java +++ b/server/src/main/java/org/opensearch/transport/TransportResponse.java @@ -58,6 +58,11 @@ public TransportResponse(StreamInput in) throws IOException { super(in); } + /** + * Empty transport response + * + * @opensearch.internal + */ public static class Empty extends TransportResponse { public static final Empty INSTANCE = new Empty(); diff --git a/server/src/main/java/org/opensearch/transport/TransportService.java b/server/src/main/java/org/opensearch/transport/TransportService.java index 4d8773dcfbf9f..1a280f2475e5d 100644 --- a/server/src/main/java/org/opensearch/transport/TransportService.java +++ b/server/src/main/java/org/opensearch/transport/TransportService.java @@ -566,6 +566,11 @@ public ConnectionManager getConnectionManager() { return connectionManager; } + /** + * Internal Handshake request + * + * @opensearch.internal + */ static class HandshakeRequest extends TransportRequest { public static final HandshakeRequest INSTANCE = new HandshakeRequest(); @@ -578,6 +583,11 @@ private HandshakeRequest() {} } + /** + * Internal handshake response + * + * @opensearch.internal + */ public static class HandshakeResponse extends TransportResponse { private final DiscoveryNode discoveryNode; private final ClusterName clusterName; @@ -1285,6 +1295,11 @@ private void scheduleTimeout(TimeValue timeout) { } } + /** + * Holder for timeout information + * + * @opensearch.internal + */ static class TimeoutInfoHolder { private final DiscoveryNode node; @@ -1372,6 +1387,11 @@ void setTimeoutHandler(TimeoutHandler handler) { } + /** + * A channel for a direct response + * + * @opensearch.internal + */ static class DirectResponseChannel implements TransportChannel { final DiscoveryNode localNode; private final String action;