mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-16 18:04:52 +00:00
[Javadocs] add to o.o.action.admin (#3155)
Adds javadocs to classes in package o.o.action.admin. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
parent
c13b679aad
commit
ad1c8038b0
@ -180,7 +180,7 @@ configure(project(":server")) {
|
||||
project.tasks.withType(MissingJavadocTask) {
|
||||
isExcluded = true
|
||||
// TODO: reenable after fixing missing javadocs
|
||||
// javadocMissingLevel = "class"
|
||||
javadocMissingLevel = "class"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,8 @@ import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* ActionType for explaining shard allocation for a shard in the cluster
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterAllocationExplainAction extends ActionType<ClusterAllocationExplainResponse> {
|
||||
|
||||
|
@ -47,6 +47,8 @@ import static org.opensearch.action.ValidateActions.addValidationError;
|
||||
|
||||
/**
|
||||
* A request to explain the allocation of a shard in the cluster
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterAllocationExplainRequest extends MasterNodeRequest<ClusterAllocationExplainRequest> {
|
||||
|
||||
|
@ -37,6 +37,8 @@ import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Builder for requests to explain the allocation of a shard in the cluster
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterAllocationExplainRequestBuilder extends MasterNodeOperationRequestBuilder<
|
||||
ClusterAllocationExplainRequest,
|
||||
|
@ -40,6 +40,8 @@ import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Explanation response for a shard in the cluster
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterAllocationExplainResponse extends ActionResponse {
|
||||
|
||||
|
@ -57,6 +57,8 @@ import static org.opensearch.cluster.routing.allocation.AbstractAllocationDecisi
|
||||
* A {@code ClusterAllocationExplanation} is an explanation of why a shard is unassigned,
|
||||
* or if it is not unassigned, then which nodes it could possibly be relocated to.
|
||||
* It is an immutable class.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class ClusterAllocationExplanation implements ToXContentObject, Writeable {
|
||||
|
||||
|
@ -65,6 +65,8 @@ import java.util.List;
|
||||
/**
|
||||
* The {@code TransportClusterAllocationExplainAction} is responsible for actually executing the explanation of a shard's allocation on the
|
||||
* cluster-manager node in the cluster.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportClusterAllocationExplainAction extends TransportMasterNodeAction<
|
||||
ClusterAllocationExplainRequest,
|
||||
|
@ -33,7 +33,12 @@ package org.opensearch.action.admin.cluster.configuration;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
public class AddVotingConfigExclusionsAction extends ActionType<AddVotingConfigExclusionsResponse> {
|
||||
/**
|
||||
* Transport endpoint for adding exclusions to voting config
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class AddVotingConfigExclusionsAction extends ActionType<AddVotingConfigExclusionsResponse> {
|
||||
public static final AddVotingConfigExclusionsAction INSTANCE = new AddVotingConfigExclusionsAction();
|
||||
public static final String NAME = "cluster:admin/voting_config/add_exclusions";
|
||||
|
||||
|
@ -56,6 +56,8 @@ import java.util.stream.StreamSupport;
|
||||
/**
|
||||
* A request to add voting config exclusions for certain cluster-manager-eligible nodes, and wait for these nodes to be removed from the voting
|
||||
* configuration.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class AddVotingConfigExclusionsRequest extends MasterNodeRequest<AddVotingConfigExclusionsRequest> {
|
||||
public static final String DEPRECATION_MESSAGE = "nodeDescription is deprecated and will be removed, use nodeIds or nodeNames instead";
|
||||
|
@ -42,6 +42,8 @@ import java.io.IOException;
|
||||
/**
|
||||
* A response to {@link AddVotingConfigExclusionsRequest} indicating that voting config exclusions have been added for the requested nodes
|
||||
* and these nodes have been removed from the voting configuration.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class AddVotingConfigExclusionsResponse extends ActionResponse implements ToXContentObject {
|
||||
|
||||
|
@ -33,6 +33,11 @@ package org.opensearch.action.admin.cluster.configuration;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport endpoint for clearing exclusions to voting config
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClearVotingConfigExclusionsAction extends ActionType<ClearVotingConfigExclusionsResponse> {
|
||||
public static final ClearVotingConfigExclusionsAction INSTANCE = new ClearVotingConfigExclusionsAction();
|
||||
public static final String NAME = "cluster:admin/voting_config/clear_exclusions";
|
||||
|
@ -42,6 +42,8 @@ import java.io.IOException;
|
||||
/**
|
||||
* A request to clear the voting config exclusions from the cluster state, optionally waiting for these nodes to be removed from the
|
||||
* cluster first.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClearVotingConfigExclusionsRequest extends MasterNodeRequest<ClearVotingConfigExclusionsRequest> {
|
||||
private boolean waitForRemoval = true;
|
||||
|
@ -42,6 +42,8 @@ import java.io.IOException;
|
||||
/**
|
||||
* A response to {@link ClearVotingConfigExclusionsRequest} indicating that voting config exclusions have been cleared from the
|
||||
* cluster state.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClearVotingConfigExclusionsResponse extends ActionResponse implements ToXContentObject {
|
||||
public ClearVotingConfigExclusionsResponse() {}
|
||||
|
@ -66,6 +66,11 @@ import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Transport endpoint action for adding exclusions to voting config
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportAddVotingConfigExclusionsAction extends TransportMasterNodeAction<
|
||||
AddVotingConfigExclusionsRequest,
|
||||
AddVotingConfigExclusionsResponse> {
|
||||
|
@ -60,6 +60,11 @@ import org.opensearch.transport.TransportService;
|
||||
import java.io.IOException;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Transport endpoint action for clearing exclusions to voting config
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportClearVotingConfigExclusionsAction extends TransportMasterNodeAction<
|
||||
ClearVotingConfigExclusionsRequest,
|
||||
ClearVotingConfigExclusionsResponse> {
|
||||
|
@ -34,6 +34,11 @@ package org.opensearch.action.admin.cluster.health;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport endpoint action for obtaining cluster health
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterHealthAction extends ActionType<ClusterHealthResponse> {
|
||||
|
||||
public static final ClusterHealthAction INSTANCE = new ClusterHealthAction();
|
||||
|
@ -48,6 +48,11 @@ import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Transport request for requesting cluster health
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterHealthRequest extends MasterNodeReadRequest<ClusterHealthRequest> implements IndicesRequest.Replaceable {
|
||||
|
||||
private String[] indices;
|
||||
|
@ -40,6 +40,11 @@ import org.opensearch.cluster.health.ClusterHealthStatus;
|
||||
import org.opensearch.common.Priority;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
|
||||
/**
|
||||
* Builder for requesting cluster health
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterHealthRequestBuilder extends MasterNodeReadOperationRequestBuilder<
|
||||
ClusterHealthRequest,
|
||||
ClusterHealthResponse,
|
||||
|
@ -60,6 +60,11 @@ import static java.util.Collections.emptyMap;
|
||||
import static org.opensearch.common.xcontent.ConstructingObjectParser.constructorArg;
|
||||
import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalConstructorArg;
|
||||
|
||||
/**
|
||||
* Transport response for Cluster Health
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterHealthResponse extends ActionResponse implements StatusToXContentObject {
|
||||
private static final String CLUSTER_NAME = "cluster_name";
|
||||
private static final String STATUS = "status";
|
||||
|
@ -67,6 +67,11 @@ import java.io.IOException;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
/**
|
||||
* Transport action for obtaining Cluster Health
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportClusterHealthAction extends TransportMasterNodeReadAction<ClusterHealthRequest, ClusterHealthResponse> {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(TransportClusterHealthAction.class);
|
||||
|
@ -39,6 +39,11 @@ import org.opensearch.common.io.stream.StreamOutput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Transport for OpenSearch Hot Threads
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodeHotThreads extends BaseNodeResponse {
|
||||
|
||||
private String hotThreads;
|
||||
|
@ -34,6 +34,11 @@ package org.opensearch.action.admin.cluster.node.hotthreads;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport action for requesting OpenSearch Hot Threads
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesHotThreadsAction extends ActionType<NodesHotThreadsResponse> {
|
||||
|
||||
public static final NodesHotThreadsAction INSTANCE = new NodesHotThreadsAction();
|
||||
|
@ -40,6 +40,11 @@ import org.opensearch.common.unit.TimeValue;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* Transport request for OpenSearch Hot Threads
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesHotThreadsRequest extends BaseNodesRequest<NodesHotThreadsRequest> {
|
||||
|
||||
int threads = 3;
|
||||
|
@ -36,6 +36,11 @@ import org.opensearch.action.support.nodes.NodesOperationRequestBuilder;
|
||||
import org.opensearch.client.OpenSearchClient;
|
||||
import org.opensearch.common.unit.TimeValue;
|
||||
|
||||
/**
|
||||
* Builder class for requesting OpenSearch Hot Threads
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesHotThreadsRequestBuilder extends NodesOperationRequestBuilder<
|
||||
NodesHotThreadsRequest,
|
||||
NodesHotThreadsResponse,
|
||||
|
@ -41,6 +41,11 @@ import org.opensearch.common.io.stream.StreamOutput;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Transport response for OpenSearch Hot Threads
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesHotThreadsResponse extends BaseNodesResponse<NodeHotThreads> {
|
||||
|
||||
public NodesHotThreadsResponse(StreamInput in) throws IOException {
|
||||
|
@ -48,6 +48,11 @@ import org.opensearch.transport.TransportService;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Transport action for OpenSearch Hot Threads
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportNodesHotThreadsAction extends TransportNodesAction<
|
||||
NodesHotThreadsRequest,
|
||||
NodesHotThreadsResponse,
|
||||
|
@ -58,6 +58,8 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Node information (static, does not change over time).
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodeInfo extends BaseNodeResponse {
|
||||
|
||||
|
@ -34,6 +34,11 @@ package org.opensearch.action.admin.cluster.node.info;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport action for OpenSearch Node Information
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesInfoAction extends ActionType<NodesInfoResponse> {
|
||||
|
||||
public static final NodesInfoAction INSTANCE = new NodesInfoAction();
|
||||
|
@ -47,6 +47,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* A request to get node (cluster) level information.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesInfoRequest extends BaseNodesRequest<NodesInfoRequest> {
|
||||
|
||||
|
@ -35,6 +35,11 @@ package org.opensearch.action.admin.cluster.node.info;
|
||||
import org.opensearch.action.support.nodes.NodesOperationRequestBuilder;
|
||||
import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Transport action for OpenSearch Node Information
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesInfoRequestBuilder extends NodesOperationRequestBuilder<NodesInfoRequest, NodesInfoResponse, NodesInfoRequestBuilder> {
|
||||
|
||||
public NodesInfoRequestBuilder(OpenSearchClient client, NodesInfoAction action) {
|
||||
|
@ -56,6 +56,11 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Transport response for OpenSearch Node Information
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesInfoResponse extends BaseNodesResponse<NodeInfo> implements ToXContentFragment {
|
||||
|
||||
public NodesInfoResponse(StreamInput in) throws IOException {
|
||||
|
@ -46,6 +46,8 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Information about plugins and modules
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class PluginsAndModules implements ReportingService.Info {
|
||||
private final List<PluginInfo> plugins;
|
||||
|
@ -48,6 +48,11 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Transport action for OpenSearch Node Information
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportNodesInfoAction extends TransportNodesAction<
|
||||
NodesInfoRequest,
|
||||
NodesInfoResponse,
|
||||
|
@ -40,6 +40,8 @@ import java.io.IOException;
|
||||
/**
|
||||
* Transport level private response for the transport handler registered under
|
||||
* {@value TransportLivenessAction#NAME}
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class LivenessRequest extends ActionRequest {
|
||||
public LivenessRequest() {}
|
||||
|
@ -43,6 +43,8 @@ import java.io.IOException;
|
||||
/**
|
||||
* Transport level private response for the transport handler registered under
|
||||
* {@value TransportLivenessAction#NAME}
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class LivenessResponse extends ActionResponse {
|
||||
|
||||
|
@ -40,6 +40,11 @@ import org.opensearch.transport.TransportChannel;
|
||||
import org.opensearch.transport.TransportRequestHandler;
|
||||
import org.opensearch.transport.TransportService;
|
||||
|
||||
/**
|
||||
* Transport action for OpenSearch Node Liveness
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class TransportLivenessAction implements TransportRequestHandler<LivenessRequest> {
|
||||
|
||||
private final ClusterService clusterService;
|
||||
|
@ -34,6 +34,11 @@ package org.opensearch.action.admin.cluster.node.reload;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport action for reloading OpenSearch Secure Settings
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesReloadSecureSettingsAction extends ActionType<NodesReloadSecureSettingsResponse> {
|
||||
|
||||
public static final NodesReloadSecureSettingsAction INSTANCE = new NodesReloadSecureSettingsAction();
|
||||
|
@ -49,6 +49,8 @@ import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* Request for a reload secure settings action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesReloadSecureSettingsRequest extends BaseNodesRequest<NodesReloadSecureSettingsRequest> {
|
||||
|
||||
|
@ -38,6 +38,8 @@ import org.opensearch.common.settings.SecureString;
|
||||
|
||||
/**
|
||||
* Builder for the reload secure settings nodes request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesReloadSecureSettingsRequestBuilder extends NodesOperationRequestBuilder<
|
||||
NodesReloadSecureSettingsRequest,
|
||||
|
@ -49,6 +49,8 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* The response for the reload secure settings action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesReloadSecureSettingsResponse extends BaseNodesResponse<NodesReloadSecureSettingsResponse.NodeResponse>
|
||||
implements
|
||||
|
@ -60,6 +60,11 @@ import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Transport action for reloading OpenSearch Secure Settings
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportNodesReloadSecureSettingsAction extends TransportNodesAction<
|
||||
NodesReloadSecureSettingsRequest,
|
||||
NodesReloadSecureSettingsResponse,
|
||||
|
@ -64,6 +64,8 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Node statistics (dynamic, changes depending on when created).
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodeStats extends BaseNodeResponse implements ToXContentFragment {
|
||||
|
||||
|
@ -34,6 +34,11 @@ package org.opensearch.action.admin.cluster.node.stats;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport action for obtaining OpenSearch Node Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesStatsAction extends ActionType<NodesStatsResponse> {
|
||||
|
||||
public static final NodesStatsAction INSTANCE = new NodesStatsAction();
|
||||
|
@ -47,6 +47,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* A request to get node (cluster) level stats.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesStatsRequest extends BaseNodesRequest<NodesStatsRequest> {
|
||||
|
||||
|
@ -36,6 +36,11 @@ import org.opensearch.action.admin.indices.stats.CommonStatsFlags;
|
||||
import org.opensearch.action.support.nodes.NodesOperationRequestBuilder;
|
||||
import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Transport builder for obtaining OpenSearch Node Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesStatsRequestBuilder extends NodesOperationRequestBuilder<
|
||||
NodesStatsRequest,
|
||||
NodesStatsResponse,
|
||||
|
@ -45,6 +45,11 @@ import org.opensearch.common.xcontent.XContentFactory;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Transport response for obtaining OpenSearch Node Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesStatsResponse extends BaseNodesResponse<NodeStats> implements ToXContentFragment {
|
||||
|
||||
public NodesStatsResponse(StreamInput in) throws IOException {
|
||||
|
@ -48,6 +48,11 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Transport action for obtaining OpenSearch Node Stats
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportNodesStatsAction extends TransportNodesAction<
|
||||
NodesStatsRequest,
|
||||
NodesStatsResponse,
|
||||
|
@ -36,6 +36,8 @@ import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* ActionType for cancelling running tasks
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class CancelTasksAction extends ActionType<CancelTasksResponse> {
|
||||
|
||||
|
@ -44,6 +44,8 @@ import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* A request to cancel tasks
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class CancelTasksRequest extends BaseTasksRequest<CancelTasksRequest> {
|
||||
|
||||
|
@ -37,6 +37,8 @@ import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Builder for the request to cancel tasks running on the specified nodes
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class CancelTasksRequestBuilder extends TasksRequestBuilder<CancelTasksRequest, CancelTasksResponse, CancelTasksRequestBuilder> {
|
||||
|
||||
|
@ -47,6 +47,8 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* Returns the list of tasks that were cancelled
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class CancelTasksResponse extends ListTasksResponse {
|
||||
|
||||
|
@ -54,6 +54,8 @@ import java.util.function.Consumer;
|
||||
* <p>
|
||||
* For a task to be cancellable it has to return an instance of
|
||||
* {@link CancellableTask} from {@link TransportRequest#createTask}
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportCancelTasksAction extends TransportTasksAction<CancellableTask, CancelTasksRequest, CancelTasksResponse, TaskInfo> {
|
||||
|
||||
|
@ -36,6 +36,8 @@ import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* ActionType for retrieving a list of currently running tasks
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class GetTaskAction extends ActionType<GetTaskResponse> {
|
||||
public static final String TASKS_ORIGIN = "tasks";
|
||||
|
@ -45,6 +45,8 @@ import static org.opensearch.action.ValidateActions.addValidationError;
|
||||
|
||||
/**
|
||||
* A request to get node tasks
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class GetTaskRequest extends ActionRequest {
|
||||
private TaskId taskId = TaskId.EMPTY_TASK_ID;
|
||||
|
@ -39,6 +39,8 @@ import org.opensearch.tasks.TaskId;
|
||||
|
||||
/**
|
||||
* Builder for the request to retrieve the list of tasks running on the specified nodes
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class GetTaskRequestBuilder extends ActionRequestBuilder<GetTaskRequest, GetTaskResponse> {
|
||||
public GetTaskRequestBuilder(OpenSearchClient client, GetTaskAction action) {
|
||||
|
@ -46,6 +46,8 @@ import static java.util.Objects.requireNonNull;
|
||||
|
||||
/**
|
||||
* Returns the list of tasks currently running on the nodes
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class GetTaskResponse extends ActionResponse implements ToXContentObject {
|
||||
|
||||
|
@ -74,6 +74,8 @@ import static org.opensearch.action.admin.cluster.node.tasks.list.TransportListT
|
||||
* <li>Look up the task and return it if it exists
|
||||
* <li>If it doesn't then look up the task from the results index
|
||||
* </ul>
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportGetTaskAction extends HandledTransportAction<GetTaskRequest, GetTaskResponse> {
|
||||
private final ThreadPool threadPool;
|
||||
|
@ -36,6 +36,8 @@ import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* ActionType for retrieving a list of currently running tasks
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ListTasksAction extends ActionType<ListTasksResponse> {
|
||||
|
||||
|
@ -40,6 +40,8 @@ import java.io.IOException;
|
||||
|
||||
/**
|
||||
* A request to get node tasks
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ListTasksRequest extends BaseTasksRequest<ListTasksRequest> {
|
||||
|
||||
|
@ -37,6 +37,8 @@ import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Builder for the request to retrieve the list of tasks running on the specified nodes
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ListTasksRequestBuilder extends TasksRequestBuilder<ListTasksRequest, ListTasksResponse, ListTasksRequestBuilder> {
|
||||
|
||||
|
@ -62,6 +62,8 @@ import static org.opensearch.common.xcontent.ConstructingObjectParser.optionalCo
|
||||
|
||||
/**
|
||||
* Returns the list of tasks currently running on the nodes
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ListTasksResponse extends BaseTasksResponse implements ToXContentObject {
|
||||
private static final String TASKS = "tasks";
|
||||
|
@ -44,6 +44,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Information about a currently running task and all its subtasks.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TaskGroup implements ToXContentObject {
|
||||
|
||||
|
@ -50,6 +50,11 @@ import java.util.function.Consumer;
|
||||
|
||||
import static org.opensearch.common.unit.TimeValue.timeValueSeconds;
|
||||
|
||||
/**
|
||||
* Transport action for listing tasks currently running on the nodes
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportListTasksAction extends TransportTasksAction<Task, ListTasksRequest, ListTasksResponse, TaskInfo> {
|
||||
public static long waitForCompletionTimeout(TimeValue timeout) {
|
||||
if (timeout == null) {
|
||||
|
@ -43,6 +43,11 @@ import org.opensearch.common.xcontent.XContentBuilder;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Concrete class for collecting OpenSearch telemetry
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodeUsage extends BaseNodeResponse implements ToXContentFragment {
|
||||
|
||||
private final long timestamp;
|
||||
|
@ -34,6 +34,11 @@ package org.opensearch.action.admin.cluster.node.usage;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport action for collecting OpenSearch telemetry
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesUsageAction extends ActionType<NodesUsageResponse> {
|
||||
|
||||
public static final NodesUsageAction INSTANCE = new NodesUsageAction();
|
||||
|
@ -39,6 +39,11 @@ import org.opensearch.common.io.stream.StreamOutput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Transport request for collecting OpenSearch telemetry
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesUsageRequest extends BaseNodesRequest<NodesUsageRequest> {
|
||||
|
||||
private boolean restActions;
|
||||
|
@ -36,6 +36,11 @@ import org.opensearch.action.ActionType;
|
||||
import org.opensearch.action.support.nodes.NodesOperationRequestBuilder;
|
||||
import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Transport builder for collecting OpenSearch telemetry
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesUsageRequestBuilder extends NodesOperationRequestBuilder<
|
||||
NodesUsageRequest,
|
||||
NodesUsageResponse,
|
||||
|
@ -48,6 +48,8 @@ import java.util.List;
|
||||
/**
|
||||
* The response for the nodes usage api which contains the individual usage
|
||||
* statistics for all nodes queried.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class NodesUsageResponse extends BaseNodesResponse<NodeUsage> implements ToXContentFragment {
|
||||
|
||||
|
@ -49,6 +49,11 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Transport action for collecting OpenSearch telemetry
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportNodesUsageAction extends TransportNodesAction<
|
||||
NodesUsageRequest,
|
||||
NodesUsageResponse,
|
||||
|
@ -34,6 +34,11 @@ package org.opensearch.action.admin.cluster.remote;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport action for remote monitoring
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RemoteInfoAction extends ActionType<RemoteInfoResponse> {
|
||||
|
||||
public static final String NAME = "cluster:monitor/remote/info";
|
||||
|
@ -38,6 +38,11 @@ import org.opensearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Transport request for remote monitoring
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RemoteInfoRequest extends ActionRequest {
|
||||
|
||||
public RemoteInfoRequest() {}
|
||||
|
@ -35,6 +35,11 @@ package org.opensearch.action.admin.cluster.remote;
|
||||
import org.opensearch.action.ActionRequestBuilder;
|
||||
import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Transport builder for remote monitoring
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RemoteInfoRequestBuilder extends ActionRequestBuilder<RemoteInfoRequest, RemoteInfoResponse> {
|
||||
|
||||
public RemoteInfoRequestBuilder(OpenSearchClient client, RemoteInfoAction action) {
|
||||
|
@ -45,6 +45,11 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Transport response for remote monitoring
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class RemoteInfoResponse extends ActionResponse implements ToXContentObject {
|
||||
|
||||
private List<RemoteConnectionInfo> infos;
|
||||
|
@ -43,6 +43,11 @@ import org.opensearch.transport.TransportService;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
/**
|
||||
* Transport action for remote monitoring
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class TransportRemoteInfoAction extends HandledTransportAction<RemoteInfoRequest, RemoteInfoResponse> {
|
||||
|
||||
private final RemoteClusterService remoteClusterService;
|
||||
|
@ -33,6 +33,11 @@ package org.opensearch.action.admin.cluster.repositories.cleanup;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport action for cleaning up snapshot repositories
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class CleanupRepositoryAction extends ActionType<CleanupRepositoryResponse> {
|
||||
|
||||
public static final CleanupRepositoryAction INSTANCE = new CleanupRepositoryAction();
|
||||
|
@ -40,6 +40,11 @@ import java.io.IOException;
|
||||
|
||||
import static org.opensearch.action.ValidateActions.addValidationError;
|
||||
|
||||
/**
|
||||
* Transport request for cleaning up snapshot repositories
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class CleanupRepositoryRequest extends AcknowledgedRequest<CleanupRepositoryRequest> {
|
||||
|
||||
private String repository;
|
||||
|
@ -35,6 +35,11 @@ import org.opensearch.action.ActionType;
|
||||
import org.opensearch.action.support.master.MasterNodeOperationRequestBuilder;
|
||||
import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Transport builder for cleaning up snapshot repositories
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class CleanupRepositoryRequestBuilder extends MasterNodeOperationRequestBuilder<
|
||||
CleanupRepositoryRequest,
|
||||
CleanupRepositoryResponse,
|
||||
|
@ -43,6 +43,11 @@ import org.opensearch.repositories.RepositoryCleanupResult;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Transport response for cleaning up snapshot repositories
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class CleanupRepositoryResponse extends ActionResponse implements ToXContentObject {
|
||||
|
||||
private static final ObjectParser<CleanupRepositoryResponse, Void> PARSER = new ObjectParser<>(
|
||||
|
@ -82,6 +82,8 @@ import java.util.Collections;
|
||||
* {@link BlobStoreRepository#cleanup} ensures that the repository state id has not changed between creation of the cluster state entry
|
||||
* and any delete/write operations. TODO: This will not work if we also want to clean up at the shard level as those will involve writes
|
||||
* as well as deletes.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public final class TransportCleanupRepositoryAction extends TransportMasterNodeAction<CleanupRepositoryRequest, CleanupRepositoryResponse> {
|
||||
|
||||
|
@ -37,6 +37,8 @@ import org.opensearch.action.support.master.AcknowledgedResponse;
|
||||
|
||||
/**
|
||||
* Unregister repository action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class DeleteRepositoryAction extends ActionType<AcknowledgedResponse> {
|
||||
|
||||
|
@ -45,6 +45,8 @@ import static org.opensearch.action.ValidateActions.addValidationError;
|
||||
* Unregister repository request.
|
||||
* <p>
|
||||
* The unregister repository command just unregisters the repository. No data is getting deleted from the repository.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class DeleteRepositoryRequest extends AcknowledgedRequest<DeleteRepositoryRequest> {
|
||||
|
||||
|
@ -38,6 +38,8 @@ import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Builder for unregister repository request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class DeleteRepositoryRequestBuilder extends AcknowledgedRequestBuilder<
|
||||
DeleteRepositoryRequest,
|
||||
|
@ -51,6 +51,8 @@ import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Transport action for unregister repository operation
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportDeleteRepositoryAction extends TransportMasterNodeAction<DeleteRepositoryRequest, AcknowledgedResponse> {
|
||||
|
||||
|
@ -36,6 +36,8 @@ import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Get repositories action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class GetRepositoriesAction extends ActionType<GetRepositoriesResponse> {
|
||||
|
||||
|
@ -44,6 +44,8 @@ import static org.opensearch.action.ValidateActions.addValidationError;
|
||||
|
||||
/**
|
||||
* Get repository request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class GetRepositoriesRequest extends MasterNodeReadRequest<GetRepositoriesRequest> {
|
||||
|
||||
|
@ -38,6 +38,8 @@ import org.opensearch.common.util.ArrayUtils;
|
||||
|
||||
/**
|
||||
* Get repository request builder
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class GetRepositoriesRequestBuilder extends MasterNodeReadOperationRequestBuilder<
|
||||
GetRepositoriesRequest,
|
||||
|
@ -49,6 +49,8 @@ import static org.opensearch.common.xcontent.XContentParserUtils.ensureExpectedT
|
||||
|
||||
/**
|
||||
* Get repositories response
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class GetRepositoriesResponse extends ActionResponse implements ToXContentObject {
|
||||
|
||||
|
@ -59,6 +59,8 @@ import java.util.Set;
|
||||
|
||||
/**
|
||||
* Transport action for get repositories operation
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportGetRepositoriesAction extends TransportMasterNodeReadAction<GetRepositoriesRequest, GetRepositoriesResponse> {
|
||||
|
||||
|
@ -37,6 +37,8 @@ import org.opensearch.action.support.master.AcknowledgedResponse;
|
||||
|
||||
/**
|
||||
* Register repository action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class PutRepositoryAction extends ActionType<AcknowledgedResponse> {
|
||||
|
||||
|
@ -54,6 +54,8 @@ import static org.opensearch.common.settings.Settings.Builder.EMPTY_SETTINGS;
|
||||
* <p>
|
||||
* Registers a repository with given name, type and settings. If the repository with the same name already
|
||||
* exists in the cluster, the new repository will replace the existing repository.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class PutRepositoryRequest extends AcknowledgedRequest<PutRepositoryRequest> implements ToXContentObject {
|
||||
|
||||
|
@ -42,6 +42,8 @@ import java.util.Map;
|
||||
|
||||
/**
|
||||
* Register repository request builder
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class PutRepositoryRequestBuilder extends AcknowledgedRequestBuilder<
|
||||
PutRepositoryRequest,
|
||||
|
@ -51,6 +51,8 @@ import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Transport action for register repository operation
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportPutRepositoryAction extends TransportMasterNodeAction<PutRepositoryRequest, AcknowledgedResponse> {
|
||||
|
||||
|
@ -51,6 +51,8 @@ import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Transport action for verifying repository operation
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class TransportVerifyRepositoryAction extends TransportMasterNodeAction<VerifyRepositoryRequest, VerifyRepositoryResponse> {
|
||||
|
||||
|
@ -36,6 +36,8 @@ import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Verify repository action
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class VerifyRepositoryAction extends ActionType<VerifyRepositoryResponse> {
|
||||
|
||||
|
@ -43,6 +43,8 @@ import static org.opensearch.action.ValidateActions.addValidationError;
|
||||
|
||||
/**
|
||||
* Verify repository request.
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class VerifyRepositoryRequest extends AcknowledgedRequest<VerifyRepositoryRequest> {
|
||||
|
||||
|
@ -37,6 +37,8 @@ import org.opensearch.client.OpenSearchClient;
|
||||
|
||||
/**
|
||||
* Builder for verify repository request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class VerifyRepositoryRequestBuilder extends MasterNodeOperationRequestBuilder<
|
||||
VerifyRepositoryRequest,
|
||||
|
@ -52,6 +52,8 @@ import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Verify repository response
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class VerifyRepositoryResponse extends ActionResponse implements ToXContentObject {
|
||||
|
||||
|
@ -34,6 +34,11 @@ package org.opensearch.action.admin.cluster.reroute;
|
||||
|
||||
import org.opensearch.action.ActionType;
|
||||
|
||||
/**
|
||||
* Transport action for rerouting allocation commands
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterRerouteAction extends ActionType<ClusterRerouteResponse> {
|
||||
|
||||
public static final ClusterRerouteAction INSTANCE = new ClusterRerouteAction();
|
||||
|
@ -44,6 +44,8 @@ import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Request to submit cluster reroute allocation commands
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterRerouteRequest extends AcknowledgedRequest<ClusterRerouteRequest> {
|
||||
private AllocationCommands commands = new AllocationCommands();
|
||||
|
@ -38,6 +38,8 @@ import org.opensearch.cluster.routing.allocation.command.AllocationCommand;
|
||||
|
||||
/**
|
||||
* Builder for a cluster reroute request
|
||||
*
|
||||
* @opensearch.internal
|
||||
*/
|
||||
public class ClusterRerouteRequestBuilder extends AcknowledgedRequestBuilder<
|
||||
ClusterRerouteRequest,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user