[Javadocs] add to o.o.action, index, and transport (#3277)
Adds javadocs to internal classes in org.opensearch.action, index, and transport packages. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
parent
a3030b5606
commit
b78176afef
|
@ -391,6 +391,8 @@ public abstract class DocWriteResponse extends ReplicationResponse implements Wr
|
|||
* 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 {
|
||||
|
||||
|
|
|
@ -112,6 +112,11 @@ public class TransportNodesHotThreadsAction extends TransportNodesAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner node request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class NodeRequest extends BaseNodeRequest {
|
||||
|
||||
NodesHotThreadsRequest request;
|
||||
|
|
|
@ -121,6 +121,11 @@ public class TransportNodesInfoAction extends TransportNodesAction<
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Node Info Request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class NodeInfoRequest extends BaseNodeRequest {
|
||||
|
||||
NodesInfoRequest request;
|
||||
|
|
|
@ -105,6 +105,11 @@ public class NodesReloadSecureSettingsResponse extends BaseNodesResponse<NodesRe
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Node Response
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class NodeResponse extends BaseNodeResponse {
|
||||
|
||||
private Exception reloadException = null;
|
||||
|
|
|
@ -183,6 +183,11 @@ public class TransportNodesReloadSecureSettingsAction extends TransportNodesActi
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Node Request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class NodeRequest extends BaseNodeRequest {
|
||||
|
||||
NodesReloadSecureSettingsRequest request;
|
||||
|
|
|
@ -122,6 +122,11 @@ public class TransportNodesStatsAction extends TransportNodesAction<
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Node Stats Request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class NodeStatsRequest extends BaseNodeRequest {
|
||||
|
||||
NodesStatsRequest request;
|
||||
|
|
|
@ -62,6 +62,11 @@ public class TaskGroup implements ToXContentObject {
|
|||
return new Builder(taskInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builder for the Task Group
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Builder {
|
||||
private TaskInfo taskInfo;
|
||||
private List<Builder> childTasks;
|
||||
|
|
|
@ -112,6 +112,11 @@ public class TransportNodesUsageAction extends TransportNodesAction<
|
|||
return new NodeUsage(clusterService.localNode(), System.currentTimeMillis(), sinceTime, restUsage, aggsUsage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Node Usage Request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class NodeUsageRequest extends BaseNodeRequest {
|
||||
|
||||
NodesUsageRequest request;
|
||||
|
|
|
@ -60,6 +60,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<NodeView, Void> PARSER;
|
||||
static {
|
||||
|
|
|
@ -214,6 +214,11 @@ public class TransportClusterRerouteAction extends TransportMasterNodeAction<Clu
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Reroute Response Acknowledged the Cluster State Update
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class ClusterRerouteResponseAckedClusterStateUpdateTask extends AckedClusterStateUpdateTask<ClusterRerouteResponse> {
|
||||
|
||||
private final ClusterRerouteRequest request;
|
||||
|
|
|
@ -166,6 +166,11 @@ public class SnapshotIndexShardStatus extends BroadcastShardResponse implements
|
|||
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";
|
||||
|
|
|
@ -124,6 +124,11 @@ public class SnapshotIndexStatus implements Iterable<SnapshotIndexShardStatus>,
|
|||
return indexShards.values().iterator();
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Fields used for creating XContent and parsing
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String SHARDS = "shards";
|
||||
}
|
||||
|
|
|
@ -141,6 +141,11 @@ public class SnapshotShardsStats implements ToXContentObject {
|
|||
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";
|
||||
|
|
|
@ -170,6 +170,11 @@ public class SnapshotStats implements Writeable, ToXContentObject {
|
|||
out.writeVLong(totalSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Fields used for creating XContent and parsing
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String STATS = "stats";
|
||||
|
||||
|
|
|
@ -145,6 +145,11 @@ public class TransportNodesSnapshotsStatus extends TransportNodesAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends BaseNodesRequest<Request> {
|
||||
|
||||
private Snapshot[] snapshots;
|
||||
|
@ -171,6 +176,11 @@ public class TransportNodesSnapshotsStatus extends TransportNodesAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Node Snapshot Status
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class NodesSnapshotStatus extends BaseNodesResponse<NodeSnapshotStatus> {
|
||||
|
||||
public NodesSnapshotStatus(StreamInput in) throws IOException {
|
||||
|
@ -192,6 +202,11 @@ public class TransportNodesSnapshotsStatus extends TransportNodesAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Node Request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class NodeRequest extends BaseNodeRequest {
|
||||
|
||||
private final List<Snapshot> snapshots;
|
||||
|
@ -212,6 +227,11 @@ public class TransportNodesSnapshotsStatus extends TransportNodesAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Node Shapshot Status
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class NodeSnapshotStatus extends BaseNodeResponse {
|
||||
|
||||
private final Map<Snapshot, Map<ShardId, SnapshotIndexShardStatus>> status;
|
||||
|
|
|
@ -149,6 +149,11 @@ public class ClusterStatsIndices implements ToXContentFragment {
|
|||
return analysis;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Fields used for creating XContent and parsing
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String COUNT = "count";
|
||||
}
|
||||
|
@ -172,6 +177,11 @@ public class ClusterStatsIndices implements ToXContentFragment {
|
|||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Shard Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ShardStats implements ToXContentFragment {
|
||||
|
||||
int indices;
|
||||
|
@ -316,6 +326,11 @@ public class ClusterStatsIndices implements ToXContentFragment {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Fields used for creating XContent and parsing
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String SHARDS = "shards";
|
||||
static final String TOTAL = "total";
|
||||
|
|
|
@ -150,6 +150,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
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";
|
||||
|
@ -207,6 +212,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Counts
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Counts implements ToXContentFragment {
|
||||
static final String COORDINATING_ONLY = "coordinating_only";
|
||||
|
||||
|
@ -251,6 +261,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
return roles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Fields used for creating XContent and parsing
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String TOTAL = "total";
|
||||
}
|
||||
|
@ -265,6 +280,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Operating System Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class OsStats implements ToXContentFragment {
|
||||
final int availableProcessors;
|
||||
final int allocatedProcessors;
|
||||
|
@ -323,6 +343,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
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";
|
||||
|
@ -366,6 +391,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Process Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ProcessStats implements ToXContentFragment {
|
||||
|
||||
final int count;
|
||||
|
@ -436,6 +466,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
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";
|
||||
|
@ -459,6 +494,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner JVM Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class JvmStats implements ToXContentFragment {
|
||||
|
||||
private final ObjectIntHashMap<JvmVersion> versions;
|
||||
|
@ -532,6 +572,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
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";
|
||||
|
@ -577,6 +622,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner JVM Version
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class JvmVersion {
|
||||
String version;
|
||||
String vmName;
|
||||
|
@ -614,6 +664,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Network Types
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class NetworkTypes implements ToXContentFragment {
|
||||
|
||||
private final Map<String, AtomicInteger> transportTypes;
|
||||
|
@ -657,6 +712,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Discovery Types
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class DiscoveryTypes implements ToXContentFragment {
|
||||
|
||||
private final Map<String, AtomicInteger> discoveryTypes;
|
||||
|
@ -682,6 +742,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Packaging Types
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class PackagingTypes implements ToXContentFragment {
|
||||
|
||||
private final Map<String, AtomicInteger> packagingTypes;
|
||||
|
@ -714,6 +779,11 @@ public class ClusterStatsNodes implements ToXContentFragment {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Ingest Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class IngestStats implements ToXContentFragment {
|
||||
|
||||
final int pipelineCount;
|
||||
|
|
|
@ -211,6 +211,11 @@ public class TransportClusterStatsAction extends TransportNodesAction<
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Cluster Stats Node Request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ClusterStatsNodeRequest extends BaseNodeRequest {
|
||||
|
||||
ClusterStatsRequest request;
|
||||
|
|
|
@ -113,6 +113,11 @@ public class PendingClusterTasksResponse extends ActionResponse implements Itera
|
|||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Fields used for creating XContent and parsing
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
|
||||
static final String TASKS = "tasks";
|
||||
|
|
|
@ -99,6 +99,8 @@ public class IndicesAliasesRequest extends AcknowledgedRequest<IndicesAliasesReq
|
|||
|
||||
/**
|
||||
* 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 {
|
||||
|
||||
|
|
|
@ -76,6 +76,8 @@ public class AnalyzeAction extends ActionType<AnalyzeAction.Response> {
|
|||
/**
|
||||
* 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<Request> {
|
||||
|
||||
|
@ -303,6 +305,11 @@ public class AnalyzeAction extends ActionType<AnalyzeAction.Response> {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Response
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Response extends ActionResponse implements ToXContentObject {
|
||||
|
||||
private final DetailAnalyzeResponse detail;
|
||||
|
@ -405,6 +412,11 @@ public class AnalyzeAction extends ActionType<AnalyzeAction.Response> {
|
|||
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";
|
||||
|
||||
|
@ -412,6 +424,11 @@ public class AnalyzeAction extends ActionType<AnalyzeAction.Response> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Analyze Token
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class AnalyzeToken implements Writeable, ToXContentObject {
|
||||
private final String term;
|
||||
private final int startOffset;
|
||||
|
@ -545,6 +562,11 @@ public class AnalyzeAction extends ActionType<AnalyzeAction.Response> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Detail Analyze Response
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class DetailAnalyzeResponse implements Writeable, ToXContentFragment {
|
||||
|
||||
private final boolean customAnalyzer;
|
||||
|
@ -707,6 +729,11 @@ public class AnalyzeAction extends ActionType<AnalyzeAction.Response> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Analyze Token List
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class AnalyzeTokenList implements Writeable, ToXContentObject {
|
||||
private final String name;
|
||||
private final AnalyzeToken[] tokens;
|
||||
|
@ -799,6 +826,11 @@ public class AnalyzeAction extends ActionType<AnalyzeAction.Response> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner character filtered text
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class CharFilteredText implements Writeable, ToXContentObject {
|
||||
private final String name;
|
||||
private final String[] texts;
|
||||
|
|
|
@ -467,6 +467,11 @@ public class TransportAnalyzeAction extends TransportSingleShardAction<AnalyzeAc
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Token Counter
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class TokenCounter {
|
||||
private int tokenCount = 0;
|
||||
private int maxTokenCount;
|
||||
|
@ -488,6 +493,11 @@ public class TransportAnalyzeAction extends TransportSingleShardAction<AnalyzeAc
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Token List Creator
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class TokenListCreator {
|
||||
int lastPosition = -1;
|
||||
int lastOffset = 0;
|
||||
|
|
|
@ -105,6 +105,11 @@ public class CloseIndexResponse extends ShardsAcknowledgedResponse {
|
|||
return Strings.toString(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner index result
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class IndexResult implements Writeable, ToXContentFragment {
|
||||
|
||||
private final Index index;
|
||||
|
@ -200,6 +205,11 @@ public class CloseIndexResponse extends ShardsAcknowledgedResponse {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shard Result from Close Index Response
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ShardResult implements Writeable, ToXContentFragment {
|
||||
|
||||
private final int id;
|
||||
|
@ -253,6 +263,11 @@ public class CloseIndexResponse extends ShardsAcknowledgedResponse {
|
|||
return Strings.toString(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Failure if something goes wrong
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Failure extends DefaultShardOperationFailedException {
|
||||
|
||||
private @Nullable String nodeId;
|
||||
|
|
|
@ -191,6 +191,11 @@ public class TransportVerifyShardBeforeCloseAction extends TransportReplicationA
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shard Request for verifying shards before closing
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ShardRequest extends ReplicationRequest<ShardRequest> {
|
||||
|
||||
private final ClusterBlock clusterBlock;
|
||||
|
|
|
@ -74,6 +74,11 @@ public final class AutoCreateAction extends ActionType<CreateIndexResponse> {
|
|||
super(NAME, CreateIndexResponse::new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transport Action for Auto Create
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static final class TransportAction extends TransportMasterNodeAction<CreateIndexRequest, CreateIndexResponse> {
|
||||
|
||||
private final ActiveShardsObserver activeShardsObserver;
|
||||
|
|
|
@ -128,7 +128,13 @@ public class ListDanglingIndicesResponse extends BaseNodesResponse<NodeListDangl
|
|||
out.writeList(nodes);
|
||||
}
|
||||
|
||||
// visible for testing
|
||||
/**
|
||||
* Aggregates dangling index information
|
||||
*
|
||||
* NOTE: visible for testing
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class AggregatedDanglingIndexInfo {
|
||||
private final String indexUUID;
|
||||
private final String indexName;
|
||||
|
|
|
@ -72,6 +72,11 @@ public class CreateDataStreamAction extends ActionType<AcknowledgedResponse> {
|
|||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Request for Creating Data Stream
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends AcknowledgedRequest<Request> implements IndicesRequest {
|
||||
|
||||
private final String name;
|
||||
|
@ -124,6 +129,11 @@ public class CreateDataStreamAction extends ActionType<AcknowledgedResponse> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transport Action for Creating Data Stream
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class TransportAction extends TransportMasterNodeAction<Request, AcknowledgedResponse> {
|
||||
|
||||
private final MetadataCreateDataStreamService metadataCreateDataStreamService;
|
||||
|
|
|
@ -92,6 +92,11 @@ public class DataStreamsStatsAction extends ActionType<DataStreamsStatsAction.Re
|
|||
super(NAME, DataStreamsStatsAction.Response::new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Request for Data Streams Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends BroadcastRequest<Request> {
|
||||
public Request() {
|
||||
super((String[]) null);
|
||||
|
@ -102,6 +107,11 @@ public class DataStreamsStatsAction extends ActionType<DataStreamsStatsAction.Re
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Response for Data Streams Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Response extends BroadcastResponse {
|
||||
private final int dataStreamCount;
|
||||
private final int backingIndices;
|
||||
|
@ -203,6 +213,11 @@ public class DataStreamsStatsAction extends ActionType<DataStreamsStatsAction.Re
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The Data Streams Stats container
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class DataStreamStats implements ToXContentObject, Writeable {
|
||||
private final String dataStream;
|
||||
private final int backingIndices;
|
||||
|
@ -294,6 +309,11 @@ public class DataStreamsStatsAction extends ActionType<DataStreamsStatsAction.Re
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Per Shard Data Stream stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class DataStreamShardStats implements Writeable {
|
||||
private final ShardRouting shardRouting;
|
||||
private final StoreStats storeStats;
|
||||
|
@ -331,12 +351,22 @@ public class DataStreamsStatsAction extends ActionType<DataStreamsStatsAction.Re
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Aggregated data Stream stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class AggregatedStats {
|
||||
Set<String> backingIndices = new HashSet<>();
|
||||
long storageBytes = 0L;
|
||||
long maxTimestamp = 0L;
|
||||
}
|
||||
|
||||
/**
|
||||
* Transport Action for Data Stream Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class TransportAction extends TransportBroadcastByNodeAction<Request, Response, DataStreamShardStats> {
|
||||
|
||||
private final ClusterService clusterService;
|
||||
|
|
|
@ -89,6 +89,11 @@ public class DeleteDataStreamAction extends ActionType<AcknowledgedResponse> {
|
|||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Request for deleting data streams
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends MasterNodeRequest<Request> implements IndicesRequest.Replaceable {
|
||||
|
||||
private String[] names;
|
||||
|
@ -154,6 +159,11 @@ public class DeleteDataStreamAction extends ActionType<AcknowledgedResponse> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transport action for deleting data streams
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class TransportAction extends TransportMasterNodeAction<Request, AcknowledgedResponse> {
|
||||
|
||||
private final MetadataDeleteIndexService deleteIndexService;
|
||||
|
|
|
@ -87,6 +87,11 @@ public class GetDataStreamAction extends ActionType<GetDataStreamAction.Response
|
|||
super(NAME, Response::new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Request for getting data streams
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends MasterNodeReadRequest<Request> implements IndicesRequest.Replaceable {
|
||||
|
||||
private String[] names;
|
||||
|
@ -148,9 +153,19 @@ public class GetDataStreamAction extends ActionType<GetDataStreamAction.Response
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<DataStreamInfo> implements ToXContentObject {
|
||||
|
||||
public static final ParseField STATUS_FIELD = new ParseField("status");
|
||||
|
@ -267,6 +282,11 @@ public class GetDataStreamAction extends ActionType<GetDataStreamAction.Response
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transport Action for getting data streams
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class TransportAction extends TransportMasterNodeReadAction<Request, Response> {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(TransportAction.class);
|
||||
|
|
|
@ -125,6 +125,11 @@ public class TransportShardFlushAction extends TransportReplicationAction<ShardF
|
|||
// 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;
|
||||
|
||||
|
@ -146,6 +151,11 @@ public class TransportShardFlushAction extends TransportReplicationAction<ShardF
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre synced flush handler for the transport layer
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static final class PreSyncedFlushTransportHandler implements TransportRequestHandler<PreShardSyncedFlushRequest> {
|
||||
private final IndicesService indicesService;
|
||||
|
||||
|
|
|
@ -59,6 +59,11 @@ import java.util.Arrays;
|
|||
*/
|
||||
public class ForceMergeRequest extends BroadcastRequest<ForceMergeRequest> {
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
|
|
@ -175,6 +175,11 @@ public class GetFieldMappingsResponse extends ActionResponse implements ToXConte
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Metadata for field mappings for toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class FieldMappingMetadata implements ToXContentFragment {
|
||||
|
||||
private static final ParseField FULL_NAME = new ParseField("full_name");
|
||||
|
|
|
@ -95,6 +95,11 @@ public class AddIndexBlockResponse extends ShardsAcknowledgedResponse {
|
|||
return Strings.toString(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Result for adding a block
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class AddBlockResult implements Writeable, ToXContentFragment {
|
||||
|
||||
private final Index index;
|
||||
|
@ -190,6 +195,11 @@ public class AddIndexBlockResponse extends ShardsAcknowledgedResponse {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Per shard result for adding a block
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class AddBlockShardResult implements Writeable, ToXContentFragment {
|
||||
|
||||
private final int id;
|
||||
|
@ -244,6 +254,11 @@ public class AddIndexBlockResponse extends ShardsAcknowledgedResponse {
|
|||
return Strings.toString(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Contains failure information
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Failure extends DefaultShardOperationFailedException {
|
||||
|
||||
private @Nullable String nodeId;
|
||||
|
|
|
@ -170,6 +170,8 @@ public class TransportVerifyShardIndexBlockAction extends TransportReplicationAc
|
|||
* 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
|
||||
|
@ -183,6 +185,11 @@ public class TransportVerifyShardIndexBlockAction extends TransportReplicationAc
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Per shard request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ShardRequest extends ReplicationRequest<ShardRequest> {
|
||||
|
||||
private final ClusterBlock clusterBlock;
|
||||
|
|
|
@ -93,6 +93,11 @@ public class ResolveIndexAction extends ActionType<ResolveIndexAction.Response>
|
|||
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();
|
||||
|
@ -162,6 +167,11 @@ public class ResolveIndexAction extends ActionType<ResolveIndexAction.Response>
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Abstraction class for resolving an index
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ResolvedIndexAbstraction {
|
||||
|
||||
static final ParseField NAME_FIELD = new ParseField("name");
|
||||
|
@ -183,6 +193,11 @@ public class ResolveIndexAction extends ActionType<ResolveIndexAction.Response>
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The resolved index
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ResolvedIndex extends ResolvedIndexAbstraction implements Writeable, ToXContentObject {
|
||||
|
||||
static final ParseField ALIASES_FIELD = new ParseField("aliases");
|
||||
|
@ -266,6 +281,11 @@ public class ResolveIndexAction extends ActionType<ResolveIndexAction.Response>
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The resolved index alias
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ResolvedAlias extends ResolvedIndexAbstraction implements Writeable, ToXContentObject {
|
||||
|
||||
static final ParseField INDICES_FIELD = new ParseField("indices");
|
||||
|
@ -323,6 +343,11 @@ public class ResolveIndexAction extends ActionType<ResolveIndexAction.Response>
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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");
|
||||
|
@ -390,6 +415,11 @@ public class ResolveIndexAction extends ActionType<ResolveIndexAction.Response>
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Response for resolving an index
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Response extends ActionResponse implements ToXContentObject {
|
||||
|
||||
static final ParseField INDICES_FIELD = new ParseField("indices");
|
||||
|
@ -455,6 +485,11 @@ public class ResolveIndexAction extends ActionType<ResolveIndexAction.Response>
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transport action for resolving an index
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class TransportAction extends HandledTransportAction<Request, Response> {
|
||||
|
||||
private final ThreadPool threadPool;
|
||||
|
|
|
@ -95,6 +95,8 @@ public abstract class Condition<T> implements NamedWriteable, ToXContentFragment
|
|||
|
||||
/**
|
||||
* Holder for index stats used to evaluate conditions
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Stats {
|
||||
public final long numDocs;
|
||||
|
@ -110,6 +112,8 @@ public abstract class Condition<T> implements NamedWriteable, ToXContentFragment
|
|||
|
||||
/**
|
||||
* Holder for evaluated condition result
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Result {
|
||||
public final Condition<?> condition;
|
||||
|
|
|
@ -94,6 +94,11 @@ public class MetadataRolloverService {
|
|||
this.indexNameExpressionResolver = indexNameExpressionResolver;
|
||||
}
|
||||
|
||||
/**
|
||||
* Result for rollover request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class RolloverResult {
|
||||
public final String rolloverIndexName;
|
||||
public final String sourceIndexName;
|
||||
|
|
|
@ -212,6 +212,11 @@ public class IndicesSegmentResponse extends BroadcastResponse {
|
|||
builder.endObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields for parsing and toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String INDICES = "indices";
|
||||
static final String SHARDS = "shards";
|
||||
|
|
|
@ -63,6 +63,8 @@ public class IndicesShardStoresResponse extends ActionResponse implements ToXCon
|
|||
|
||||
/**
|
||||
* Shard store information from a node
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class StoreStatus implements Writeable, ToXContentFragment, Comparable<StoreStatus> {
|
||||
private final DiscoveryNode node;
|
||||
|
@ -233,6 +235,8 @@ public class IndicesShardStoresResponse extends ActionResponse implements ToXCon
|
|||
|
||||
/**
|
||||
* Single node failure while retrieving shard store information
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Failure extends DefaultShardOperationFailedException {
|
||||
private String nodeId;
|
||||
|
@ -369,6 +373,11 @@ public class IndicesShardStoresResponse extends ActionResponse implements ToXCon
|
|||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields for parsing and toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String INDICES = "indices";
|
||||
static final String SHARDS = "shards";
|
||||
|
|
|
@ -162,6 +162,11 @@ public class TransportIndicesShardStoresAction extends TransportMasterNodeReadAc
|
|||
.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;
|
||||
|
@ -195,6 +200,11 @@ public class TransportIndicesShardStoresAction extends TransportMasterNodeReadAc
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal async fetch
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private class InternalAsyncFetch extends AsyncShardFetch<NodeGatewayStartedShards> {
|
||||
|
||||
InternalAsyncFetch(
|
||||
|
@ -309,6 +319,11 @@ public class TransportIndicesShardStoresAction extends TransportMasterNodeReadAc
|
|||
// no-op
|
||||
}
|
||||
|
||||
/**
|
||||
* Response for shard stores action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class Response {
|
||||
private final ShardId shardId;
|
||||
private final List<NodeGatewayStartedShards> responses;
|
||||
|
|
|
@ -132,6 +132,11 @@ public class IndexStats implements Iterable<IndexShardStats> {
|
|||
return stats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Builder for Index Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class IndexStatsBuilder {
|
||||
private final String indexName;
|
||||
private final String uuid;
|
||||
|
|
|
@ -213,6 +213,11 @@ public class IndicesStatsResponse extends BroadcastResponse {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields for parsing and toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String INDICES = "indices";
|
||||
static final String SHARDS = "shards";
|
||||
|
|
|
@ -177,6 +177,11 @@ public class ShardStats implements Writeable, ToXContentFragment {
|
|||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields for parsing and toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String ROUTING = "routing";
|
||||
static final String STATE = "state";
|
||||
|
|
|
@ -57,6 +57,11 @@ public class DeleteComponentTemplateAction extends ActionType<AcknowledgedRespon
|
|||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Request class for deleting component template
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends MasterNodeRequest<Request> {
|
||||
|
||||
private String name;
|
||||
|
|
|
@ -58,6 +58,11 @@ public class DeleteComposableIndexTemplateAction extends ActionType<Acknowledged
|
|||
super(NAME, AcknowledgedResponse::new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner Request class for deleting composable index template
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends MasterNodeRequest<Request> {
|
||||
|
||||
private String name;
|
||||
|
|
|
@ -64,6 +64,8 @@ public class GetComponentTemplateAction extends ActionType<GetComponentTemplateA
|
|||
|
||||
/**
|
||||
* Request that to retrieve one or more component templates
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends MasterNodeReadRequest<Request> {
|
||||
|
||||
|
@ -108,6 +110,11 @@ public class GetComponentTemplateAction extends ActionType<GetComponentTemplateA
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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");
|
||||
|
|
|
@ -64,6 +64,8 @@ public class GetComposableIndexTemplateAction extends ActionType<GetComposableIn
|
|||
|
||||
/**
|
||||
* Request that to retrieve one or more index templates
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends MasterNodeReadRequest<Request> {
|
||||
|
||||
|
@ -125,6 +127,11 @@ public class GetComposableIndexTemplateAction extends ActionType<GetComposableIn
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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");
|
||||
|
|
|
@ -59,6 +59,11 @@ public class SimulateTemplateAction extends ActionType<SimulateIndexTemplateResp
|
|||
super(NAME, SimulateIndexTemplateResponse::new);
|
||||
}
|
||||
|
||||
/**
|
||||
* Request for simulating a template action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends MasterNodeReadRequest<Request> {
|
||||
|
||||
@Nullable
|
||||
|
|
|
@ -62,6 +62,8 @@ public class PutComponentTemplateAction extends ActionType<AcknowledgedResponse>
|
|||
|
||||
/**
|
||||
* A request for putting a single component template into the cluster state
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends MasterNodeRequest<Request> {
|
||||
private final String name;
|
||||
|
|
|
@ -67,6 +67,8 @@ public class PutComposableIndexTemplateAction extends ActionType<AcknowledgedRes
|
|||
|
||||
/**
|
||||
* A request for putting a single index template into the cluster state
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Request extends MasterNodeRequest<Request> implements IndicesRequest {
|
||||
private final String name;
|
||||
|
|
|
@ -205,6 +205,11 @@ public class UpgradeStatusResponse extends BroadcastResponse {
|
|||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields for parsing and toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String INDICES = "indices";
|
||||
static final String SHARDS = "shards";
|
||||
|
|
|
@ -49,6 +49,11 @@ import java.io.IOException;
|
|||
*/
|
||||
public class UpgradeRequest extends BroadcastRequest<UpgradeRequest> {
|
||||
|
||||
/**
|
||||
* Default config for Upgrade Requests
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static final class Defaults {
|
||||
public static final boolean UPGRADE_ONLY_ANCIENT_SEGMENTS = false;
|
||||
}
|
||||
|
|
|
@ -119,6 +119,11 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
|
|||
return delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* Concrete No Back Off Policy
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class NoBackoff extends BackoffPolicy {
|
||||
@Override
|
||||
public Iterator<TimeValue> iterator() {
|
||||
|
@ -136,6 +141,11 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Concrete Exponential Back Off Policy
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class ExponentialBackoff extends BackoffPolicy {
|
||||
private final int start;
|
||||
|
||||
|
@ -154,6 +164,11 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Concrete Exponential Back Off Iterator
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class ExponentialBackoffIterator implements Iterator<TimeValue> {
|
||||
private final int numberOfElements;
|
||||
|
||||
|
@ -182,6 +197,11 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Concrete Constant Back Off Policy
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static final class ConstantBackoff extends BackoffPolicy {
|
||||
private final TimeValue delay;
|
||||
|
||||
|
@ -199,6 +219,11 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Concrete Constant Back Off Iterator
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static final class ConstantBackoffIterator implements Iterator<TimeValue> {
|
||||
private final TimeValue delay;
|
||||
private final int numberOfElements;
|
||||
|
@ -224,6 +249,11 @@ public abstract class BackoffPolicy implements Iterable<TimeValue> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 abstract class BackoffPolicy implements Iterable<TimeValue> {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Concrete Wrapped Back Off Iterator
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static final class WrappedBackoffIterator implements Iterator<TimeValue> {
|
||||
private final Iterator<TimeValue> delegate;
|
||||
private final Runnable onBackoff;
|
||||
|
|
|
@ -178,6 +178,8 @@ public class BulkItemResponse implements Writeable, StatusToXContentObject {
|
|||
|
||||
/**
|
||||
* Represents a failure.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Failure implements Writeable, ToXContentFragment {
|
||||
public static final String INDEX_FIELD = "index";
|
||||
|
|
|
@ -94,6 +94,8 @@ public class BulkProcessor implements Closeable {
|
|||
|
||||
/**
|
||||
* A builder used to create a build an instance of a bulk processor.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Builder {
|
||||
|
||||
|
@ -545,6 +547,11 @@ public class BulkProcessor implements Closeable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush for bulk processor
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class Flush implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
|
@ -94,6 +94,11 @@ public class Retry {
|
|||
return future;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retry handler
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class RetryHandler implements ActionListener<BulkResponse> {
|
||||
private static final RestStatus RETRY_STATUS = RestStatus.TOO_MANY_REQUESTS;
|
||||
private static final Logger logger = LogManager.getLogger(RetryHandler.class);
|
||||
|
|
|
@ -483,7 +483,9 @@ public class TransportBulkAction extends HandledTransportAction<BulkRequest, Bul
|
|||
/**
|
||||
* 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<BulkResponse> {
|
||||
private final Task task;
|
||||
private BulkRequest bulkRequest; // set to null once all requests are sent out
|
||||
|
@ -772,6 +774,11 @@ public class TransportBulkAction extends HandledTransportAction<BulkRequest, Bul
|
|||
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 class TransportBulkAction extends HandledTransportAction<BulkRequest, Bul
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* A modifier for a bulk request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class BulkRequestModifier implements Iterator<DocWriteRequest<?>> {
|
||||
|
||||
final BulkRequest bulkRequest;
|
||||
|
|
|
@ -111,6 +111,8 @@ public class DeleteResponse extends DocWriteResponse {
|
|||
* 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 {
|
||||
|
||||
|
|
|
@ -298,6 +298,11 @@ public class FieldCapabilities implements Writeable, ToXContentObject {
|
|||
return Strings.toString(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builder for field capabilities
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class Builder {
|
||||
private String name;
|
||||
private String type;
|
||||
|
@ -387,6 +392,11 @@ public class FieldCapabilities implements Writeable, ToXContentObject {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner index capabilities
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class IndexCaps {
|
||||
final String name;
|
||||
final boolean isSearchable;
|
||||
|
|
|
@ -217,6 +217,8 @@ public class TransportFieldCapabilitiesIndexAction extends HandledTransportActio
|
|||
* 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 class TransportFieldCapabilitiesIndexAction extends HandledTransportActio
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shard transport handler for field capabilities index action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private class ShardTransportHandler implements TransportRequestHandler<FieldCapabilitiesIndexRequest> {
|
||||
@Override
|
||||
public void messageReceived(final FieldCapabilitiesIndexRequest request, final TransportChannel channel, Task task)
|
||||
|
|
|
@ -90,6 +90,8 @@ public class MultiGetRequest extends ActionRequest
|
|||
|
||||
/**
|
||||
* A single get item.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Item implements Writeable, IndicesRequest, ToXContentObject {
|
||||
|
||||
|
|
|
@ -66,6 +66,8 @@ public class MultiGetResponse extends ActionResponse implements Iterable<MultiGe
|
|||
|
||||
/**
|
||||
* Represents a failure.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Failure implements Writeable, ToXContentObject {
|
||||
|
||||
|
|
|
@ -114,6 +114,8 @@ public class IndexResponse extends DocWriteResponse {
|
|||
* Builder class for {@link IndexResponse}. This builder is usually used during xcontent parsing to
|
||||
* temporarily store the parsed values, then the {@link Builder#build()} method is called to
|
||||
* instantiate the {@link IndexResponse}.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Builder extends DocWriteResponse.Builder {
|
||||
@Override
|
||||
|
|
|
@ -130,6 +130,11 @@ public class SimulatePipelineRequest extends ActionRequest implements ToXContent
|
|||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields for parsing and toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static final class Fields {
|
||||
static final String PIPELINE = "pipeline";
|
||||
static final String DOCS = "docs";
|
||||
|
|
|
@ -178,6 +178,11 @@ public class SimulatePipelineResponse extends ActionResponse implements ToXConte
|
|||
return PARSER.apply(parser, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields for parsing and toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String DOCUMENTS = "docs";
|
||||
}
|
||||
|
|
|
@ -43,7 +43,8 @@ import java.util.Objects;
|
|||
|
||||
/**
|
||||
* Represents a batch of operations sent from the primary to its replicas during the primary-replica resync.
|
||||
* @opensearch.internal
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class ResyncReplicationRequest extends ReplicatedWriteRequest<ResyncReplicationRequest> {
|
||||
|
||||
|
|
|
@ -258,6 +258,8 @@ public class TransportResyncReplicationAction extends TransportWriteAction<
|
|||
* 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 {
|
||||
|
||||
|
|
|
@ -751,6 +751,11 @@ abstract class AbstractSearchAsyncAction<Result extends SearchPhaseResult> exten
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Pending Executions
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static final class PendingExecutions {
|
||||
private final int permits;
|
||||
private int permitsTaken = 0;
|
||||
|
|
|
@ -204,6 +204,11 @@ final class CanMatchPreFilterSearchPhase extends AbstractSearchAsyncAction<CanMa
|
|||
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<CanMatchResponse> {
|
||||
private final FixedBitSet possibleMatches;
|
||||
private final MinAndMax<?>[] minAndMaxes;
|
||||
|
|
|
@ -77,6 +77,8 @@ public class MultiSearchResponse extends ActionResponse implements Iterable<Mult
|
|||
|
||||
/**
|
||||
* A search response item, holding the actual search response, or an error message if it failed.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Item implements Writeable {
|
||||
private final SearchResponse response;
|
||||
|
@ -247,6 +249,11 @@ public class MultiSearchResponse extends ActionResponse implements Iterable<Mult
|
|||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields for parsing and toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String RESPONSES = "responses";
|
||||
static final String STATUS = "status";
|
||||
|
|
|
@ -242,6 +242,11 @@ public class QueryPhaseResultConsumer extends ArraySearchPhaseResults<SearchPhas
|
|||
return pendingMerges.numReducePhases;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing pending merges
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private class PendingMerges implements Releasable {
|
||||
private final int batchReduceSize;
|
||||
private final List<QuerySearchResult> buffer = new ArrayList<>();
|
||||
|
@ -498,6 +503,11 @@ public class QueryPhaseResultConsumer extends ArraySearchPhaseResults<SearchPhas
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A single merge result
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class MergeResult {
|
||||
private final List<SearchShard> processedShards;
|
||||
private final TopDocs reducedTopDocs;
|
||||
|
@ -517,6 +527,11 @@ public class QueryPhaseResultConsumer extends ArraySearchPhaseResults<SearchPhas
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A single merge task
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class MergeTask {
|
||||
private final List<SearchShard> emptyResults;
|
||||
private QuerySearchResult[] buffer;
|
||||
|
|
|
@ -613,6 +613,11 @@ public final class SearchPhaseController {
|
|||
: 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 @@ public final class SearchPhaseController {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The top docs statistics
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class TopDocsStats {
|
||||
final int trackTotalHitsUpTo;
|
||||
long totalHits;
|
||||
|
@ -778,6 +788,11 @@ public final class SearchPhaseController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -475,6 +475,8 @@ public class SearchResponse extends ActionResponse implements StatusToXContentOb
|
|||
/**
|
||||
* 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 {
|
||||
|
||||
|
|
|
@ -410,6 +410,11 @@ final class SearchResponseMerger {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds a field search hit and doc
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static final class FieldDocAndSearchHit extends FieldDoc {
|
||||
private final SearchHit searchHit;
|
||||
|
||||
|
@ -426,6 +431,8 @@ final class SearchResponseMerger {
|
|||
* (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<ShardIdAndClusterAlias> {
|
||||
private final ShardId shardId;
|
||||
|
|
|
@ -309,6 +309,11 @@ public class SearchTransportService {
|
|||
return new HashMap<>(clientConnections);
|
||||
}
|
||||
|
||||
/**
|
||||
* A scroll free context request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class ScrollFreeContextRequest extends TransportRequest {
|
||||
private ShardSearchContextId contextId;
|
||||
|
||||
|
@ -333,6 +338,11 @@ public class SearchTransportService {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* A search free context request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class SearchFreeContextRequest extends ScrollFreeContextRequest implements IndicesRequest {
|
||||
private OriginalIndices originalIndices;
|
||||
|
||||
|
@ -370,6 +380,11 @@ public class SearchTransportService {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* A search free context response
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class SearchFreeContextResponse extends TransportResponse {
|
||||
|
||||
private boolean freed;
|
||||
|
@ -564,6 +579,11 @@ public class SearchTransportService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A handler that counts connections
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
final class ConnectionCountingHandler<Response extends TransportResponse> extends ActionListenerResponseHandler<Response> {
|
||||
private final Map<String, Long> clientConnections;
|
||||
private final String nodeId;
|
||||
|
|
|
@ -220,6 +220,11 @@ public class TransportMultiSearchAction extends HandledTransportAction<MultiSear
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Slots a search request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class SearchRequestSlot {
|
||||
|
||||
final SearchRequest request;
|
||||
|
|
|
@ -232,6 +232,8 @@ public class TransportSearchAction extends HandledTransportAction<SearchRequest,
|
|||
* 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 @@ public class TransportSearchAction extends HandledTransportAction<SearchRequest,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* xcluster search listener
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
abstract static class CCSActionListener<Response, FinalResponse> implements ActionListener<Response> {
|
||||
private final String clusterAlias;
|
||||
private final boolean skipUnavailable;
|
||||
|
|
|
@ -144,6 +144,11 @@ public final class AutoCreateIndex {
|
|||
this.autoCreate = autoCreate;
|
||||
}
|
||||
|
||||
/**
|
||||
* An auto create object
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static class AutoCreate {
|
||||
private final boolean autoCreateIndex;
|
||||
private final List<Tuple<String, Boolean>> expressions;
|
||||
|
|
|
@ -90,6 +90,11 @@ public abstract class HandledTransportAction<Request extends ActionRequest, Resp
|
|||
transportService.registerRequestHandler(actionName, executor, false, canTripCircuitBreaker, requestReader, new TransportHandler());
|
||||
}
|
||||
|
||||
/**
|
||||
* Inner transport handler
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class TransportHandler implements TransportRequestHandler<Request> {
|
||||
@Override
|
||||
public final void messageReceived(final Request request, final TransportChannel channel, Task task) {
|
||||
|
|
|
@ -96,6 +96,11 @@ public class ListenerTimeouts {
|
|||
return wrappedListener;
|
||||
}
|
||||
|
||||
/**
|
||||
* Listener that can time out
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class TimeoutableListener<Response> implements ActionListener<Response>, Runnable {
|
||||
|
||||
private final AtomicBoolean isDone = new AtomicBoolean(false);
|
||||
|
|
|
@ -104,6 +104,8 @@ public class TimeoutTaskCancellationUtility {
|
|||
* 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<Response> implements ActionListener<Response>, Runnable {
|
||||
|
||||
|
|
|
@ -176,6 +176,11 @@ public abstract class TransportAction<Request extends ActionRequest, Response ex
|
|||
|
||||
protected abstract void doExecute(Task task, Request request, ActionListener<Response> listener);
|
||||
|
||||
/**
|
||||
* A request filter chain
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class RequestFilterChain<Request extends ActionRequest, Response extends ActionResponse>
|
||||
implements
|
||||
ActionFilterChain<Request, Response> {
|
||||
|
@ -210,6 +215,8 @@ public abstract class TransportAction<Request extends ActionRequest, Response ex
|
|||
|
||||
/**
|
||||
* Wrapper for an action listener that stores the result at the end of the execution
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class TaskResultStoringActionListener<Response extends ActionResponse> implements ActionListener<Response> {
|
||||
private final ActionListener<Response> delegate;
|
||||
|
|
|
@ -124,6 +124,11 @@ public abstract class TransportBroadcastAction<
|
|||
|
||||
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 @@ public abstract class TransportBroadcastAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A shard transport handler
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class ShardTransportHandler implements TransportRequestHandler<ShardRequest> {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -273,6 +273,11 @@ public abstract class TransportBroadcastByNodeAction<
|
|||
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 @@ public abstract class TransportBroadcastByNodeAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Broadcast by a node's transport request handler
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class BroadcastByNodeTransportRequestHandler implements TransportRequestHandler<NodeRequest> {
|
||||
@Override
|
||||
public void messageReceived(final NodeRequest request, TransportChannel channel, Task task) throws Exception {
|
||||
|
@ -522,6 +532,11 @@ public abstract class TransportBroadcastByNodeAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A node request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodeRequest extends TransportRequest implements IndicesRequest {
|
||||
private String nodeId;
|
||||
|
||||
|
@ -569,6 +584,11 @@ public abstract class TransportBroadcastByNodeAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A node response
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class NodeResponse extends TransportResponse {
|
||||
protected String nodeId;
|
||||
protected int totalShards;
|
||||
|
@ -633,6 +653,8 @@ public abstract class TransportBroadcastByNodeAction<
|
|||
/**
|
||||
* 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();
|
||||
|
|
|
@ -142,6 +142,11 @@ public abstract class TransportMasterNodeAction<Request extends MasterNodeReques
|
|||
new AsyncSingleAction(task, request, listener).doStart(state);
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronous single action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class AsyncSingleAction {
|
||||
|
||||
private final ActionListener<Response> listener;
|
||||
|
|
|
@ -216,6 +216,11 @@ public abstract class TransportNodesAction<
|
|||
return transportNodeAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronous action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class AsyncAction {
|
||||
|
||||
private final NodesRequest request;
|
||||
|
@ -311,6 +316,11 @@ public abstract class TransportNodesAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A node transport handler
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class NodeTransportHandler implements TransportRequestHandler<NodeRequest> {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -596,6 +596,11 @@ public class ReplicationOperation<
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
|
|
@ -85,6 +85,11 @@ public class ReplicationResponse extends ActionResponse {
|
|||
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 class ReplicationResponse extends ActionResponse {
|
|||
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";
|
||||
|
|
|
@ -75,6 +75,11 @@ public class ReplicationTask extends Task {
|
|||
return new Status(phase);
|
||||
}
|
||||
|
||||
/**
|
||||
* Status of the replication task
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class Status implements Task.Status {
|
||||
public static final String NAME = "replication";
|
||||
|
||||
|
|
|
@ -386,6 +386,11 @@ public abstract class TransportReplicationAction<
|
|||
return () -> {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronous primary action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class AsyncPrimaryAction extends AbstractRunnable {
|
||||
private final ActionListener<Response> onCompletionListener;
|
||||
private final ReplicationTask replicationTask;
|
||||
|
@ -554,6 +559,11 @@ public abstract class TransportReplicationAction<
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* The Primary Result
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class PrimaryResult<ReplicaRequest extends ReplicationRequest<ReplicaRequest>, Response extends ReplicationResponse>
|
||||
implements
|
||||
ReplicationOperation.PrimaryResult<ReplicaRequest> {
|
||||
|
@ -603,6 +613,11 @@ public abstract class TransportReplicationAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The replica result
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class ReplicaResult {
|
||||
final Exception finalFailure;
|
||||
|
||||
|
@ -645,6 +660,11 @@ public abstract class TransportReplicationAction<
|
|||
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 abstract class TransportReplicationAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronous replica action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private final class AsyncReplicaAction extends AbstractRunnable implements ActionListener<Releasable> {
|
||||
private final ActionListener<ReplicaResponse> onCompletionListener;
|
||||
private final IndexShard replica;
|
||||
|
@ -799,6 +824,8 @@ public abstract class TransportReplicationAction<
|
|||
* 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<Response> listener;
|
||||
|
@ -1133,6 +1160,11 @@ public abstract class TransportReplicationAction<
|
|||
replica.acquireReplicaOperationPermit(primaryTerm, globalCheckpoint, maxSeqNoOfUpdatesOrDeletes, onAcquired, executor, request);
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary shard reference
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class PrimaryShardReference
|
||||
implements
|
||||
Releasable,
|
||||
|
@ -1225,6 +1257,11 @@ public abstract class TransportReplicationAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 abstract class TransportReplicationAction<
|
|||
* 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<ReplicaRequest> {
|
||||
|
||||
|
@ -1338,7 +1377,11 @@ public abstract class TransportReplicationAction<
|
|||
}
|
||||
}
|
||||
|
||||
/** 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<R extends TransportRequest> extends TransportRequest {
|
||||
|
||||
/** {@link AllocationId#getId()} of the shard this request is sent to **/
|
||||
|
@ -1442,6 +1485,11 @@ public abstract class TransportReplicationAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal request for concrete replica
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
protected static final class ConcreteReplicaRequest<R extends TransportRequest> extends ConcreteShardRequest<R> {
|
||||
|
||||
private final long globalCheckpoint;
|
||||
|
|
|
@ -267,6 +267,8 @@ public abstract class TransportWriteAction<
|
|||
* Result of taking the action on the primary.
|
||||
*
|
||||
* NOTE: public for testing
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class WritePrimaryResult<
|
||||
ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>,
|
||||
|
@ -322,6 +324,8 @@ public abstract class TransportWriteAction<
|
|||
|
||||
/**
|
||||
* Result of taking the action on the replica.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static class WriteReplicaResult<ReplicaRequest extends ReplicatedWriteRequest<ReplicaRequest>> extends ReplicaResult {
|
||||
public final Location location;
|
||||
|
@ -394,6 +398,8 @@ public abstract class TransportWriteAction<
|
|||
* 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 @@ public abstract class TransportWriteAction<
|
|||
*
|
||||
* This extends {@code TransportReplicationAction.ReplicasProxy} to do the
|
||||
* failing and stale-ing.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class WriteActionReplicasProxy extends ReplicasProxy {
|
||||
|
||||
|
|
|
@ -140,6 +140,11 @@ public abstract class TransportInstanceSingleOperationAction<
|
|||
*/
|
||||
protected abstract ShardIterator shards(ClusterState clusterState, Request request);
|
||||
|
||||
/**
|
||||
* Asynchronous single action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class AsyncSingleAction {
|
||||
|
||||
private final ActionListener<Response> listener;
|
||||
|
@ -291,6 +296,11 @@ public abstract class TransportInstanceSingleOperationAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transport handler per shard
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private class ShardTransportHandler implements TransportRequestHandler<Request> {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -153,6 +153,11 @@ public abstract class TransportSingleShardAction<Request extends SingleShardRequ
|
|||
@Nullable
|
||||
protected abstract ShardsIterator shards(ClusterState state, InternalRequest request);
|
||||
|
||||
/**
|
||||
* Asynchronous single action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class AsyncSingleAction {
|
||||
|
||||
private final ActionListener<Response> listener;
|
||||
|
@ -299,6 +304,11 @@ public abstract class TransportSingleShardAction<Request extends SingleShardRequ
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal transport handler
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private class TransportHandler implements TransportRequestHandler<Request> {
|
||||
|
||||
@Override
|
||||
|
@ -308,6 +318,11 @@ public abstract class TransportSingleShardAction<Request extends SingleShardRequ
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shard level transport handler
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private class ShardTransportHandler implements TransportRequestHandler<Request> {
|
||||
|
||||
@Override
|
||||
|
@ -321,6 +336,8 @@ public abstract class TransportSingleShardAction<Request extends SingleShardRequ
|
|||
|
||||
/**
|
||||
* Internal request class that gets built on each node. Holds the original request plus additional info.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
protected class InternalRequest {
|
||||
final Request request;
|
||||
|
|
|
@ -237,6 +237,11 @@ public abstract class TransportTasksAction<
|
|||
*/
|
||||
protected abstract void taskOperation(TasksRequest request, OperationTask task, ActionListener<TaskResponse> listener);
|
||||
|
||||
/**
|
||||
* Asynchronous single action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private class AsyncAction {
|
||||
|
||||
private final TasksRequest request;
|
||||
|
@ -353,6 +358,11 @@ public abstract class TransportTasksAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Node level transport handler
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
class NodeTransportHandler implements TransportRequestHandler<NodeTaskRequest> {
|
||||
|
||||
@Override
|
||||
|
@ -368,6 +378,11 @@ public abstract class TransportTasksAction<
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Node level task request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private class NodeTaskRequest extends TransportRequest {
|
||||
private TasksRequest tasksRequest;
|
||||
|
||||
|
@ -389,6 +404,11 @@ public abstract class TransportTasksAction<
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Node level task response
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private class NodeTasksResponse extends TransportResponse {
|
||||
protected String nodeId;
|
||||
protected List<TaskOperationFailure> exceptions;
|
||||
|
|
|
@ -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 class MultiTermVectorsResponse extends ActionResponse implements Iterable
|
|||
return builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fields used for parsing and toXContent
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
static final class Fields {
|
||||
static final String DOCS = "docs";
|
||||
static final String _INDEX = "_index";
|
||||
|
|
|
@ -204,6 +204,11 @@ public final class TermVectorsFields extends Fields {
|
|||
return fieldMap.size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal term vector
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private final class TermVector extends Terms {
|
||||
|
||||
private final StreamInput perFieldTermVectorInput;
|
||||
|
@ -420,6 +425,11 @@ public final class TermVectorsFields extends Fields {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal postings enumerator for term vectors
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private final class TermVectorPostingsEnum extends PostingsEnum {
|
||||
private boolean hasPositions;
|
||||
private boolean hasOffsets;
|
||||
|
|
|
@ -176,6 +176,11 @@ public class TermVectorsFilter {
|
|||
this.maxWordLength = maxWordLength;
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal score term
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static final class ScoreTerm {
|
||||
public String field;
|
||||
public String word;
|
||||
|
@ -295,6 +300,11 @@ public class TermVectorsFilter {
|
|||
return freq * similarity.idf(docFreq, numDocs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Internal queue of score terms
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
private static class ScoreTermsQueue extends org.apache.lucene.util.PriorityQueue<ScoreTerm> {
|
||||
private final int limit;
|
||||
|
||||
|
|
|
@ -115,6 +115,11 @@ public class TermVectorsRequest extends SingleShardRequest<TermVectorsRequest> i
|
|||
|
||||
private FilterSettings filterSettings;
|
||||
|
||||
/**
|
||||
* Internal filter settings
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public static final class FilterSettings {
|
||||
public Integer maxNumTerms;
|
||||
public Integer minTermFreq;
|
||||
|
|
|
@ -66,6 +66,11 @@ import java.util.Set;
|
|||
*/
|
||||
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";
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue