mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-27 17:10:22 -04:00
Add temporary LegacyActionRequest (#128107)
In order to remove ActionType, ActionRequest will become strongly typed, referring to the ActionResponse type. As a precursor to that, this commit adds a LegacyActionRequest which all existing ActionRequest implementations now inherit from. This will allow adding the ActionResponse type to ActionRequest in a future commit without modifying every implementation at once.
This commit is contained in:
parent
c0f5e00378
commit
a2b4a6f246
238 changed files with 682 additions and 645 deletions
|
@ -10,10 +10,10 @@ package org.elasticsearch.ingest.common;
|
|||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.client.internal.node.NodeClient;
|
||||
|
@ -43,11 +43,11 @@ import static org.elasticsearch.rest.RestRequest.Method.GET;
|
|||
|
||||
public class GrokProcessorGetAction {
|
||||
|
||||
static final ActionType<GrokProcessorGetAction.Response> INSTANCE = new ActionType<>("cluster:admin/ingest/processor/grok/get");
|
||||
static final ActionType<Response> INSTANCE = new ActionType<>("cluster:admin/ingest/processor/grok/get");
|
||||
|
||||
private GrokProcessorGetAction() {/* no instances */}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
private final boolean sorted;
|
||||
private final String ecsCompatibility;
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
package org.elasticsearch.script.mustache;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.CompositeIndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.search.MultiSearchRequest;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
|
@ -30,7 +30,7 @@ import java.util.Objects;
|
|||
|
||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
||||
|
||||
public class MultiSearchTemplateRequest extends ActionRequest implements CompositeIndicesRequest {
|
||||
public class MultiSearchTemplateRequest extends LegacyActionRequest implements CompositeIndicesRequest {
|
||||
|
||||
private int maxConcurrentSearchRequests = 0;
|
||||
private List<SearchTemplateRequest> requests = new ArrayList<>();
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
package org.elasticsearch.script.mustache;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.CompositeIndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.common.ParsingException;
|
||||
import org.elasticsearch.common.Strings;
|
||||
|
@ -34,7 +34,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* A request to execute a search based on a search template.
|
||||
*/
|
||||
public class SearchTemplateRequest extends ActionRequest implements CompositeIndicesRequest, ToXContentObject {
|
||||
public class SearchTemplateRequest extends LegacyActionRequest implements CompositeIndicesRequest, ToXContentObject {
|
||||
|
||||
private SearchRequest request;
|
||||
private boolean simulate = false;
|
||||
|
@ -171,6 +171,7 @@ public class SearchTemplateRequest extends ActionRequest implements CompositeInd
|
|||
private static final ParseField PROFILE_FIELD = new ParseField("profile");
|
||||
|
||||
private static final ObjectParser<SearchTemplateRequest, Void> PARSER;
|
||||
|
||||
static {
|
||||
PARSER = new ObjectParser<>("search_template");
|
||||
PARSER.declareField((parser, request, s) -> request.setScriptParams(parser.map()), PARAMS_FIELD, ObjectParser.ValueType.OBJECT);
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
package org.elasticsearch.painless.action;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.client.internal.node.NodeClient;
|
||||
|
@ -61,7 +61,7 @@ public class PainlessContextAction {
|
|||
|
||||
private PainlessContextAction() {/* no instances */}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
private String scriptContextName;
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
package org.elasticsearch.index.rankeval;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.search.SearchType;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
|
@ -26,7 +26,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* Request to perform a search ranking evaluation.
|
||||
*/
|
||||
public final class RankEvalRequest extends ActionRequest implements IndicesRequest.Replaceable {
|
||||
public final class RankEvalRequest extends LegacyActionRequest implements IndicesRequest.Replaceable {
|
||||
|
||||
private RankEvalSpec rankingEvaluationSpec;
|
||||
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
|
||||
package org.elasticsearch.rest.root;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.TransportAction;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class MainRequest extends ActionRequest {
|
||||
public class MainRequest extends LegacyActionRequest {
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
|
|
|
@ -15,11 +15,11 @@ import org.apache.lucene.util.BytesRef;
|
|||
import org.elasticsearch.ESNetty4IntegTestCase;
|
||||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionRunnable;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.CountDownActionListener;
|
||||
import org.elasticsearch.action.support.SubscribableListener;
|
||||
|
@ -337,14 +337,14 @@ public class Netty4ChunkedContinuationsIT extends ESNetty4IntegTestCase {
|
|||
static final String ROUTE = "/_test/yields_continuations";
|
||||
static final String FAIL_INDEX_PARAM = "fail_index";
|
||||
|
||||
private static final ActionType<YieldsContinuationsPlugin.Response> TYPE = new ActionType<>("test:yields_continuations");
|
||||
private static final ActionType<Response> TYPE = new ActionType<>("test:yields_continuations");
|
||||
|
||||
@Override
|
||||
public Collection<ActionHandler> getActions() {
|
||||
return List.of(new ActionHandler(TYPE, TransportYieldsContinuationsAction.class));
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
final int failIndex;
|
||||
|
||||
public Request(int failIndex) {
|
||||
|
@ -525,7 +525,7 @@ public class Netty4ChunkedContinuationsIT extends ESNetty4IntegTestCase {
|
|||
return List.of(new ActionHandler(TYPE, TransportInfiniteContinuationsAction.class));
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
|
|
|
@ -14,11 +14,11 @@ import org.elasticsearch.ResourceNotFoundException;
|
|||
import org.elasticsearch.action.ActionFuture;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionListenerResponseHandler;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LatchedActionListener;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.GroupedActionListener;
|
||||
|
@ -118,6 +118,7 @@ public class CancellableTasksIT extends ESIntegTestCase {
|
|||
|
||||
/**
|
||||
* Allow some parts of the request to be completed
|
||||
*
|
||||
* @return a pending child requests
|
||||
*/
|
||||
static Set<TestRequest> allowPartialRequest(TestRequest request) throws Exception {
|
||||
|
@ -418,7 +419,7 @@ public class CancellableTasksIT extends ESIntegTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
static class TestRequest extends ActionRequest {
|
||||
static class TestRequest extends LegacyActionRequest {
|
||||
final int id;
|
||||
final DiscoveryNode node;
|
||||
final List<TestRequest> subRequests;
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
package org.elasticsearch.action.admin.cluster.tasks;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionRunnable;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.action.support.PlainActionFuture;
|
||||
|
@ -142,7 +142,7 @@ public class ListTasksIT extends ESSingleNodeTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
public static class TestRequest extends ActionRequest {
|
||||
public static class TestRequest extends LegacyActionRequest {
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
|
|
|
@ -16,10 +16,10 @@ import org.apache.lucene.search.TopDocs;
|
|||
import org.elasticsearch.TransportVersion;
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.search.SearchPhaseController;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
|
@ -142,7 +142,7 @@ public class MockedRequestActionBasedRerankerIT extends AbstractRerankerIT {
|
|||
}
|
||||
}
|
||||
|
||||
public static class TestRerankingActionRequest extends ActionRequest {
|
||||
public static class TestRerankingActionRequest extends LegacyActionRequest {
|
||||
|
||||
private final List<String> docFeatures;
|
||||
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the "Elastic License
|
||||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
|
||||
* Public License v 1"; you may not use this file except in compliance with, at
|
||||
* your election, the "Elastic License 2.0", the "GNU Affero General Public
|
||||
* License v3.0 only", or the "Server Side Public License, v 1".
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action;
|
||||
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* An action request with an unspecified response type.
|
||||
*
|
||||
* @deprecated Use {@link ActionRequest} with a specific {@link ActionResponse} type.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class LegacyActionRequest extends ActionRequest {
|
||||
public LegacyActionRequest() {
|
||||
super();
|
||||
}
|
||||
|
||||
public LegacyActionRequest(StreamInput in) throws IOException {
|
||||
super(in);
|
||||
}
|
||||
}
|
|
@ -10,10 +10,10 @@
|
|||
package org.elasticsearch.action.admin.cluster.coordination;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.cluster.coordination.ClusterFormationFailureHelper;
|
||||
|
@ -41,7 +41,7 @@ public class ClusterFormationInfoAction extends ActionType<ClusterFormationInfoA
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
public Request() {}
|
||||
|
||||
|
@ -105,7 +105,7 @@ public class ClusterFormationInfoAction extends ActionType<ClusterFormationInfoA
|
|||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ClusterFormationInfoAction.Response response = (ClusterFormationInfoAction.Response) o;
|
||||
Response response = (Response) o;
|
||||
return clusterFormationState.equals(response.clusterFormationState);
|
||||
}
|
||||
|
||||
|
@ -118,9 +118,7 @@ public class ClusterFormationInfoAction extends ActionType<ClusterFormationInfoA
|
|||
/**
|
||||
* This transport action fetches the ClusterFormationState from a remote node.
|
||||
*/
|
||||
public static class TransportAction extends HandledTransportAction<
|
||||
ClusterFormationInfoAction.Request,
|
||||
ClusterFormationInfoAction.Response> {
|
||||
public static class TransportAction extends HandledTransportAction<Request, Response> {
|
||||
private final Coordinator coordinator;
|
||||
|
||||
@Inject
|
||||
|
@ -129,19 +127,15 @@ public class ClusterFormationInfoAction extends ActionType<ClusterFormationInfoA
|
|||
ClusterFormationInfoAction.NAME,
|
||||
transportService,
|
||||
actionFilters,
|
||||
ClusterFormationInfoAction.Request::new,
|
||||
Request::new,
|
||||
transportService.getThreadPool().executor(ThreadPool.Names.CLUSTER_COORDINATION)
|
||||
);
|
||||
this.coordinator = coordinator;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doExecute(
|
||||
Task task,
|
||||
ClusterFormationInfoAction.Request request,
|
||||
ActionListener<ClusterFormationInfoAction.Response> listener
|
||||
) {
|
||||
listener.onResponse(new ClusterFormationInfoAction.Response(coordinator.getClusterFormationState()));
|
||||
protected void doExecute(Task task, Request request, ActionListener<Response> listener) {
|
||||
listener.onResponse(new Response(coordinator.getClusterFormationState()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
package org.elasticsearch.action.admin.cluster.coordination;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.cluster.coordination.CoordinationDiagnosticsService;
|
||||
|
@ -42,7 +42,7 @@ public class CoordinationDiagnosticsAction extends ActionType<CoordinationDiagno
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
final boolean explain; // Non-private for testing
|
||||
|
||||
public Request(boolean explain) {
|
||||
|
@ -104,7 +104,7 @@ public class CoordinationDiagnosticsAction extends ActionType<CoordinationDiagno
|
|||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
CoordinationDiagnosticsAction.Response response = (CoordinationDiagnosticsAction.Response) o;
|
||||
Response response = (Response) o;
|
||||
return result.equals(response.result);
|
||||
}
|
||||
|
||||
|
@ -130,14 +130,14 @@ public class CoordinationDiagnosticsAction extends ActionType<CoordinationDiagno
|
|||
CoordinationDiagnosticsAction.NAME,
|
||||
transportService,
|
||||
actionFilters,
|
||||
CoordinationDiagnosticsAction.Request::new,
|
||||
Request::new,
|
||||
transportService.getThreadPool().executor(ThreadPool.Names.CLUSTER_COORDINATION)
|
||||
);
|
||||
this.coordinationDiagnosticsService = coordinationDiagnosticsService;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doExecute(Task task, CoordinationDiagnosticsAction.Request request, ActionListener<Response> listener) {
|
||||
protected void doExecute(Task task, Request request, ActionListener<Response> listener) {
|
||||
listener.onResponse(new Response(coordinationDiagnosticsService.diagnoseMasterStability(request.explain)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
package org.elasticsearch.action.admin.cluster.coordination;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.cluster.coordination.MasterHistoryService;
|
||||
|
@ -42,7 +42,7 @@ public class MasterHistoryAction extends ActionType<MasterHistoryAction.Response
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
public Request() {}
|
||||
|
||||
|
@ -94,6 +94,7 @@ public class MasterHistoryAction extends ActionType<MasterHistoryAction.Response
|
|||
/**
|
||||
* Returns an ordered list of DiscoveryNodes that the node responding has seen to be master nodes over the last 30 minutes, ordered
|
||||
* oldest first. Note that these DiscoveryNodes can be null.
|
||||
*
|
||||
* @return a list of DiscoveryNodes that the node responding has seen to be master nodes over the last 30 minutes, ordered oldest
|
||||
* first
|
||||
*/
|
||||
|
@ -113,7 +114,7 @@ public class MasterHistoryAction extends ActionType<MasterHistoryAction.Response
|
|||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
MasterHistoryAction.Response response = (MasterHistoryAction.Response) o;
|
||||
Response response = (Response) o;
|
||||
return masterHistory.equals(response.masterHistory);
|
||||
}
|
||||
|
||||
|
@ -136,8 +137,8 @@ public class MasterHistoryAction extends ActionType<MasterHistoryAction.Response
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void doExecute(Task task, MasterHistoryAction.Request request, ActionListener<Response> listener) {
|
||||
listener.onResponse(new MasterHistoryAction.Response(masterHistoryService.getLocalMasterHistory().getRawNodes()));
|
||||
protected void doExecute(Task task, Request request, ActionListener<Response> listener) {
|
||||
listener.onResponse(new Response(masterHistoryService.getLocalMasterHistory().getRawNodes()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
package org.elasticsearch.action.admin.cluster.node.tasks.get;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.TimeValue;
|
||||
|
@ -23,7 +23,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* A request to get node tasks
|
||||
*/
|
||||
public class GetTaskRequest extends ActionRequest {
|
||||
public class GetTaskRequest extends LegacyActionRequest {
|
||||
private TaskId taskId = TaskId.EMPTY_TASK_ID;
|
||||
private boolean waitForCompletion = false;
|
||||
private TimeValue timeout = null;
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
package org.elasticsearch.action.admin.cluster.remote;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.RemoteClusterActionType;
|
||||
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoMetrics;
|
||||
import org.elasticsearch.action.admin.cluster.node.info.NodesInfoRequest;
|
||||
|
@ -40,13 +40,10 @@ import java.util.Objects;
|
|||
public class RemoteClusterNodesAction {
|
||||
|
||||
public static final String NAME = "cluster:internal/remote_cluster/nodes";
|
||||
public static final ActionType<RemoteClusterNodesAction.Response> TYPE = new ActionType<>(NAME);
|
||||
public static final RemoteClusterActionType<Response> REMOTE_TYPE = new RemoteClusterActionType<>(
|
||||
NAME,
|
||||
RemoteClusterNodesAction.Response::new
|
||||
);
|
||||
public static final ActionType<Response> TYPE = new ActionType<>(NAME);
|
||||
public static final RemoteClusterActionType<Response> REMOTE_TYPE = new RemoteClusterActionType<>(NAME, Response::new);
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
public static final Request ALL_NODES = new Request(false);
|
||||
public static final Request REMOTE_CLUSTER_SERVER_NODES = new Request(true);
|
||||
private final boolean remoteClusterServer;
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
package org.elasticsearch.action.admin.cluster.remote;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public final class RemoteInfoRequest extends ActionRequest {
|
||||
public final class RemoteInfoRequest extends LegacyActionRequest {
|
||||
|
||||
public RemoteInfoRequest() {}
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
package org.elasticsearch.action.admin.cluster.stats;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
||||
|
@ -20,7 +20,7 @@ import java.io.IOException;
|
|||
/**
|
||||
* A request to get cluster level stats from the remote cluster.
|
||||
*/
|
||||
public class RemoteClusterStatsRequest extends ActionRequest {
|
||||
public class RemoteClusterStatsRequest extends LegacyActionRequest {
|
||||
public RemoteClusterStatsRequest(StreamInput in) throws IOException {
|
||||
super(in);
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
*/
|
||||
package org.elasticsearch.action.admin.cluster.storedscripts;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class GetScriptContextRequest extends ActionRequest {
|
||||
public class GetScriptContextRequest extends LegacyActionRequest {
|
||||
public GetScriptContextRequest() {
|
||||
super();
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@
|
|||
|
||||
package org.elasticsearch.action.admin.cluster.storedscripts;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class GetScriptLanguageRequest extends ActionRequest {
|
||||
public class GetScriptLanguageRequest extends LegacyActionRequest {
|
||||
public GetScriptLanguageRequest() {
|
||||
super();
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.admin.indices.mapping.get;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -23,11 +23,11 @@ import java.util.Arrays;
|
|||
|
||||
/**
|
||||
* Request the mappings of specific fields
|
||||
*
|
||||
* <p>
|
||||
* Note: there is a new class with the same name for the Java HLRC that uses a typeless format.
|
||||
* Any changes done to this class should go to that client class as well.
|
||||
*/
|
||||
public class GetFieldMappingsRequest extends ActionRequest implements IndicesRequest.Replaceable {
|
||||
public class GetFieldMappingsRequest extends LegacyActionRequest implements IndicesRequest.Replaceable {
|
||||
|
||||
private String[] fields = Strings.EMPTY_ARRAY;
|
||||
|
||||
|
@ -84,7 +84,9 @@ public class GetFieldMappingsRequest extends ActionRequest implements IndicesReq
|
|||
return true;
|
||||
}
|
||||
|
||||
/** @param fields a list of fields to retrieve the mapping for */
|
||||
/**
|
||||
* @param fields a list of fields to retrieve the mapping for
|
||||
*/
|
||||
public GetFieldMappingsRequest fields(String... fields) {
|
||||
this.fields = fields;
|
||||
return this;
|
||||
|
@ -98,7 +100,9 @@ public class GetFieldMappingsRequest extends ActionRequest implements IndicesReq
|
|||
return includeDefaults;
|
||||
}
|
||||
|
||||
/** Indicates whether default mapping settings should be returned */
|
||||
/**
|
||||
* Indicates whether default mapping settings should be returned
|
||||
*/
|
||||
public GetFieldMappingsRequest includeDefaults(boolean includeDefaults) {
|
||||
this.includeDefaults = includeDefaults;
|
||||
return this;
|
||||
|
|
|
@ -11,9 +11,9 @@ package org.elasticsearch.action.admin.indices.resolve;
|
|||
|
||||
import org.elasticsearch.TransportVersion;
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -29,7 +29,7 @@ import java.util.Arrays;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ResolveClusterActionRequest extends ActionRequest implements IndicesRequest.Replaceable {
|
||||
public class ResolveClusterActionRequest extends LegacyActionRequest implements IndicesRequest.Replaceable {
|
||||
|
||||
public static final IndicesOptions DEFAULT_INDICES_OPTIONS = IndicesOptions.strictExpandOpen();
|
||||
public static final String TRANSPORT_VERSION_ERROR_MESSAGE_PREFIX = "ResolveClusterAction requires at least version";
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
package org.elasticsearch.action.admin.indices.resolve;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.OriginalIndices;
|
||||
import org.elasticsearch.action.RemoteClusterActionType;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
|
@ -75,7 +75,7 @@ public class ResolveIndexAction extends ActionType<ResolveIndexAction.Response>
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements IndicesRequest.Replaceable {
|
||||
public static class Request extends LegacyActionRequest implements IndicesRequest.Replaceable {
|
||||
|
||||
public static final IndicesOptions DEFAULT_INDICES_OPTIONS = IndicesOptions.strictExpandOpen();
|
||||
|
||||
|
@ -517,12 +517,12 @@ public class ResolveIndexAction extends ActionType<ResolveIndexAction.Response>
|
|||
/**
|
||||
* Resolves the specified names and/or wildcard expressions to index abstractions. Returns results in the supplied lists.
|
||||
*
|
||||
* @param localIndices The names and wildcard expressions to resolve
|
||||
* @param projectState Project state
|
||||
* @param resolver Resolver instance for matching names
|
||||
* @param indices List containing any matching indices
|
||||
* @param aliases List containing any matching aliases
|
||||
* @param dataStreams List containing any matching data streams
|
||||
* @param localIndices The names and wildcard expressions to resolve
|
||||
* @param projectState Project state
|
||||
* @param resolver Resolver instance for matching names
|
||||
* @param indices List containing any matching indices
|
||||
* @param aliases List containing any matching aliases
|
||||
* @param dataStreams List containing any matching data streams
|
||||
*/
|
||||
static void resolveIndices(
|
||||
@Nullable OriginalIndices localIndices,
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.elasticsearch.action.ActionRequest;
|
|||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.CompositeIndicesRequest;
|
||||
import org.elasticsearch.action.DocWriteRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.delete.DeleteRequest;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
|
@ -56,7 +57,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
* Note that we only support refresh on the bulk request not per item.
|
||||
* @see org.elasticsearch.client.internal.Client#bulk(BulkRequest)
|
||||
*/
|
||||
public class BulkRequest extends ActionRequest
|
||||
public class BulkRequest extends LegacyActionRequest
|
||||
implements
|
||||
CompositeIndicesRequest,
|
||||
WriteRequest<BulkRequest>,
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.fieldcaps;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.OriginalIndices;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
|
@ -30,7 +30,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
class FieldCapabilitiesNodeRequest extends ActionRequest implements IndicesRequest {
|
||||
class FieldCapabilitiesNodeRequest extends LegacyActionRequest implements IndicesRequest {
|
||||
|
||||
private final List<ShardId> shardIds;
|
||||
private final String[] fields;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.fieldcaps;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
|
@ -34,7 +34,7 @@ import java.util.Map;
|
|||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
public final class FieldCapabilitiesRequest extends ActionRequest implements IndicesRequest.Replaceable, ToXContentObject {
|
||||
public final class FieldCapabilitiesRequest extends LegacyActionRequest implements IndicesRequest.Replaceable, ToXContentObject {
|
||||
public static final String NAME = "field_caps_request";
|
||||
public static final IndicesOptions DEFAULT_INDICES_OPTIONS = IndicesOptions.strictExpandOpenAndForbidClosed();
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@ package org.elasticsearch.action.get;
|
|||
|
||||
import org.elasticsearch.ElasticsearchParseException;
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.CompositeIndicesRequest;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.RealtimeRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
|
@ -45,7 +45,7 @@ import java.util.Locale;
|
|||
|
||||
// It's not possible to suppress teh warning at #realtime(boolean) at a method-level.
|
||||
@SuppressWarnings("unchecked")
|
||||
public class MultiGetRequest extends ActionRequest
|
||||
public class MultiGetRequest extends LegacyActionRequest
|
||||
implements
|
||||
Iterable<MultiGetRequest.Item>,
|
||||
CompositeIndicesRequest,
|
||||
|
|
|
@ -12,10 +12,10 @@ package org.elasticsearch.action.get;
|
|||
import org.apache.lucene.util.BytesRef;
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
|
@ -85,7 +85,7 @@ public class TransportGetFromTranslogAction extends HandledTransportAction<
|
|||
});
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements IndicesRequest {
|
||||
public static class Request extends LegacyActionRequest implements IndicesRequest {
|
||||
|
||||
private final GetRequest getRequest;
|
||||
private final ShardId shardId;
|
||||
|
|
|
@ -11,9 +11,9 @@ package org.elasticsearch.action.get;
|
|||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.action.support.TransportActions;
|
||||
|
@ -106,7 +106,7 @@ public class TransportShardMultiGetFomTranslogAction extends HandledTransportAct
|
|||
});
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
private final MultiGetShardRequest multiGetShardRequest;
|
||||
private final ShardId shardId;
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
package org.elasticsearch.action.ingest;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.cluster.metadata.ProjectId;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.bytes.ReleasableBytesReference;
|
||||
|
@ -39,7 +39,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public class SimulatePipelineRequest extends ActionRequest implements ToXContentObject {
|
||||
public class SimulatePipelineRequest extends LegacyActionRequest implements ToXContentObject {
|
||||
private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(SimulatePipelineRequest.class);
|
||||
private String id;
|
||||
private boolean verbose;
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
package org.elasticsearch.action.search;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.xcontent.ToXContentObject;
|
||||
|
@ -24,7 +24,7 @@ import java.util.List;
|
|||
|
||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
||||
|
||||
public class ClearScrollRequest extends ActionRequest implements ToXContentObject {
|
||||
public class ClearScrollRequest extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
private List<String> scrollIds;
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
package org.elasticsearch.action.search;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.common.bytes.BytesArray;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
|
@ -24,7 +24,7 @@ import org.elasticsearch.xcontent.XContentParser;
|
|||
import java.io.IOException;
|
||||
import java.util.Base64;
|
||||
|
||||
public class ClosePointInTimeRequest extends ActionRequest implements ToXContentObject {
|
||||
public class ClosePointInTimeRequest extends LegacyActionRequest implements ToXContentObject {
|
||||
private static final ParseField ID = new ParseField("id");
|
||||
|
||||
private final BytesReference id;
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
package org.elasticsearch.action.search;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.CompositeIndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.CheckedBiConsumer;
|
||||
import org.elasticsearch.common.TriFunction;
|
||||
|
@ -46,7 +46,7 @@ import static org.elasticsearch.common.xcontent.support.XContentMapValues.nodeSt
|
|||
/**
|
||||
* A multi search API request.
|
||||
*/
|
||||
public class MultiSearchRequest extends ActionRequest implements CompositeIndicesRequest {
|
||||
public class MultiSearchRequest extends LegacyActionRequest implements CompositeIndicesRequest {
|
||||
public static final int MAX_CONCURRENT_SEARCH_REQUESTS_DEFAULT = 0;
|
||||
|
||||
private int maxConcurrentSearchRequests = 0;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.search;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -29,7 +29,7 @@ import java.util.Objects;
|
|||
|
||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
||||
|
||||
public final class OpenPointInTimeRequest extends ActionRequest implements IndicesRequest.Replaceable {
|
||||
public final class OpenPointInTimeRequest extends LegacyActionRequest implements IndicesRequest.Replaceable {
|
||||
|
||||
private String[] indices;
|
||||
private IndicesOptions indicesOptions = DEFAULT_INDICES_OPTIONS;
|
||||
|
|
|
@ -11,10 +11,11 @@ package org.elasticsearch.action.search;
|
|||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.client.internal.Client;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -45,14 +46,14 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* A request to execute search against one or more indices (or all).
|
||||
* <p>
|
||||
* Note, the search {@link #source(org.elasticsearch.search.builder.SearchSourceBuilder)}
|
||||
* Note, the search {@link #source(SearchSourceBuilder)}
|
||||
* is required. The search source is the different search options, including aggregations and such.
|
||||
* </p>
|
||||
*
|
||||
* @see org.elasticsearch.client.internal.Client#search(SearchRequest)
|
||||
* @see Client#search(SearchRequest)
|
||||
* @see SearchResponse
|
||||
*/
|
||||
public class SearchRequest extends ActionRequest implements IndicesRequest.Replaceable, Rewriteable<SearchRequest> {
|
||||
public class SearchRequest extends LegacyActionRequest implements IndicesRequest.Replaceable, Rewriteable<SearchRequest> {
|
||||
|
||||
public static final ToXContent.Params FORMAT_PARAMS = new ToXContent.MapParams(Collections.singletonMap("pretty", "false"));
|
||||
|
||||
|
@ -160,12 +161,12 @@ public class SearchRequest extends ActionRequest implements IndicesRequest.Repla
|
|||
* Used when a {@link SearchRequest} is created and executed as part of a cross-cluster search request
|
||||
* performing reduction on each cluster in order to minimize network round-trips between the coordinating node and the remote clusters.
|
||||
*
|
||||
* @param parentTaskId the parent taskId of the original search request
|
||||
* @param parentTaskId the parent taskId of the original search request
|
||||
* @param originalSearchRequest the original search request
|
||||
* @param indices the indices to search against
|
||||
* @param clusterAlias the alias to prefix index names with in the returned search results
|
||||
* @param absoluteStartMillis the absolute start time to be used on the remote clusters to ensure that the same value is used
|
||||
* @param finalReduce whether the reduction should be final or not
|
||||
* @param indices the indices to search against
|
||||
* @param clusterAlias the alias to prefix index names with in the returned search results
|
||||
* @param absoluteStartMillis the absolute start time to be used on the remote clusters to ensure that the same value is used
|
||||
* @param finalReduce whether the reduction should be final or not
|
||||
*/
|
||||
static SearchRequest subSearchRequest(
|
||||
TaskId parentTaskId,
|
||||
|
@ -629,7 +630,7 @@ public class SearchRequest extends ActionRequest implements IndicesRequest.Repla
|
|||
* the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for
|
||||
* instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard
|
||||
* bounds and the query are disjoint.
|
||||
*
|
||||
* <p>
|
||||
* When unspecified, the pre-filter phase is executed if any of these conditions is met:
|
||||
* <ul>
|
||||
* <li>The request targets more than 128 shards</li>
|
||||
|
@ -650,7 +651,7 @@ public class SearchRequest extends ActionRequest implements IndicesRequest.Repla
|
|||
* This filter roundtrip can limit the number of shards significantly if for
|
||||
* instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard
|
||||
* bounds and the query are disjoint.
|
||||
*
|
||||
* <p>
|
||||
* When unspecified, the pre-filter phase is executed if any of these conditions is met:
|
||||
* <ul>
|
||||
* <li>The request targets more than 128 shards</li>
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
package org.elasticsearch.action.search;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.TimeValue;
|
||||
|
@ -26,7 +26,7 @@ import java.util.Objects;
|
|||
|
||||
import static org.elasticsearch.action.ValidateActions.addValidationError;
|
||||
|
||||
public class SearchScrollRequest extends ActionRequest implements ToXContentObject {
|
||||
public class SearchScrollRequest extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
private String scrollId;
|
||||
private TimeValue scroll;
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
package org.elasticsearch.action.search;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -28,7 +28,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* A request to find the list of target shards that might match the query for the given target indices.
|
||||
*/
|
||||
public final class SearchShardsRequest extends ActionRequest implements IndicesRequest.Replaceable {
|
||||
public final class SearchShardsRequest extends LegacyActionRequest implements IndicesRequest.Replaceable {
|
||||
private String[] indices;
|
||||
private final IndicesOptions indicesOptions;
|
||||
@Nullable
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
package org.elasticsearch.action.support.broadcast;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -20,7 +20,7 @@ import org.elasticsearch.core.TimeValue;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
public class BroadcastRequest<Request extends BroadcastRequest<Request>> extends ActionRequest implements IndicesRequest.Replaceable {
|
||||
public class BroadcastRequest<Request extends BroadcastRequest<Request>> extends LegacyActionRequest implements IndicesRequest.Replaceable {
|
||||
|
||||
public static final IndicesOptions DEFAULT_INDICES_OPTIONS = IndicesOptions.strictExpandOpenAndForbidClosed();
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.support.broadcast.unpromotable;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.cluster.routing.IndexShardRoutingTable;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -29,7 +29,7 @@ import static org.elasticsearch.action.support.IndicesOptions.strictSingleIndexN
|
|||
/**
|
||||
* A request that is broadcast to the unpromotable assigned replicas of a primary.
|
||||
*/
|
||||
public class BroadcastUnpromotableRequest extends ActionRequest implements IndicesRequest {
|
||||
public class BroadcastUnpromotableRequest extends LegacyActionRequest implements IndicesRequest {
|
||||
|
||||
/**
|
||||
* Holds the index shard routing table that will be used by {@link TransportBroadcastUnpromotableAction} to broadcast the requests to
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
package org.elasticsearch.action.support.local;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.TransportAction;
|
||||
import org.elasticsearch.action.support.master.MasterNodeReadRequest;
|
||||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.TimeValue;
|
||||
|
@ -24,7 +26,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* A base request for actions that are executed locally on the node that receives the request.
|
||||
*/
|
||||
public abstract class LocalClusterStateRequest extends ActionRequest {
|
||||
public abstract class LocalClusterStateRequest extends LegacyActionRequest {
|
||||
|
||||
/**
|
||||
* The timeout for waiting until the cluster is unblocked.
|
||||
|
@ -38,7 +40,7 @@ public abstract class LocalClusterStateRequest extends ActionRequest {
|
|||
|
||||
/**
|
||||
* This constructor exists solely for BwC purposes. It should exclusively be used by requests that used to extend
|
||||
* {@link org.elasticsearch.action.support.master.MasterNodeReadRequest} and still need to be able to serialize incoming request.
|
||||
* {@link MasterNodeReadRequest} and still need to be able to serialize incoming request.
|
||||
*/
|
||||
@UpdateForV10(owner = UpdateForV10.Owner.DISTRIBUTED_COORDINATION)
|
||||
protected LocalClusterStateRequest(StreamInput in) throws IOException {
|
||||
|
@ -47,7 +49,7 @@ public abstract class LocalClusterStateRequest extends ActionRequest {
|
|||
|
||||
/**
|
||||
* This constructor exists solely for BwC purposes. It should exclusively be used by requests that used to extend
|
||||
* {@link org.elasticsearch.action.support.master.MasterNodeRequest} and still need to be able to serialize incoming request.
|
||||
* {@link MasterNodeRequest} and still need to be able to serialize incoming request.
|
||||
*/
|
||||
@UpdateForV10(owner = UpdateForV10.Owner.DISTRIBUTED_COORDINATION)
|
||||
protected LocalClusterStateRequest(StreamInput in, boolean readLocal) throws IOException {
|
||||
|
|
|
@ -10,10 +10,11 @@
|
|||
package org.elasticsearch.action.support.master;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.TimeValue;
|
||||
import org.elasticsearch.rest.RestUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
@ -21,7 +22,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* A based request for master based operation.
|
||||
*/
|
||||
public abstract class MasterNodeRequest<Request extends MasterNodeRequest<Request>> extends ActionRequest {
|
||||
public abstract class MasterNodeRequest<Request extends MasterNodeRequest<Request>> extends LegacyActionRequest {
|
||||
|
||||
/**
|
||||
* The default timeout for master-node requests. It's super-trappy to have such a default, because it makes it all too easy to forget
|
||||
|
@ -29,7 +30,7 @@ public abstract class MasterNodeRequest<Request extends MasterNodeRequest<Reques
|
|||
* that is struggling to process cluster state updates fast enough, and it's a disaster if we cannot extend the master-node timeout in
|
||||
* those cases. We shouldn't use this any more and should work towards removing it.
|
||||
* <p>
|
||||
* For requests which originate in the REST layer, use {@link org.elasticsearch.rest.RestUtils#getMasterNodeTimeout} to determine the
|
||||
* For requests which originate in the REST layer, use {@link RestUtils#getMasterNodeTimeout} to determine the
|
||||
* timeout.
|
||||
* <p>
|
||||
* For internally-generated requests, choose an appropriate timeout. Often this will be {@link #INFINITE_MASTER_NODE_TIMEOUT}, since
|
||||
|
@ -60,7 +61,7 @@ public abstract class MasterNodeRequest<Request extends MasterNodeRequest<Reques
|
|||
* <ul>
|
||||
* <li>
|
||||
* For requests which originate in the REST layer, use
|
||||
* {@link org.elasticsearch.rest.RestUtils#getMasterNodeTimeout} to determine the timeout.
|
||||
* {@link RestUtils#getMasterNodeTimeout} to determine the timeout.
|
||||
* </li>
|
||||
* <li>
|
||||
* For internally-generated requests, choose an appropriate timeout. Often this will be an infinite
|
||||
|
@ -109,7 +110,7 @@ public abstract class MasterNodeRequest<Request extends MasterNodeRequest<Reques
|
|||
* Specifies how long to wait when the master has not been discovered yet, or is disconnected, or is busy processing other tasks. The
|
||||
* value {@link #INFINITE_MASTER_NODE_TIMEOUT} means to wait forever.
|
||||
* <p>
|
||||
* For requests which originate in the REST layer, use {@link org.elasticsearch.rest.RestUtils#getMasterNodeTimeout} to determine the
|
||||
* For requests which originate in the REST layer, use {@link RestUtils#getMasterNodeTimeout} to determine the
|
||||
* timeout.
|
||||
* <p>
|
||||
* For internally-generated requests, choose an appropriate timeout. Often this will be {@link #INFINITE_MASTER_NODE_TIMEOUT} since
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
package org.elasticsearch.action.support.nodes;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.TransportAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
|
@ -23,7 +23,7 @@ import java.io.IOException;
|
|||
import java.util.Arrays;
|
||||
import java.util.Objects;
|
||||
|
||||
public abstract class BaseNodesRequest extends ActionRequest {
|
||||
public abstract class BaseNodesRequest extends LegacyActionRequest {
|
||||
|
||||
/**
|
||||
* Sequence of node specifications that describe the nodes that this request should target. See {@link DiscoveryNodes#resolveNodes} for
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
package org.elasticsearch.action.support.replication;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.admin.indices.refresh.TransportShardRefreshAction;
|
||||
import org.elasticsearch.action.index.IndexRequest;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
|
@ -33,7 +33,9 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
* Requests that are run on a particular replica, first on the primary and then on the replicas like {@link IndexRequest} or
|
||||
* {@link TransportShardRefreshAction}.
|
||||
*/
|
||||
public abstract class ReplicationRequest<Request extends ReplicationRequest<Request>> extends ActionRequest implements IndicesRequest {
|
||||
public abstract class ReplicationRequest<Request extends ReplicationRequest<Request>> extends LegacyActionRequest
|
||||
implements
|
||||
IndicesRequest {
|
||||
|
||||
public static final TimeValue DEFAULT_TIMEOUT = TimeValue.timeValueMinutes(1);
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
package org.elasticsearch.action.support.single.instance;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -24,7 +24,7 @@ import java.io.IOException;
|
|||
|
||||
// TODO: This request and its associated transport action can be folded into UpdateRequest which is its only concrete production code
|
||||
// implementation
|
||||
public abstract class InstanceShardOperationRequest<Request extends InstanceShardOperationRequest<Request>> extends ActionRequest
|
||||
public abstract class InstanceShardOperationRequest<Request extends InstanceShardOperationRequest<Request>> extends LegacyActionRequest
|
||||
implements
|
||||
IndicesRequest {
|
||||
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
package org.elasticsearch.action.support.single.shard;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -23,7 +23,7 @@ import java.io.IOException;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class SingleShardRequest<Request extends SingleShardRequest<Request>> extends ActionRequest
|
||||
public abstract class SingleShardRequest<Request extends SingleShardRequest<Request>> extends LegacyActionRequest
|
||||
implements
|
||||
IndicesRequest.RemoteClusterShardRequest {
|
||||
|
||||
|
@ -31,7 +31,7 @@ public abstract class SingleShardRequest<Request extends SingleShardRequest<Requ
|
|||
|
||||
/**
|
||||
* The concrete index name
|
||||
*
|
||||
* <p>
|
||||
* Whether index property is optional depends on the concrete implementation. If index property is required the
|
||||
* concrete implementation should use {@link #validateNonNullIndex()} to check if the index property has been set
|
||||
*/
|
||||
|
@ -67,9 +67,9 @@ public abstract class SingleShardRequest<Request extends SingleShardRequest<Requ
|
|||
|
||||
/**
|
||||
* @return The concrete index this request is targeted for or <code>null</code> if index is optional.
|
||||
* Whether index property is optional depends on the concrete implementation. If index property
|
||||
* is required the concrete implementation should use {@link #validateNonNullIndex()} to check
|
||||
* if the index property has been set
|
||||
* Whether index property is optional depends on the concrete implementation. If index property
|
||||
* is required the concrete implementation should use {@link #validateNonNullIndex()} to check
|
||||
* if the index property has been set
|
||||
*/
|
||||
@Nullable
|
||||
public String index() {
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
package org.elasticsearch.action.support.tasks;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -27,7 +27,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
/**
|
||||
* A base class for task requests
|
||||
*/
|
||||
public class BaseTasksRequest<Request extends BaseTasksRequest<Request>> extends ActionRequest {
|
||||
public class BaseTasksRequest<Request extends BaseTasksRequest<Request>> extends LegacyActionRequest {
|
||||
|
||||
public static final String[] ALL_ACTIONS = Strings.EMPTY_ARRAY;
|
||||
|
||||
|
@ -103,7 +103,7 @@ public class BaseTasksRequest<Request extends BaseTasksRequest<Request>> extends
|
|||
|
||||
/**
|
||||
* Returns the id of the task that should be processed.
|
||||
*
|
||||
* <p>
|
||||
* By default tasks with any ids are returned.
|
||||
*/
|
||||
public TaskId getTargetTaskId() {
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
package org.elasticsearch.action.synonyms;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
|
@ -42,7 +42,7 @@ public abstract class AbstractSynonymsPagedResultAction<T extends ActionResponse
|
|||
/**
|
||||
* Base request class that includes support for pagination parameters
|
||||
*/
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
private static final int MAX_SYNONYMS_RESULTS = 10_000;
|
||||
private final int from;
|
||||
private final int size;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.synonyms;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -30,7 +30,7 @@ public class DeleteSynonymRuleAction extends ActionType<SynonymUpdateResponse> {
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
private final String synonymsSetId;
|
||||
private final String synonymRuleId;
|
||||
private final boolean refresh;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.synonyms;
|
||||
|
||||
import org.apache.logging.log4j.util.Strings;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -29,7 +29,7 @@ public class DeleteSynonymsAction extends ActionType<AcknowledgedResponse> {
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
private final String synonymsSetId;
|
||||
|
||||
public Request(StreamInput in) throws IOException {
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
package org.elasticsearch.action.synonyms;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -33,7 +33,7 @@ public class GetSynonymRuleAction extends ActionType<GetSynonymRuleAction.Respon
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
private final String synonymsSetId;
|
||||
|
||||
private final String synonymRuleId;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.synonyms;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
|
@ -39,7 +39,7 @@ public class PutSynonymRuleAction extends ActionType<SynonymUpdateResponse> {
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
private final String synonymsSetId;
|
||||
private final SynonymRule synonymRule;
|
||||
private final boolean refresh;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.synonyms;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
|
@ -41,7 +41,7 @@ public class PutSynonymsAction extends ActionType<SynonymUpdateResponse> {
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
private final String synonymsSetId;
|
||||
private final SynonymRule[] synonymRules;
|
||||
private final boolean refresh;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.termvectors;
|
||||
|
||||
import org.elasticsearch.ElasticsearchParseException;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.CompositeIndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.RealtimeRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -30,7 +30,7 @@ import java.util.Set;
|
|||
|
||||
// It's not possible to suppress teh warning at #realtime(boolean) at a method-level.
|
||||
@SuppressWarnings("unchecked")
|
||||
public class MultiTermVectorsRequest extends ActionRequest
|
||||
public class MultiTermVectorsRequest extends LegacyActionRequest
|
||||
implements
|
||||
Iterable<TermVectorsRequest>,
|
||||
CompositeIndicesRequest,
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
package org.elasticsearch.health;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.TransportAction;
|
||||
import org.elasticsearch.client.internal.ParentTaskAssigningClient;
|
||||
|
@ -150,7 +150,7 @@ public class GetHealthAction extends ActionType<GetHealthAction.Response> {
|
|||
}
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
private final String indicatorName;
|
||||
private final boolean verbose;
|
||||
private final int size;
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
package org.elasticsearch.health.node.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.tasks.CancellableTask;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
|
@ -21,7 +21,7 @@ import java.util.Map;
|
|||
/**
|
||||
* This is a base class for all the requests that will be sent to the health node.
|
||||
*/
|
||||
public abstract class HealthNodeRequest extends ActionRequest {
|
||||
public abstract class HealthNodeRequest extends LegacyActionRequest {
|
||||
|
||||
public HealthNodeRequest() {}
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
|
||||
package org.elasticsearch.index.reindex;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.search.SearchRequest;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.action.support.replication.ReplicationRequest;
|
||||
|
@ -30,7 +30,7 @@ import static org.elasticsearch.action.ValidateActions.addValidationError;
|
|||
import static org.elasticsearch.core.TimeValue.timeValueMillis;
|
||||
import static org.elasticsearch.core.TimeValue.timeValueMinutes;
|
||||
|
||||
public abstract class AbstractBulkByScrollRequest<Self extends AbstractBulkByScrollRequest<Self>> extends ActionRequest {
|
||||
public abstract class AbstractBulkByScrollRequest<Self extends AbstractBulkByScrollRequest<Self>> extends LegacyActionRequest {
|
||||
|
||||
public static final int MAX_DOCS_ALL_MATCHES = -1;
|
||||
public static final TimeValue DEFAULT_SCROLL_TIMEOUT = timeValueMinutes(5);
|
||||
|
@ -117,8 +117,8 @@ public abstract class AbstractBulkByScrollRequest<Self extends AbstractBulkByScr
|
|||
* Constructor for actual use.
|
||||
*
|
||||
* @param searchRequest the search request to execute to get the documents to process
|
||||
* @param setDefaults should this request set the defaults on the search request? Usually set to true but leave it false to support
|
||||
* request slicing
|
||||
* @param setDefaults should this request set the defaults on the search request? Usually set to true but leave it false to support
|
||||
* request slicing
|
||||
*/
|
||||
public AbstractBulkByScrollRequest(SearchRequest searchRequest, boolean setDefaults) {
|
||||
this.searchRequest = searchRequest;
|
||||
|
|
|
@ -11,8 +11,8 @@ package org.elasticsearch.index.shard;
|
|||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.resync.ResyncReplicationRequest;
|
||||
import org.elasticsearch.action.resync.ResyncReplicationResponse;
|
||||
import org.elasticsearch.action.resync.TransportResyncReplicationAction;
|
||||
|
@ -374,7 +374,7 @@ public class PrimaryReplicaSyncer {
|
|||
}
|
||||
}
|
||||
|
||||
public static class ResyncRequest extends ActionRequest {
|
||||
public static class ResyncRequest extends LegacyActionRequest {
|
||||
|
||||
private final ShardId shardId;
|
||||
private final String allocationId;
|
||||
|
@ -463,8 +463,8 @@ public class PrimaryReplicaSyncer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public ResyncTask.Status getStatus() {
|
||||
return new ResyncTask.Status(phase, totalOperations, resyncedOperations, skippedOperations);
|
||||
public Status getStatus() {
|
||||
return new Status(phase, totalOperations, resyncedOperations, skippedOperations);
|
||||
}
|
||||
|
||||
public static class Status implements Task.Status {
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -27,7 +27,7 @@ public class StatelessPrimaryRelocationAction {
|
|||
"internal:index/shard/recovery/stateless_primary_relocation"
|
||||
);
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
private final long recoveryId;
|
||||
private final ShardId shardId;
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
package org.elasticsearch.indices.recovery;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
|
@ -26,7 +26,7 @@ public class StatelessUnpromotableRelocationAction {
|
|||
"internal:index/shard/recovery/stateless_unpromotable_relocation"
|
||||
);
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
private final long recoveryId;
|
||||
private final ShardId shardId;
|
||||
private final String targetAllocationId;
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
package org.elasticsearch.repositories;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.HandledTransportAction;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
|
@ -67,7 +67,7 @@ public class VerifyNodeRepositoryAction {
|
|||
}
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
protected final String repository;
|
||||
protected final String verificationToken;
|
||||
|
|
|
@ -81,7 +81,7 @@ public class ActionModuleTests extends ESTestCase {
|
|||
}
|
||||
|
||||
public void testPluginCanRegisterAction() {
|
||||
class FakeRequest extends ActionRequest {
|
||||
class FakeRequest extends LegacyActionRequest {
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
|
|
|
@ -13,6 +13,7 @@ import org.elasticsearch.action.ActionListener;
|
|||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.tasks.Task;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
|
@ -25,7 +26,7 @@ import static org.hamcrest.Matchers.is;
|
|||
|
||||
public class MappedActionFiltersTests extends ESTestCase {
|
||||
|
||||
static class DummyRequest extends ActionRequest {
|
||||
static class DummyRequest extends LegacyActionRequest {
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.support;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.admin.cluster.settings.ClusterUpdateSettingsRequest;
|
||||
import org.elasticsearch.cluster.ClusterName;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
|
@ -124,7 +124,7 @@ public class ReservedStateAwareHandledTransportActionTests extends ESTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
static class DummyRequest extends ActionRequest {
|
||||
static class DummyRequest extends LegacyActionRequest {
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.elasticsearch.action.ActionRequestValidationException;
|
|||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionRunnable;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.util.concurrent.AbstractRunnable;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
|
@ -167,7 +168,7 @@ public class TransportActionFilterChainRefCountingTests extends ESSingleNodeTest
|
|||
}
|
||||
}
|
||||
|
||||
private static class Request extends ActionRequest {
|
||||
private static class Request extends LegacyActionRequest {
|
||||
private final SubscribableListener<Void> closeListeners = new SubscribableListener<>();
|
||||
private final RefCounted refs = LeakTracker.wrap(AbstractRefCounted.of(() -> closeListeners.onResponse(null)));
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import org.elasticsearch.action.ActionRequest;
|
|||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.LatchedActionListener;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
|
@ -288,7 +289,7 @@ public class TransportActionFilterChainTests extends ESTestCase {
|
|||
);
|
||||
}
|
||||
|
||||
public static class TestRequest extends ActionRequest {
|
||||
public static class TestRequest extends LegacyActionRequest {
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
package org.elasticsearch.action.support;
|
||||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.util.concurrent.EsExecutors;
|
||||
|
@ -147,7 +147,7 @@ public class TransportActionTests extends ESTestCase {
|
|||
return transportAction;
|
||||
}
|
||||
|
||||
private static class TestRequest extends ActionRequest {
|
||||
private static class TestRequest extends LegacyActionRequest {
|
||||
@Override
|
||||
public ActionRequestValidationException validate() {
|
||||
return null;
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
package org.elasticsearch.xpack.ccr.action.repositories;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -21,7 +21,7 @@ import java.io.IOException;
|
|||
|
||||
import static org.elasticsearch.xpack.ccr.Ccr.TRANSPORT_VERSION_ACTION_WITH_SHARD_ID;
|
||||
|
||||
public class ClearCcrRestoreSessionRequest extends ActionRequest implements RemoteClusterAwareRequest, IndicesRequest {
|
||||
public class ClearCcrRestoreSessionRequest extends LegacyActionRequest implements RemoteClusterAwareRequest, IndicesRequest {
|
||||
|
||||
private DiscoveryNode node;
|
||||
private final String sessionUUID;
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
|
||||
package org.elasticsearch.xpack.ccr.action.repositories;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.TransportAction;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class DeleteInternalCcrRepositoryRequest extends ActionRequest {
|
||||
public class DeleteInternalCcrRepositoryRequest extends LegacyActionRequest {
|
||||
|
||||
private final String name;
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
package org.elasticsearch.xpack.ccr.action.repositories;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -21,7 +21,7 @@ import java.io.IOException;
|
|||
|
||||
import static org.elasticsearch.xpack.ccr.Ccr.TRANSPORT_VERSION_ACTION_WITH_SHARD_ID;
|
||||
|
||||
public class GetCcrRestoreFileChunkRequest extends ActionRequest implements RemoteClusterAwareRequest, IndicesRequest {
|
||||
public class GetCcrRestoreFileChunkRequest extends LegacyActionRequest implements RemoteClusterAwareRequest, IndicesRequest {
|
||||
|
||||
private final DiscoveryNode node;
|
||||
private final String sessionUUID;
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
|
||||
package org.elasticsearch.xpack.ccr.action.repositories;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.TransportAction;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class PutInternalCcrRepositoryRequest extends ActionRequest {
|
||||
public class PutInternalCcrRepositoryRequest extends LegacyActionRequest {
|
||||
|
||||
private final String name;
|
||||
private final String type;
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
package org.elasticsearch.license;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class GetFeatureUsageRequest extends ActionRequest {
|
||||
public class GetFeatureUsageRequest extends LegacyActionRequest {
|
||||
|
||||
public GetFeatureUsageRequest() {}
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ package org.elasticsearch.protocol.xpack;
|
|||
|
||||
import org.elasticsearch.TransportVersion;
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.license.License;
|
||||
|
@ -21,7 +21,7 @@ import java.util.Locale;
|
|||
/**
|
||||
* Fetch information about X-Pack from the cluster.
|
||||
*/
|
||||
public class XPackInfoRequest extends ActionRequest {
|
||||
public class XPackInfoRequest extends LegacyActionRequest {
|
||||
|
||||
public enum Category {
|
||||
BUILD,
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
package org.elasticsearch.protocol.xpack.graph;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
|
@ -33,7 +33,7 @@ import java.util.List;
|
|||
* Holds the criteria required to guide the exploration of connected terms which
|
||||
* can be returned as a graph.
|
||||
*/
|
||||
public class GraphExploreRequest extends ActionRequest implements IndicesRequest.Replaceable, ToXContentObject {
|
||||
public class GraphExploreRequest extends LegacyActionRequest implements IndicesRequest.Replaceable, ToXContentObject {
|
||||
|
||||
public static final String NO_HOPS_ERROR_MESSAGE = "Graph explore request must have at least one hop";
|
||||
public static final String NO_VERTICES_ERROR_MESSAGE = "Graph explore hop must have at least one VertexRequest";
|
||||
|
@ -158,9 +158,8 @@ public class GraphExploreRequest extends ActionRequest implements IndicesRequest
|
|||
* available but can still overrun due to the nature of their "best efforts"
|
||||
* timeout support. When a timeout occurs partial results are returned.
|
||||
*
|
||||
* @param timeout
|
||||
* a {@link TimeValue} object which determines the maximum length
|
||||
* of time to spend exploring
|
||||
* @param timeout a {@link TimeValue} object which determines the maximum length
|
||||
* of time to spend exploring
|
||||
*/
|
||||
public GraphExploreRequest timeout(TimeValue timeout) {
|
||||
if (timeout == null) {
|
||||
|
@ -212,8 +211,7 @@ public class GraphExploreRequest extends ActionRequest implements IndicesRequest
|
|||
* background frequencies of terms found in the documents
|
||||
* </p>
|
||||
*
|
||||
* @param maxNumberOfDocsPerHop
|
||||
* shard-level sample size in documents
|
||||
* @param maxNumberOfDocsPerHop shard-level sample size in documents
|
||||
*/
|
||||
public void sampleSize(int maxNumberOfDocsPerHop) {
|
||||
sampleSize = maxNumberOfDocsPerHop;
|
||||
|
@ -253,8 +251,7 @@ public class GraphExploreRequest extends ActionRequest implements IndicesRequest
|
|||
* significance (see the {@link SignificantTerms} aggregation) rather than
|
||||
* popularity (using the {@link TermsAggregator}).
|
||||
*
|
||||
* @param value
|
||||
* true if the significant_terms algorithm should be used.
|
||||
* @param value true if the significant_terms algorithm should be used.
|
||||
*/
|
||||
public void useSignificance(boolean value) {
|
||||
this.useSignificance = value;
|
||||
|
@ -268,8 +265,7 @@ public class GraphExploreRequest extends ActionRequest implements IndicesRequest
|
|||
* Return detailed information about vertex frequencies as part of JSON
|
||||
* results - defaults to false
|
||||
*
|
||||
* @param value
|
||||
* true if detailed information is required in JSON responses
|
||||
* @param value true if detailed information is required in JSON responses
|
||||
*/
|
||||
public void returnDetailedInfo(boolean value) {
|
||||
this.returnDetailedInfo = value;
|
||||
|
@ -284,11 +280,10 @@ public class GraphExploreRequest extends ActionRequest implements IndicesRequest
|
|||
* querying elasticsearch to identify terms which can then be connnected to
|
||||
* other terms in a subsequent hop.
|
||||
*
|
||||
* @param guidingQuery
|
||||
* optional choice of query which influences which documents are
|
||||
* considered in this stage
|
||||
* @param guidingQuery optional choice of query which influences which documents are
|
||||
* considered in this stage
|
||||
* @return a {@link Hop} object that holds settings for a stage in the graph
|
||||
* exploration
|
||||
* exploration
|
||||
*/
|
||||
public Hop createNextHop(QueryBuilder guidingQuery) {
|
||||
Hop parent = null;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
package org.elasticsearch.protocol.xpack.watcher;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -18,7 +18,7 @@ import java.io.IOException;
|
|||
/**
|
||||
* A delete watch request to delete an watch by name (id)
|
||||
*/
|
||||
public class DeleteWatchRequest extends ActionRequest {
|
||||
public class DeleteWatchRequest extends LegacyActionRequest {
|
||||
|
||||
private String id;
|
||||
private long version = Versions.MATCH_ANY;
|
||||
|
|
|
@ -6,15 +6,15 @@
|
|||
*/
|
||||
package org.elasticsearch.protocol.xpack.watcher;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.lucene.uid.Versions;
|
||||
import org.elasticsearch.common.xcontent.XContentHelper;
|
||||
import org.elasticsearch.index.seqno.SequenceNumbers;
|
||||
import org.elasticsearch.index.engine.VersionConflictEngineException;
|
||||
import org.elasticsearch.xcontent.XContentType;
|
||||
|
||||
import java.io.IOException;
|
||||
|
@ -28,7 +28,7 @@ import static org.elasticsearch.index.seqno.SequenceNumbers.UNASSIGNED_SEQ_NO;
|
|||
* This request class contains the data needed to create a watch along with the name of the watch.
|
||||
* The name of the watch will become the ID of the indexed document.
|
||||
*/
|
||||
public final class PutWatchRequest extends ActionRequest {
|
||||
public final class PutWatchRequest extends LegacyActionRequest {
|
||||
|
||||
private static final Pattern NO_WS_PATTERN = Pattern.compile("\\S+");
|
||||
|
||||
|
@ -38,7 +38,7 @@ public final class PutWatchRequest extends ActionRequest {
|
|||
private boolean active = true;
|
||||
private long version = Versions.MATCH_ANY;
|
||||
|
||||
private long ifSeqNo = SequenceNumbers.UNASSIGNED_SEQ_NO;
|
||||
private long ifSeqNo = UNASSIGNED_SEQ_NO;
|
||||
private long ifPrimaryTerm = UNASSIGNED_PRIMARY_TERM;
|
||||
|
||||
public PutWatchRequest() {}
|
||||
|
@ -135,9 +135,9 @@ public final class PutWatchRequest extends ActionRequest {
|
|||
/**
|
||||
* only performs this put request if the watch's last modification was assigned the given
|
||||
* sequence number. Must be used in combination with {@link #setIfPrimaryTerm(long)}
|
||||
*
|
||||
* <p>
|
||||
* If the watch's last modification was assigned a different sequence number a
|
||||
* {@link org.elasticsearch.index.engine.VersionConflictEngineException} will be thrown.
|
||||
* {@link VersionConflictEngineException} will be thrown.
|
||||
*/
|
||||
public PutWatchRequest setIfSeqNo(long seqNo) {
|
||||
if (seqNo < 0 && seqNo != UNASSIGNED_SEQ_NO) {
|
||||
|
@ -150,9 +150,9 @@ public final class PutWatchRequest extends ActionRequest {
|
|||
/**
|
||||
* only performs this put request if the watch's last modification was assigned the given
|
||||
* primary term. Must be used in combination with {@link #setIfSeqNo(long)}
|
||||
*
|
||||
* <p>
|
||||
* If the watch last modification was assigned a different term a
|
||||
* {@link org.elasticsearch.index.engine.VersionConflictEngineException} will be thrown.
|
||||
* {@link VersionConflictEngineException} will be thrown.
|
||||
*/
|
||||
public PutWatchRequest setIfPrimaryTerm(long term) {
|
||||
if (term < 0) {
|
||||
|
@ -165,7 +165,7 @@ public final class PutWatchRequest extends ActionRequest {
|
|||
/**
|
||||
* If set, only perform this put watch request if the watch's last modification was assigned this sequence number.
|
||||
* If the watch last last modification was assigned a different sequence number a
|
||||
* {@link org.elasticsearch.index.engine.VersionConflictEngineException} will be thrown.
|
||||
* {@link VersionConflictEngineException} will be thrown.
|
||||
*/
|
||||
public long getIfSeqNo() {
|
||||
return ifSeqNo;
|
||||
|
@ -173,9 +173,9 @@ public final class PutWatchRequest extends ActionRequest {
|
|||
|
||||
/**
|
||||
* If set, only perform this put watch request if the watch's last modification was assigned this primary term.
|
||||
*
|
||||
* <p>
|
||||
* If the watch's last modification was assigned a different term a
|
||||
* {@link org.elasticsearch.index.engine.VersionConflictEngineException} will be thrown.
|
||||
* {@link VersionConflictEngineException} will be thrown.
|
||||
*/
|
||||
public long getIfPrimaryTerm() {
|
||||
return ifPrimaryTerm;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.tasks.CancellableTask;
|
||||
|
@ -19,7 +19,7 @@ import java.io.IOException;
|
|||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
public abstract class AbstractGetResourcesRequest extends ActionRequest {
|
||||
public abstract class AbstractGetResourcesRequest extends LegacyActionRequest {
|
||||
|
||||
private String resourceId;
|
||||
private PageParams pageParams = PageParams.defaultParams();
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.async;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
||||
|
@ -17,7 +17,7 @@ import java.util.Objects;
|
|||
/**
|
||||
* Request for TransportEsqlAsyncStopAction action.
|
||||
*/
|
||||
public class AsyncStopRequest extends ActionRequest {
|
||||
public class AsyncStopRequest extends LegacyActionRequest {
|
||||
private final String id;
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
|
||||
package org.elasticsearch.xpack.core.async;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class DeleteAsyncResultRequest extends ActionRequest {
|
||||
public class DeleteAsyncResultRequest extends LegacyActionRequest {
|
||||
private final String id;
|
||||
|
||||
public DeleteAsyncResultRequest(String id) {
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.async;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.TimeValue;
|
||||
|
@ -15,7 +15,7 @@ import org.elasticsearch.core.TimeValue;
|
|||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class GetAsyncResultRequest extends ActionRequest {
|
||||
public class GetAsyncResultRequest extends LegacyActionRequest {
|
||||
private final String id;
|
||||
private TimeValue waitForCompletionTimeout = TimeValue.MINUS_ONE;
|
||||
private TimeValue keepAlive = TimeValue.MINUS_ONE;
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
package org.elasticsearch.xpack.core.async;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.TimeValue;
|
||||
|
@ -19,12 +19,13 @@ import java.util.Objects;
|
|||
/**
|
||||
* A request class to get a status update of the async search request
|
||||
*/
|
||||
public class GetAsyncStatusRequest extends ActionRequest {
|
||||
public class GetAsyncStatusRequest extends LegacyActionRequest {
|
||||
private final String id;
|
||||
private TimeValue keepAlive = TimeValue.MINUS_ONE;
|
||||
|
||||
/**
|
||||
* Creates a new request
|
||||
*
|
||||
* @param id The id of the search progress request.
|
||||
*/
|
||||
public GetAsyncStatusRequest(String id) {
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
package org.elasticsearch.xpack.core.esql.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.index.query.QueryBuilder;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public abstract class EsqlQueryRequest extends ActionRequest {
|
||||
public abstract class EsqlQueryRequest extends LegacyActionRequest {
|
||||
|
||||
protected EsqlQueryRequest() {}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
package org.elasticsearch.xpack.core.inference.action;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.inference.TaskType;
|
||||
|
@ -21,7 +21,7 @@ import java.util.Objects;
|
|||
* Base class for inference action requests. Tracks request routing state to prevent potential routing loops
|
||||
* and supports both streaming and non-streaming inference operations.
|
||||
*/
|
||||
public abstract class BaseInferenceActionRequest extends ActionRequest {
|
||||
public abstract class BaseInferenceActionRequest extends LegacyActionRequest {
|
||||
|
||||
private boolean hasBeenRerouted;
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
package org.elasticsearch.xpack.core.inference.action;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.bytes.BytesReference;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -38,7 +38,7 @@ public class InferenceActionProxy extends ActionType<InferenceAction.Response> {
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
private final TaskType taskType;
|
||||
private final String inferenceEntityId;
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -40,7 +40,7 @@ public class AuditMlNotificationAction extends ActionType<AcknowledgedResponse>
|
|||
SYSTEM
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
private final AuditType auditType;
|
||||
private final String id;
|
||||
private final String message;
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -43,7 +43,7 @@ public class CancelJobModelSnapshotUpgradeAction extends ActionType<CancelJobMod
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
public static final String ALL = "_all";
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.Nullable;
|
||||
|
@ -33,7 +33,7 @@ public class CoordinatedInferenceAction extends ActionType<InferModelAction.Resp
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
public enum RequestModelType {
|
||||
INFERENCE_SERVICE_MODEL,
|
||||
|
@ -41,7 +41,7 @@ public class CoordinatedInferenceAction extends ActionType<InferModelAction.Resp
|
|||
BOOSTED_TREE_MODEL,
|
||||
NLP_MODEL, // Either an inference service model or ml pytorch model but not a boosted tree model
|
||||
UNKNOWN
|
||||
};
|
||||
}
|
||||
|
||||
public static Request forTextInput(
|
||||
String modelId,
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.TimeValue;
|
||||
|
@ -33,7 +33,7 @@ public class DeleteExpiredDataAction extends ActionType<DeleteExpiredDataAction.
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
public static final ParseField REQUESTS_PER_SECOND = new ParseField("requests_per_second");
|
||||
public static final ParseField TIMEOUT = new ParseField("timeout");
|
||||
|
@ -103,6 +103,7 @@ public class DeleteExpiredDataAction extends ActionType<DeleteExpiredDataAction.
|
|||
/**
|
||||
* Not serialized, the expanded job Ids should only be used
|
||||
* on the executing node.
|
||||
*
|
||||
* @return The expanded Ids in the case where {@code jobId} is not `_all`
|
||||
* otherwise null.
|
||||
*/
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.support.master.AcknowledgedResponse;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -27,7 +27,7 @@ public class DeleteModelSnapshotAction extends ActionType<AcknowledgedResponse>
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
private String jobId;
|
||||
private String snapshotId;
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
|
@ -37,13 +37,13 @@ public class EstimateModelMemoryAction extends ActionType<EstimateModelMemoryAct
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
public static final ParseField ANALYSIS_CONFIG = Job.ANALYSIS_CONFIG;
|
||||
public static final ParseField OVERALL_CARDINALITY = new ParseField("overall_cardinality");
|
||||
public static final ParseField MAX_BUCKET_CARDINALITY = new ParseField("max_bucket_cardinality");
|
||||
|
||||
public static final ObjectParser<Request, Void> PARSER = new ObjectParser<>(NAME, EstimateModelMemoryAction.Request::new);
|
||||
public static final ObjectParser<Request, Void> PARSER = new ObjectParser<>(NAME, Request::new);
|
||||
|
||||
static {
|
||||
PARSER.declareObject(Request::setAnalysisConfig, (p, c) -> AnalysisConfig.STRICT_PARSER.apply(p, c).build(), ANALYSIS_CONFIG);
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
|
@ -49,7 +49,7 @@ public class EvaluateDataFrameAction extends ActionType<EvaluateDataFrameAction.
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
private static final ParseField INDEX = new ParseField("index");
|
||||
private static final ParseField QUERY = new ParseField("query");
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.xcontent.ObjectParser;
|
||||
|
@ -36,7 +36,7 @@ public class GetBucketsAction extends ActionType<GetBucketsAction.Response> {
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
public static final ParseField EXPAND = new ParseField("expand");
|
||||
public static final ParseField EXCLUDE_INTERIM = new ParseField("exclude_interim");
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.action.ValidateActions;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -37,7 +37,7 @@ public class GetCalendarEventsAction extends ActionType<GetCalendarEventsAction.
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
public static final ParseField START = new ParseField("start");
|
||||
public static final ParseField END = new ParseField("end");
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.xcontent.ObjectParser;
|
||||
|
@ -34,7 +34,7 @@ public class GetCalendarsAction extends ActionType<GetCalendarsAction.Response>
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
public static final String ALL = "_all";
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.tasks.CancellableTask;
|
||||
|
@ -42,7 +42,7 @@ public class GetCategoriesAction extends ActionType<GetCategoriesAction.Response
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
public static final ParseField CATEGORY_ID = CategoryDefinition.CATEGORY_ID;
|
||||
public static final ParseField FROM = new ParseField("from");
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.node.DiscoveryNode;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -57,7 +57,7 @@ public class GetDatafeedsStatsAction extends ActionType<GetDatafeedsStatsAction.
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
public static final String ALLOW_NO_MATCH = "allow_no_match";
|
||||
|
||||
|
@ -330,9 +330,7 @@ public class GetDatafeedsStatsAction extends ActionType<GetDatafeedsStatsAction.
|
|||
private GetDatafeedRunningStateAction.Response datafeedRuntimeState;
|
||||
|
||||
public Builder setDatafeedIds(Collection<String> datafeedIds) {
|
||||
this.statsBuilders = datafeedIds.stream()
|
||||
.map(GetDatafeedsStatsAction.Response.DatafeedStats::builder)
|
||||
.collect(Collectors.toList());
|
||||
this.statsBuilders = datafeedIds.stream().map(DatafeedStats::builder).collect(Collectors.toList());
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.xcontent.ObjectParser;
|
||||
|
@ -35,7 +35,7 @@ public class GetInfluencersAction extends ActionType<GetInfluencersAction.Respon
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
public static final ParseField START = new ParseField("start");
|
||||
public static final ParseField END = new ParseField("end");
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.Nullable;
|
||||
|
@ -42,7 +42,7 @@ public class GetModelSnapshotsAction extends ActionType<GetModelSnapshotsAction.
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
public static final ParseField SNAPSHOT_ID = new ParseField("snapshot_id");
|
||||
public static final ParseField SORT = new ParseField("sort");
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.ElasticsearchParseException;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.time.DateMathParser;
|
||||
|
@ -54,7 +54,7 @@ public class GetOverallBucketsAction extends ActionType<GetOverallBucketsAction.
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
public static final ParseField TOP_N = new ParseField("top_n");
|
||||
public static final ParseField BUCKET_SPAN = new ParseField("bucket_span");
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
*/
|
||||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.xcontent.ObjectParser;
|
||||
|
@ -35,7 +35,7 @@ public class GetRecordsAction extends ActionType<GetRecordsAction.Response> {
|
|||
super(NAME);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest implements ToXContentObject {
|
||||
public static class Request extends LegacyActionRequest implements ToXContentObject {
|
||||
|
||||
public static final ParseField START = new ParseField("start");
|
||||
public static final ParseField END = new ParseField("end");
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
package org.elasticsearch.xpack.core.ml.action;
|
||||
|
||||
import org.elasticsearch.TransportVersions;
|
||||
import org.elasticsearch.action.ActionRequest;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.LegacyActionRequest;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.core.TimeValue;
|
||||
|
@ -48,7 +48,7 @@ public class InferModelAction extends ActionType<InferModelAction.Response> {
|
|||
super(name);
|
||||
}
|
||||
|
||||
public static class Request extends ActionRequest {
|
||||
public static class Request extends LegacyActionRequest {
|
||||
|
||||
public static final ParseField ID = new ParseField("id");
|
||||
public static final ParseField DEPLOYMENT_ID = new ParseField("deployment_id");
|
||||
|
@ -57,6 +57,7 @@ public class InferModelAction extends ActionType<InferModelAction.Response> {
|
|||
public static final ParseField INFERENCE_CONFIG = new ParseField("inference_config");
|
||||
|
||||
static final ObjectParser<Builder, Void> PARSER = new ObjectParser<>(NAME, Builder::new);
|
||||
|
||||
static {
|
||||
PARSER.declareString(Builder::setId, ID);
|
||||
PARSER.declareObjectArray(Builder::setDocs, (p, c) -> p.mapOrdered(), DOCS);
|
||||
|
@ -92,23 +93,16 @@ public class InferModelAction extends ActionType<InferModelAction.Response> {
|
|||
private TrainedModelPrefixStrings.PrefixType prefixType = TrainedModelPrefixStrings.PrefixType.NONE;
|
||||
private boolean chunked = false;
|
||||
|
||||
/**
|
||||
* Build a request from a list of documents as maps.
|
||||
* The inference timeout (how long the request waits in
|
||||
* the inference queue for) is set to a high value {@code #DEFAULT_TIMEOUT_FOR_INGEST}
|
||||
* to prefer slow ingest over dropping documents.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Build a request from a list of documents as maps.
|
||||
*
|
||||
* @param id The model Id
|
||||
* @param docs List of document maps
|
||||
* @param update Inference config update
|
||||
* @param id The model Id
|
||||
* @param docs List of document maps
|
||||
* @param update Inference config update
|
||||
* @param previouslyLicensed License has been checked previously
|
||||
* and can now be skipped
|
||||
* @param inferenceTimeout The inference timeout (how long the
|
||||
* request waits in the inference queue for)
|
||||
* @param inferenceTimeout The inference timeout (how long the
|
||||
* request waits in the inference queue for)
|
||||
* @return the new Request
|
||||
*/
|
||||
public static Request forIngestDocs(
|
||||
|
@ -119,7 +113,7 @@ public class InferModelAction extends ActionType<InferModelAction.Response> {
|
|||
TimeValue inferenceTimeout
|
||||
) {
|
||||
return new Request(
|
||||
ExceptionsHelper.requireNonNull(id, InferModelAction.Request.ID),
|
||||
ExceptionsHelper.requireNonNull(id, Request.ID),
|
||||
update,
|
||||
ExceptionsHelper.requireNonNull(Collections.unmodifiableList(docs), DOCS),
|
||||
null,
|
||||
|
@ -132,13 +126,13 @@ public class InferModelAction extends ActionType<InferModelAction.Response> {
|
|||
* Build a request from a list of strings, each string
|
||||
* is one evaluation of the model.
|
||||
*
|
||||
* @param id The model Id
|
||||
* @param update Inference config update
|
||||
* @param textInput Inference input
|
||||
* @param id The model Id
|
||||
* @param update Inference config update
|
||||
* @param textInput Inference input
|
||||
* @param previouslyLicensed License has been checked previously
|
||||
* and can now be skipped
|
||||
* @param inferenceTimeout The inference timeout (how long the
|
||||
* request waits in the inference queue for)
|
||||
* @param inferenceTimeout The inference timeout (how long the
|
||||
* request waits in the inference queue for)
|
||||
* @return the new Request
|
||||
*/
|
||||
public static Request forTextInput(
|
||||
|
@ -294,7 +288,7 @@ public class InferModelAction extends ActionType<InferModelAction.Response> {
|
|||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
InferModelAction.Request that = (InferModelAction.Request) o;
|
||||
Request that = (Request) o;
|
||||
return Objects.equals(id, that.id)
|
||||
&& Objects.equals(update, that.update)
|
||||
&& Objects.equals(previouslyLicensed, that.previouslyLicensed)
|
||||
|
@ -412,7 +406,7 @@ public class InferModelAction extends ActionType<InferModelAction.Response> {
|
|||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
InferModelAction.Response that = (InferModelAction.Response) o;
|
||||
Response that = (Response) o;
|
||||
return isLicensed == that.isLicensed && Objects.equals(inferenceResults, that.inferenceResults) && Objects.equals(id, that.id);
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue