Separate streamable based master node actions (#44313)
This commit creates new base classes for master node actions whose response types still implement Streamable. This simplifies both finding remaining classes to convert, as well as creating new master node actions that use Writeable for their responses. relates #34389
This commit is contained in:
parent
5e73c49ec8
commit
59658daef9
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.allocation;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterInfo;
|
||||
import org.elasticsearch.cluster.ClusterInfoService;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
|
@ -51,7 +51,7 @@ import java.util.List;
|
|||
* master node in the cluster.
|
||||
*/
|
||||
public class TransportClusterAllocationExplainAction
|
||||
extends TransportMasterNodeAction<ClusterAllocationExplainRequest, ClusterAllocationExplainResponse> {
|
||||
extends StreamableTransportMasterNodeAction<ClusterAllocationExplainRequest, ClusterAllocationExplainResponse> {
|
||||
|
||||
private final ClusterInfoService clusterInfoService;
|
||||
private final AllocationDeciders allocationDeciders;
|
||||
|
|
|
@ -67,11 +67,6 @@ public class TransportAddVotingConfigExclusionsAction extends TransportMasterNod
|
|||
return Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AddVotingConfigExclusionsResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AddVotingConfigExclusionsResponse read(StreamInput in) throws IOException {
|
||||
return new AddVotingConfigExclusionsResponse(in);
|
||||
|
|
|
@ -61,11 +61,6 @@ public class TransportClearVotingConfigExclusionsAction
|
|||
return Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClearVotingConfigExclusionsResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClearVotingConfigExclusionsResponse read(StreamInput in) throws IOException {
|
||||
return new ClearVotingConfigExclusionsResponse(in);
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.elasticsearch.action.ActionListener;
|
|||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.ActiveShardCount;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateObserver;
|
||||
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
||||
|
@ -47,7 +47,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
import java.util.function.Predicate;
|
||||
|
||||
public class TransportClusterHealthAction
|
||||
extends TransportMasterNodeReadAction<ClusterHealthRequest, ClusterHealthResponse> {
|
||||
extends StreamableTransportMasterNodeReadAction<ClusterHealthRequest, ClusterHealthResponse> {
|
||||
|
||||
private final GatewayAllocator gatewayAllocator;
|
||||
|
||||
|
|
|
@ -62,11 +62,6 @@ public class TransportDeleteRepositoryAction extends TransportMasterNodeAction<D
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(DeleteRepositoryRequest request, ClusterState state) {
|
||||
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.repositories.get;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -45,7 +45,8 @@ import java.util.Set;
|
|||
/**
|
||||
* Transport action for get repositories operation
|
||||
*/
|
||||
public class TransportGetRepositoriesAction extends TransportMasterNodeReadAction<GetRepositoriesRequest, GetRepositoriesResponse> {
|
||||
public class TransportGetRepositoriesAction extends
|
||||
StreamableTransportMasterNodeReadAction<GetRepositoriesRequest, GetRepositoriesResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportGetRepositoriesAction(TransportService transportService, ClusterService clusterService,
|
||||
|
|
|
@ -62,11 +62,6 @@ public class TransportPutRepositoryAction extends TransportMasterNodeAction<PutR
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(PutRepositoryRequest request, ClusterState state) {
|
||||
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.repositories.verify;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -36,7 +36,8 @@ import org.elasticsearch.transport.TransportService;
|
|||
/**
|
||||
* Transport action for verifying repository operation
|
||||
*/
|
||||
public class TransportVerifyRepositoryAction extends TransportMasterNodeAction<VerifyRepositoryRequest, VerifyRepositoryResponse> {
|
||||
public class TransportVerifyRepositoryAction extends
|
||||
StreamableTransportMasterNodeAction<VerifyRepositoryRequest, VerifyRepositoryResponse> {
|
||||
|
||||
private final RepositoriesService repositoriesService;
|
||||
|
||||
|
|
|
@ -80,11 +80,6 @@ public class TransportClusterRerouteAction extends TransportMasterNodeAction<Clu
|
|||
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterRerouteResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterRerouteResponse read(StreamInput in) throws IOException {
|
||||
return new ClusterRerouteResponse(in);
|
||||
|
|
|
@ -81,12 +81,6 @@ public class TransportClusterUpdateSettingsAction extends
|
|||
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected ClusterUpdateSettingsResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterUpdateSettingsResponse read(StreamInput in) throws IOException {
|
||||
return new ClusterUpdateSettingsResponse(in);
|
||||
|
|
|
@ -46,7 +46,7 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
public class TransportClusterSearchShardsAction extends
|
||||
TransportMasterNodeReadAction<ClusterSearchShardsRequest, ClusterSearchShardsResponse> {
|
||||
TransportMasterNodeReadAction<ClusterSearchShardsRequest, ClusterSearchShardsResponse> {
|
||||
|
||||
private final IndicesService indicesService;
|
||||
|
||||
|
@ -71,11 +71,6 @@ public class TransportClusterSearchShardsAction extends
|
|||
indexNameExpressionResolver.concreteIndexNames(state, request));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterSearchShardsResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterSearchShardsResponse read(StreamInput in) throws IOException {
|
||||
return new ClusterSearchShardsResponse(in);
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.create;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -35,7 +35,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
/**
|
||||
* Transport action for create snapshot operation
|
||||
*/
|
||||
public class TransportCreateSnapshotAction extends TransportMasterNodeAction<CreateSnapshotRequest, CreateSnapshotResponse> {
|
||||
public class TransportCreateSnapshotAction extends StreamableTransportMasterNodeAction<CreateSnapshotRequest, CreateSnapshotResponse> {
|
||||
private final SnapshotsService snapshotsService;
|
||||
|
||||
@Inject
|
||||
|
|
|
@ -61,11 +61,6 @@ public class TransportDeleteSnapshotAction extends TransportMasterNodeAction<Del
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(DeleteSnapshotRequest request, ClusterState state) {
|
||||
// Cluster is not affected but we look up repositories in metadata
|
||||
|
|
|
@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.get;
|
|||
import org.apache.lucene.util.CollectionUtil;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -51,7 +51,7 @@ import java.util.stream.Collectors;
|
|||
/**
|
||||
* Transport Action for get snapshots operation
|
||||
*/
|
||||
public class TransportGetSnapshotsAction extends TransportMasterNodeAction<GetSnapshotsRequest, GetSnapshotsResponse> {
|
||||
public class TransportGetSnapshotsAction extends StreamableTransportMasterNodeAction<GetSnapshotsRequest, GetSnapshotsResponse> {
|
||||
private final SnapshotsService snapshotsService;
|
||||
|
||||
@Inject
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.snapshots.restore;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -35,7 +35,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
/**
|
||||
* Transport action for restore snapshot operation
|
||||
*/
|
||||
public class TransportRestoreSnapshotAction extends TransportMasterNodeAction<RestoreSnapshotRequest, RestoreSnapshotResponse> {
|
||||
public class TransportRestoreSnapshotAction extends StreamableTransportMasterNodeAction<RestoreSnapshotRequest, RestoreSnapshotResponse> {
|
||||
private final RestoreService restoreService;
|
||||
|
||||
@Inject
|
||||
|
|
|
@ -23,7 +23,7 @@ import com.carrotsearch.hppc.cursors.ObjectCursor;
|
|||
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.SnapshotsInProgress;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -56,7 +56,7 @@ import java.util.Set;
|
|||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class TransportSnapshotsStatusAction extends TransportMasterNodeAction<SnapshotsStatusRequest, SnapshotsStatusResponse> {
|
||||
public class TransportSnapshotsStatusAction extends StreamableTransportMasterNodeAction<SnapshotsStatusRequest, SnapshotsStatusResponse> {
|
||||
|
||||
private final SnapshotsService snapshotsService;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.apache.logging.log4j.LogManager;
|
|||
import org.apache.logging.log4j.Logger;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateObserver;
|
||||
import org.elasticsearch.cluster.NotMasterException;
|
||||
|
@ -44,7 +44,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
import java.io.IOException;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
public class TransportClusterStateAction extends TransportMasterNodeReadAction<ClusterStateRequest, ClusterStateResponse> {
|
||||
public class TransportClusterStateAction extends StreamableTransportMasterNodeReadAction<ClusterStateRequest, ClusterStateResponse> {
|
||||
|
||||
private final Logger logger = LogManager.getLogger(getClass());
|
||||
|
||||
|
|
|
@ -59,11 +59,6 @@ public class TransportDeleteStoredScriptAction extends TransportMasterNodeAction
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(DeleteStoredScriptRequest request, ClusterState state,
|
||||
ActionListener<AcknowledgedResponse> listener) throws Exception {
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.storedscripts;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -32,7 +32,7 @@ import org.elasticsearch.script.ScriptService;
|
|||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
public class TransportGetStoredScriptAction extends TransportMasterNodeReadAction<GetStoredScriptRequest,
|
||||
public class TransportGetStoredScriptAction extends StreamableTransportMasterNodeReadAction<GetStoredScriptRequest,
|
||||
GetStoredScriptResponse> {
|
||||
|
||||
private final ScriptService scriptService;
|
||||
|
|
|
@ -59,11 +59,6 @@ public class TransportPutStoredScriptAction extends TransportMasterNodeAction<Pu
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(PutStoredScriptRequest request, ClusterState state,
|
||||
ActionListener<AcknowledgedResponse> listener) throws Exception {
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.cluster.tasks;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -35,7 +35,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
import java.util.List;
|
||||
|
||||
public class TransportPendingClusterTasksAction
|
||||
extends TransportMasterNodeReadAction<PendingClusterTasksRequest, PendingClusterTasksResponse> {
|
||||
extends StreamableTransportMasterNodeReadAction<PendingClusterTasksRequest, PendingClusterTasksResponse> {
|
||||
|
||||
private final ClusterService clusterService;
|
||||
|
||||
|
|
|
@ -89,11 +89,6 @@ public class TransportIndicesAliasesAction extends TransportMasterNodeAction<Ind
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(IndicesAliasesRequest request, ClusterState state) {
|
||||
Set<String> indices = new HashSet<>();
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.alias.exists;
|
|||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -31,7 +31,7 @@ import org.elasticsearch.common.inject.Inject;
|
|||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
public class TransportAliasesExistAction extends TransportMasterNodeReadAction<GetAliasesRequest, AliasesExistResponse> {
|
||||
public class TransportAliasesExistAction extends StreamableTransportMasterNodeReadAction<GetAliasesRequest, AliasesExistResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportAliasesExistAction(TransportService transportService, ClusterService clusterService,
|
||||
|
|
|
@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.alias.get;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -35,7 +35,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class TransportGetAliasesAction extends TransportMasterNodeReadAction<GetAliasesRequest, GetAliasesResponse> {
|
||||
public class TransportGetAliasesAction extends StreamableTransportMasterNodeReadAction<GetAliasesRequest, GetAliasesResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportGetAliasesAction(TransportService transportService, ClusterService clusterService,
|
||||
|
|
|
@ -78,11 +78,6 @@ public class TransportCloseIndexAction extends TransportMasterNodeAction<CloseIn
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CloseIndexResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CloseIndexResponse read(StreamInput in) throws IOException {
|
||||
return new CloseIndexResponse(in);
|
||||
|
|
|
@ -57,11 +57,6 @@ public class TransportCreateIndexAction extends TransportMasterNodeAction<Create
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CreateIndexResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CreateIndexResponse read(StreamInput in) throws IOException {
|
||||
return new CreateIndexResponse(in);
|
||||
|
|
|
@ -72,11 +72,6 @@ public class TransportDeleteIndexAction extends TransportMasterNodeAction<Delete
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doExecute(Task task, DeleteIndexRequest request, ActionListener<AcknowledgedResponse> listener) {
|
||||
destructiveOperations.failDestructive(request.indices());
|
||||
|
|
|
@ -22,7 +22,7 @@ package org.elasticsearch.action.admin.indices.exists.indices;
|
|||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.IndicesOptions;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -36,7 +36,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
/**
|
||||
* Indices exists action.
|
||||
*/
|
||||
public class TransportIndicesExistsAction extends TransportMasterNodeReadAction<IndicesExistsRequest, IndicesExistsResponse> {
|
||||
public class TransportIndicesExistsAction extends StreamableTransportMasterNodeReadAction<IndicesExistsRequest, IndicesExistsResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportIndicesExistsAction(TransportService transportService, ClusterService clusterService,
|
||||
|
|
|
@ -20,7 +20,7 @@ package org.elasticsearch.action.admin.indices.exists.types;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -34,7 +34,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
/**
|
||||
* Types exists transport action.
|
||||
*/
|
||||
public class TransportTypesExistsAction extends TransportMasterNodeReadAction<TypesExistsRequest, TypesExistsResponse> {
|
||||
public class TransportTypesExistsAction extends StreamableTransportMasterNodeReadAction<TypesExistsRequest, TypesExistsResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportTypesExistsAction(TransportService transportService, ClusterService clusterService,
|
||||
|
|
|
@ -77,11 +77,6 @@ public class TransportPutMappingAction extends TransportMasterNodeAction<PutMapp
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(PutMappingRequest request, ClusterState state) {
|
||||
String[] indices;
|
||||
|
|
|
@ -65,11 +65,6 @@ public class TransportOpenIndexAction extends TransportMasterNodeAction<OpenInde
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected OpenIndexResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected OpenIndexResponse read(StreamInput in) throws IOException {
|
||||
return new OpenIndexResponse(in);
|
||||
|
|
|
@ -94,11 +94,6 @@ public class TransportRolloverAction extends TransportMasterNodeAction<RolloverR
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RolloverResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected RolloverResponse read(StreamInput in) throws IOException {
|
||||
return new RolloverResponse(in);
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.settings.get;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -40,7 +40,7 @@ import org.elasticsearch.threadpool.ThreadPool;
|
|||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
|
||||
public class TransportGetSettingsAction extends TransportMasterNodeReadAction<GetSettingsRequest, GetSettingsResponse> {
|
||||
public class TransportGetSettingsAction extends StreamableTransportMasterNodeReadAction<GetSettingsRequest, GetSettingsResponse> {
|
||||
|
||||
private final SettingsFilter settingsFilter;
|
||||
private final IndexScopedSettings indexScopedSettings;
|
||||
|
|
|
@ -81,11 +81,6 @@ public class TransportUpdateSettingsAction extends TransportMasterNodeAction<Upd
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(final UpdateSettingsRequest request, final ClusterState state,
|
||||
final ActionListener<AcknowledgedResponse> listener) {
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.apache.lucene.util.CollectionUtil;
|
|||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.FailedNodeException;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -62,7 +62,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
|||
* indices and fetches store information from all the nodes using {@link TransportNodesListGatewayStartedShards}
|
||||
*/
|
||||
public class TransportIndicesShardStoresAction
|
||||
extends TransportMasterNodeReadAction<IndicesShardStoresRequest, IndicesShardStoresResponse> {
|
||||
extends StreamableTransportMasterNodeReadAction<IndicesShardStoresRequest, IndicesShardStoresResponse> {
|
||||
|
||||
private final TransportNodesListGatewayStartedShards listShardStoresInfo;
|
||||
|
||||
|
|
|
@ -82,11 +82,6 @@ public class TransportResizeAction extends TransportMasterNodeAction<ResizeReque
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResizeResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResizeResponse read(StreamInput in) throws IOException {
|
||||
return new ResizeResponse(in);
|
||||
|
|
|
@ -64,11 +64,6 @@ public class TransportDeleteIndexTemplateAction
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(DeleteIndexTemplateRequest request, ClusterState state) {
|
||||
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.admin.indices.template.get;
|
|||
import com.carrotsearch.hppc.cursors.ObjectObjectCursor;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -37,7 +37,8 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class TransportGetIndexTemplatesAction extends TransportMasterNodeReadAction<GetIndexTemplatesRequest, GetIndexTemplatesResponse> {
|
||||
public class TransportGetIndexTemplatesAction extends
|
||||
StreamableTransportMasterNodeReadAction<GetIndexTemplatesRequest, GetIndexTemplatesResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportGetIndexTemplatesAction(TransportService transportService, ClusterService clusterService,
|
||||
|
|
|
@ -69,11 +69,6 @@ public class TransportPutIndexTemplateAction extends TransportMasterNodeAction<P
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(PutIndexTemplateRequest request, ClusterState state) {
|
||||
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
|
||||
|
|
|
@ -67,11 +67,6 @@ public class TransportUpgradeSettingsAction extends TransportMasterNodeAction<Up
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(final UpgradeSettingsRequest request, final ClusterState state,
|
||||
final ActionListener<AcknowledgedResponse> listener) {
|
||||
|
|
|
@ -57,14 +57,9 @@ public class DeletePipelineTransportAction extends TransportMasterNodeAction<Del
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(DeletePipelineRequest request, ClusterState state,
|
||||
ActionListener<AcknowledgedResponse> listener) throws Exception {
|
||||
ActionListener<AcknowledgedResponse> listener) throws Exception {
|
||||
ingestService.delete(request, listener);
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.ingest;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -32,7 +32,7 @@ import org.elasticsearch.ingest.IngestService;
|
|||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
public class GetPipelineTransportAction extends TransportMasterNodeReadAction<GetPipelineRequest, GetPipelineResponse> {
|
||||
public class GetPipelineTransportAction extends StreamableTransportMasterNodeReadAction<GetPipelineRequest, GetPipelineResponse> {
|
||||
|
||||
@Inject
|
||||
public GetPipelineTransportAction(ThreadPool threadPool, ClusterService clusterService,
|
||||
|
|
|
@ -69,11 +69,6 @@ public class PutPipelineTransportAction extends TransportMasterNodeAction<PutPip
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(PutPipelineRequest request, ClusterState state, ActionListener<AcknowledgedResponse> listener)
|
||||
throws Exception {
|
||||
|
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.support.master;
|
||||
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@Deprecated
|
||||
public abstract class StreamableTransportMasterNodeAction<Request extends MasterNodeRequest<Request>, Response extends ActionResponse>
|
||||
extends TransportMasterNodeAction<Request, Response> {
|
||||
|
||||
protected StreamableTransportMasterNodeAction(String actionName, TransportService transportService,
|
||||
ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver, Supplier<Request> request) {
|
||||
super(actionName, transportService, clusterService, threadPool,
|
||||
actionFilters, indexNameExpressionResolver, request);
|
||||
}
|
||||
|
||||
protected StreamableTransportMasterNodeAction(String actionName, TransportService transportService,
|
||||
ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters,
|
||||
Writeable.Reader<Request> request, IndexNameExpressionResolver indexNameExpressionResolver) {
|
||||
super(actionName, transportService, clusterService, threadPool, actionFilters, request, indexNameExpressionResolver);
|
||||
}
|
||||
|
||||
protected StreamableTransportMasterNodeAction(String actionName, boolean canTripCircuitBreaker,
|
||||
TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
|
||||
ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver,
|
||||
Supplier<Request> request) {
|
||||
super(actionName, canTripCircuitBreaker, transportService, clusterService, threadPool,
|
||||
actionFilters, indexNameExpressionResolver, request);
|
||||
}
|
||||
|
||||
protected StreamableTransportMasterNodeAction(String actionName, boolean canTripCircuitBreaker,
|
||||
TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
|
||||
ActionFilters actionFilters, Writeable.Reader<Request> request,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver) {
|
||||
super(actionName, canTripCircuitBreaker, transportService, clusterService, threadPool,
|
||||
actionFilters, request, indexNameExpressionResolver);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new response instance. Typically this is used for serialization using the
|
||||
* {@link org.elasticsearch.common.io.stream.Streamable#readFrom(StreamInput)} method.
|
||||
*/
|
||||
protected abstract Response newResponse();
|
||||
|
||||
@Override
|
||||
protected final Response read(StreamInput in) throws IOException {
|
||||
Response response = newResponse();
|
||||
response.readFrom(in);
|
||||
return response;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* Licensed to Elasticsearch under one or more contributor
|
||||
* license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright
|
||||
* ownership. Elasticsearch licenses this file to you under
|
||||
* the Apache License, Version 2.0 (the "License"); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.action.support.master;
|
||||
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@Deprecated
|
||||
public abstract class StreamableTransportMasterNodeReadAction<Request extends MasterNodeReadRequest<Request>,
|
||||
Response extends ActionResponse> extends TransportMasterNodeReadAction<Request, Response> {
|
||||
|
||||
protected StreamableTransportMasterNodeReadAction(String actionName, TransportService transportService,
|
||||
ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver, Supplier<Request> request) {
|
||||
super(actionName, transportService, clusterService, threadPool, actionFilters, indexNameExpressionResolver, request);
|
||||
}
|
||||
|
||||
protected StreamableTransportMasterNodeReadAction(String actionName, TransportService transportService,
|
||||
ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters,
|
||||
Writeable.Reader<Request> request,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver) {
|
||||
super(actionName, transportService, clusterService, threadPool, actionFilters, request, indexNameExpressionResolver);
|
||||
}
|
||||
|
||||
protected StreamableTransportMasterNodeReadAction(String actionName, boolean checkSizeLimit, TransportService transportService,
|
||||
ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver, Supplier<Request> request) {
|
||||
super(actionName, checkSizeLimit, transportService, clusterService, threadPool,
|
||||
actionFilters, indexNameExpressionResolver, request);
|
||||
}
|
||||
|
||||
protected StreamableTransportMasterNodeReadAction(String actionName, boolean checkSizeLimit, TransportService transportService,
|
||||
ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters,
|
||||
Writeable.Reader<Request> request,
|
||||
IndexNameExpressionResolver indexNameExpressionResolver) {
|
||||
super(actionName, checkSizeLimit, transportService, clusterService, threadPool,
|
||||
actionFilters, request, indexNameExpressionResolver);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a new response instance. Typically this is used for serialization using the
|
||||
* {@link org.elasticsearch.common.io.stream.Streamable#readFrom(StreamInput)} method.
|
||||
*/
|
||||
protected abstract Response newResponse();
|
||||
|
||||
@Override
|
||||
protected final Response read(StreamInput in) throws IOException {
|
||||
Response response = newResponse();
|
||||
response.readFrom(in);
|
||||
return response;
|
||||
}
|
||||
}
|
|
@ -37,7 +37,6 @@ import org.elasticsearch.cluster.node.DiscoveryNode;
|
|||
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.Streamable;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.common.unit.TimeValue;
|
||||
import org.elasticsearch.discovery.MasterNotDiscoveredException;
|
||||
|
@ -103,20 +102,7 @@ public abstract class TransportMasterNodeAction<Request extends MasterNodeReques
|
|||
|
||||
protected abstract String executor();
|
||||
|
||||
/**
|
||||
* @deprecated new implementors should override {@link #read(StreamInput)} and use the
|
||||
* {@link Writeable.Reader} interface.
|
||||
* @return a new response instance. Typically this is used for serialization using the
|
||||
* {@link Streamable#readFrom(StreamInput)} method.
|
||||
*/
|
||||
@Deprecated
|
||||
protected abstract Response newResponse();
|
||||
|
||||
protected Response read(StreamInput in) throws IOException {
|
||||
Response response = newResponse();
|
||||
response.readFrom(in);
|
||||
return response;
|
||||
}
|
||||
protected abstract Response read(StreamInput in) throws IOException;
|
||||
|
||||
protected abstract void masterOperation(Request request, ClusterState state, ActionListener<Response> listener) throws Exception;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ package org.elasticsearch.action.support.master.info;
|
|||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
import org.elasticsearch.cluster.service.ClusterService;
|
||||
|
@ -31,7 +31,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
|
||||
|
||||
public abstract class TransportClusterInfoAction<Request extends ClusterInfoRequest<Request>, Response extends ActionResponse>
|
||||
extends TransportMasterNodeReadAction<Request, Response> {
|
||||
extends StreamableTransportMasterNodeReadAction<Request, Response> {
|
||||
|
||||
public TransportClusterInfoAction(String actionName, TransportService transportService,
|
||||
ClusterService clusterService, ThreadPool threadPool, ActionFilters actionFilters,
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.elasticsearch.action.StreamableResponseActionType;
|
|||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder;
|
||||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.client.ElasticsearchClient;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -130,7 +130,7 @@ public class CompletionPersistentTaskAction extends StreamableResponseActionType
|
|||
}
|
||||
}
|
||||
|
||||
public static class TransportAction extends TransportMasterNodeAction<Request, PersistentTaskResponse> {
|
||||
public static class TransportAction extends StreamableTransportMasterNodeAction<Request, PersistentTaskResponse> {
|
||||
|
||||
private final PersistentTasksClusterService persistentTasksClusterService;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.elasticsearch.action.StreamableResponseActionType;
|
|||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder;
|
||||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.client.ElasticsearchClient;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -115,7 +115,7 @@ public class RemovePersistentTaskAction extends StreamableResponseActionType<Per
|
|||
|
||||
}
|
||||
|
||||
public static class TransportAction extends TransportMasterNodeAction<Request, PersistentTaskResponse> {
|
||||
public static class TransportAction extends StreamableTransportMasterNodeAction<Request, PersistentTaskResponse> {
|
||||
|
||||
private final PersistentTasksClusterService persistentTasksClusterService;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.elasticsearch.action.StreamableResponseActionType;
|
|||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder;
|
||||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.client.ElasticsearchClient;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -186,7 +186,7 @@ public class StartPersistentTaskAction extends StreamableResponseActionType<Pers
|
|||
|
||||
}
|
||||
|
||||
public static class TransportAction extends TransportMasterNodeAction<Request, PersistentTaskResponse> {
|
||||
public static class TransportAction extends StreamableTransportMasterNodeAction<Request, PersistentTaskResponse> {
|
||||
|
||||
private final PersistentTasksClusterService persistentTasksClusterService;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.elasticsearch.action.StreamableResponseActionType;
|
|||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.MasterNodeOperationRequestBuilder;
|
||||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.client.ElasticsearchClient;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -145,7 +145,7 @@ public class UpdatePersistentTaskStatusAction extends StreamableResponseActionTy
|
|||
}
|
||||
}
|
||||
|
||||
public static class TransportAction extends TransportMasterNodeAction<Request, PersistentTaskResponse> {
|
||||
public static class TransportAction extends StreamableTransportMasterNodeAction<Request, PersistentTaskResponse> {
|
||||
|
||||
private final PersistentTasksClusterService persistentTasksClusterService;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.elasticsearch.action.ActionRequestValidationException;
|
|||
import org.elasticsearch.action.ActionResponse;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterChangedEvent;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateListener;
|
||||
|
@ -614,7 +614,7 @@ public class SnapshotShardsService extends AbstractLifecycleComponent implements
|
|||
}
|
||||
|
||||
private class UpdateSnapshotStatusAction
|
||||
extends TransportMasterNodeAction<UpdateIndexShardSnapshotStatusRequest, UpdateIndexShardSnapshotStatusResponse> {
|
||||
extends StreamableTransportMasterNodeAction<UpdateIndexShardSnapshotStatusRequest, UpdateIndexShardSnapshotStatusResponse> {
|
||||
UpdateSnapshotStatusAction(TransportService transportService, ClusterService clusterService,
|
||||
ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver) {
|
||||
super(
|
||||
|
|
|
@ -159,7 +159,7 @@ public class TransportMasterNodeActionTests extends ESTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
class Action extends TransportMasterNodeAction<Request, Response> {
|
||||
class Action extends StreamableTransportMasterNodeAction<Request, Response> {
|
||||
Action(String actionName, TransportService transportService, ClusterService clusterService,
|
||||
ThreadPool threadPool) {
|
||||
super(actionName, transportService, clusterService, threadPool,
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.elasticsearch.action.ActionResponse;
|
|||
import org.elasticsearch.action.StreamableResponseActionType;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.MasterNodeRequest;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.ClusterStateUpdateTask;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -123,7 +123,7 @@ public class InternalOrPrivateSettingsPlugin extends Plugin implements ActionPlu
|
|||
}
|
||||
|
||||
public static class TransportUpdateInternalOrPrivateAction
|
||||
extends TransportMasterNodeAction<UpdateInternalOrPrivateAction.Request, UpdateInternalOrPrivateAction.Response> {
|
||||
extends StreamableTransportMasterNodeAction<UpdateInternalOrPrivateAction.Request, UpdateInternalOrPrivateAction.Response> {
|
||||
|
||||
@Inject
|
||||
public TransportUpdateInternalOrPrivateAction(
|
||||
|
|
|
@ -67,11 +67,6 @@ public class TransportCcrStatsAction extends TransportMasterNodeAction<CcrStatsA
|
|||
return Ccr.CCR_THREAD_POOL_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CcrStatsAction.Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected CcrStatsAction.Response read(StreamInput in) throws IOException {
|
||||
return new CcrStatsAction.Response(in);
|
||||
|
|
|
@ -51,11 +51,6 @@ public class TransportDeleteAutoFollowPatternAction extends
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(DeleteAutoFollowPatternAction.Request request,
|
||||
ClusterState state,
|
||||
|
|
|
@ -22,9 +22,9 @@ import org.elasticsearch.threadpool.ThreadPool;
|
|||
import org.elasticsearch.transport.TransportService;
|
||||
import org.elasticsearch.xpack.ccr.Ccr;
|
||||
import org.elasticsearch.xpack.core.ccr.action.FollowInfoAction;
|
||||
import org.elasticsearch.xpack.core.ccr.action.FollowParameters;
|
||||
import org.elasticsearch.xpack.core.ccr.action.FollowInfoAction.Response.FollowerInfo;
|
||||
import org.elasticsearch.xpack.core.ccr.action.FollowInfoAction.Response.Status;
|
||||
import org.elasticsearch.xpack.core.ccr.action.FollowParameters;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
@ -47,11 +47,6 @@ public class TransportFollowInfoAction extends TransportMasterNodeReadAction<Fol
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FollowInfoAction.Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FollowInfoAction.Response read(StreamInput in) throws IOException {
|
||||
return new FollowInfoAction.Response(in);
|
||||
|
|
|
@ -46,11 +46,6 @@ public class TransportGetAutoFollowPatternAction
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GetAutoFollowPatternAction.Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected GetAutoFollowPatternAction.Response read(StreamInput in) throws IOException {
|
||||
return new GetAutoFollowPatternAction.Response(in);
|
||||
|
|
|
@ -54,11 +54,6 @@ public class TransportPauseFollowAction extends TransportMasterNodeAction<PauseF
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(PauseFollowAction.Request request,
|
||||
ClusterState state,
|
||||
|
|
|
@ -70,11 +70,6 @@ public class TransportPutAutoFollowPatternAction extends
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(PutAutoFollowPatternAction.Request request,
|
||||
ClusterState state,
|
||||
|
|
|
@ -82,11 +82,6 @@ public final class TransportPutFollowAction
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PutFollowAction.Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PutFollowAction.Response read(StreamInput in) throws IOException {
|
||||
return new PutFollowAction.Response(in);
|
||||
|
|
|
@ -108,11 +108,6 @@ public class TransportResumeFollowAction extends TransportMasterNodeAction<Resum
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(ResumeFollowAction.Request request, ClusterState state) {
|
||||
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
|
||||
|
|
|
@ -79,11 +79,6 @@ public class TransportUnfollowAction extends TransportMasterNodeAction<UnfollowA
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(
|
||||
final UnfollowAction.Request request,
|
||||
|
|
|
@ -47,11 +47,6 @@ public class TransportDeleteLicenseAction extends TransportMasterNodeAction<Dele
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(DeleteLicenseRequest request, ClusterState state) {
|
||||
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.license;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -17,7 +17,7 @@ import org.elasticsearch.common.inject.Inject;
|
|||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
public class TransportGetBasicStatusAction extends TransportMasterNodeReadAction<GetBasicStatusRequest, GetBasicStatusResponse> {
|
||||
public class TransportGetBasicStatusAction extends StreamableTransportMasterNodeReadAction<GetBasicStatusRequest, GetBasicStatusResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportGetBasicStatusAction(TransportService transportService, ClusterService clusterService,
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.elasticsearch.license;
|
|||
import org.elasticsearch.ElasticsearchException;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -19,7 +19,7 @@ import org.elasticsearch.protocol.xpack.license.GetLicenseRequest;
|
|||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
public class TransportGetLicenseAction extends TransportMasterNodeReadAction<GetLicenseRequest, GetLicenseResponse> {
|
||||
public class TransportGetLicenseAction extends StreamableTransportMasterNodeReadAction<GetLicenseRequest, GetLicenseResponse> {
|
||||
|
||||
private final LicenseService licenseService;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.license;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -17,7 +17,7 @@ import org.elasticsearch.common.inject.Inject;
|
|||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
public class TransportGetTrialStatusAction extends TransportMasterNodeReadAction<GetTrialStatusRequest, GetTrialStatusResponse> {
|
||||
public class TransportGetTrialStatusAction extends StreamableTransportMasterNodeReadAction<GetTrialStatusRequest, GetTrialStatusResponse> {
|
||||
|
||||
@Inject
|
||||
public TransportGetTrialStatusAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
|
||||
|
|
|
@ -38,11 +38,6 @@ public class TransportPostStartBasicAction extends TransportMasterNodeAction<Pos
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PostStartBasicResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PostStartBasicResponse read(StreamInput in) throws IOException {
|
||||
return new PostStartBasicResponse(in);
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.license;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -17,7 +17,7 @@ import org.elasticsearch.common.inject.Inject;
|
|||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
|
||||
public class TransportPostStartTrialAction extends TransportMasterNodeAction<PostStartTrialRequest, PostStartTrialResponse> {
|
||||
public class TransportPostStartTrialAction extends StreamableTransportMasterNodeAction<PostStartTrialRequest, PostStartTrialResponse> {
|
||||
|
||||
private final LicenseService licenseService;
|
||||
|
||||
|
|
|
@ -40,11 +40,6 @@ public class TransportPutLicenseAction extends TransportMasterNodeAction<PutLice
|
|||
return ThreadPool.Names.MANAGEMENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PutLicenseResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PutLicenseResponse read(StreamInput in) throws IOException {
|
||||
return new PutLicenseResponse(in);
|
||||
|
|
|
@ -7,9 +7,9 @@ package org.elasticsearch.xpack.core.action;
|
|||
|
||||
import org.apache.logging.log4j.message.ParameterizedMessage;
|
||||
import org.elasticsearch.ResourceNotFoundException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.ActionRequestValidationException;
|
||||
import org.elasticsearch.action.ActionType;
|
||||
import org.elasticsearch.action.IndicesRequest;
|
||||
import org.elasticsearch.action.admin.indices.close.CloseIndexClusterStateUpdateRequest;
|
||||
import org.elasticsearch.action.admin.indices.close.CloseIndexResponse;
|
||||
|
@ -85,11 +85,6 @@ public final class TransportFreezeIndexAction extends
|
|||
super.doExecute(task, request, listener);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FreezeResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FreezeResponse read(StreamInput in) throws IOException {
|
||||
return new FreezeResponse(in);
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.xpack.core.action;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
||||
|
@ -28,7 +28,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import java.util.concurrent.atomic.AtomicReferenceArray;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
public class TransportXPackUsageAction extends TransportMasterNodeAction<XPackUsageRequest, XPackUsageResponse> {
|
||||
public class TransportXPackUsageAction extends StreamableTransportMasterNodeAction<XPackUsageRequest, XPackUsageResponse> {
|
||||
|
||||
private final List<XPackFeatureSet> featureSets;
|
||||
|
||||
|
|
|
@ -54,12 +54,8 @@ public class TransportDeleteDataFrameTransformAction extends TransportMasterNode
|
|||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(Request request, ClusterState state, ActionListener<AcknowledgedResponse> listener) throws Exception {
|
||||
protected void masterOperation(Request request, ClusterState state,
|
||||
ActionListener<AcknowledgedResponse> listener) throws Exception {
|
||||
PersistentTasksCustomMetaData pTasksMeta = state.getMetaData().custom(PersistentTasksCustomMetaData.TYPE);
|
||||
if (pTasksMeta != null && pTasksMeta.getTask(request.getId()) != null) {
|
||||
listener.onFailure(new ElasticsearchStatusException("Cannot delete data frame [" + request.getId() +
|
||||
|
|
|
@ -57,7 +57,7 @@ import java.util.Map;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
public class TransportPutDataFrameTransformAction
|
||||
extends TransportMasterNodeAction<PutDataFrameTransformAction.Request, AcknowledgedResponse> {
|
||||
extends TransportMasterNodeAction<Request, AcknowledgedResponse> {
|
||||
|
||||
private final XPackLicenseState licenseState;
|
||||
private final Client client;
|
||||
|
@ -91,11 +91,6 @@ public class TransportPutDataFrameTransformAction
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(Request request, ClusterState clusterState, ActionListener<AcknowledgedResponse> listener)
|
||||
throws Exception {
|
||||
|
|
|
@ -86,11 +86,6 @@ public class TransportStartDataFrameTransformAction extends
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected StartDataFrameTransformAction.Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected StartDataFrameTransformAction.Response read(StreamInput in) throws IOException {
|
||||
return new StartDataFrameTransformAction.Response(in);
|
||||
|
|
|
@ -10,7 +10,7 @@ import org.apache.logging.log4j.Logger;
|
|||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.FailedNodeException;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.client.node.NodeClient;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -41,7 +41,7 @@ import static org.elasticsearch.xpack.deprecation.DeprecationChecks.CLUSTER_SETT
|
|||
import static org.elasticsearch.xpack.deprecation.DeprecationChecks.INDEX_SETTINGS_CHECKS;
|
||||
import static org.elasticsearch.xpack.deprecation.DeprecationChecks.ML_SETTINGS_CHECKS;
|
||||
|
||||
public class TransportDeprecationInfoAction extends TransportMasterNodeReadAction<DeprecationInfoAction.Request,
|
||||
public class TransportDeprecationInfoAction extends StreamableTransportMasterNodeReadAction<DeprecationInfoAction.Request,
|
||||
DeprecationInfoAction.Response> {
|
||||
private static final Logger logger = LogManager.getLogger(TransportDeprecationInfoAction.class);
|
||||
|
||||
|
|
|
@ -53,11 +53,6 @@ public class TransportDeleteLifecycleAction extends TransportMasterNodeAction<Re
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Response read(StreamInput in) throws IOException {
|
||||
return new Response(in);
|
||||
|
|
|
@ -9,7 +9,7 @@ package org.elasticsearch.xpack.indexlifecycle.action;
|
|||
import org.elasticsearch.ResourceNotFoundException;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -30,7 +30,7 @@ import java.util.Arrays;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class TransportGetLifecycleAction extends TransportMasterNodeAction<Request, Response> {
|
||||
public class TransportGetLifecycleAction extends StreamableTransportMasterNodeAction<Request, Response> {
|
||||
|
||||
@Inject
|
||||
public TransportGetLifecycleAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.elasticsearch.xpack.indexlifecycle.action;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -23,7 +23,7 @@ import org.elasticsearch.xpack.core.indexlifecycle.action.GetStatusAction;
|
|||
import org.elasticsearch.xpack.core.indexlifecycle.action.GetStatusAction.Request;
|
||||
import org.elasticsearch.xpack.core.indexlifecycle.action.GetStatusAction.Response;
|
||||
|
||||
public class TransportGetStatusAction extends TransportMasterNodeAction<Request, Response> {
|
||||
public class TransportGetStatusAction extends StreamableTransportMasterNodeAction<Request, Response> {
|
||||
|
||||
@Inject
|
||||
public TransportGetStatusAction(TransportService transportService, ClusterService clusterService, ThreadPool threadPool,
|
||||
|
|
|
@ -47,11 +47,6 @@ public class TransportMoveToStepAction extends TransportMasterNodeAction<Request
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Response read(StreamInput in) throws IOException {
|
||||
return new Response(in);
|
||||
|
|
|
@ -53,11 +53,6 @@ public class TransportPutLifecycleAction extends TransportMasterNodeAction<Reque
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Response read(StreamInput in) throws IOException {
|
||||
return new Response(in);
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.elasticsearch.xpack.indexlifecycle.action;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.AckedClusterStateUpdateTask;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -27,7 +27,7 @@ import org.elasticsearch.xpack.indexlifecycle.IndexLifecycleRunner;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TransportRemoveIndexLifecyclePolicyAction extends TransportMasterNodeAction<Request, Response> {
|
||||
public class TransportRemoveIndexLifecyclePolicyAction extends StreamableTransportMasterNodeAction<Request, Response> {
|
||||
|
||||
@Inject
|
||||
public TransportRemoveIndexLifecyclePolicyAction(TransportService transportService, ClusterService clusterService,
|
||||
|
|
|
@ -47,11 +47,6 @@ public class TransportRetryAction extends TransportMasterNodeAction<Request, Res
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Response newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Response read(StreamInput in) throws IOException {
|
||||
return new Response(in);
|
||||
|
|
|
@ -46,11 +46,6 @@ public class TransportStartILMAction extends TransportMasterNodeAction<StartILMR
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(StartILMRequest request, ClusterState state, ActionListener<AcknowledgedResponse> listener) {
|
||||
clusterService.submitStateUpdateTask("ilm_operation_mode_update",
|
||||
|
|
|
@ -46,11 +46,6 @@ public class TransportStopILMAction extends TransportMasterNodeAction<StopILMReq
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(StopILMRequest request, ClusterState state, ActionListener<AcknowledgedResponse> listener) {
|
||||
clusterService.submitStateUpdateTask("ilm_operation_mode_update",
|
||||
|
|
|
@ -64,11 +64,6 @@ public class TransportDeleteDataFrameAnalyticsAction
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse read(StreamInput in) throws IOException {
|
||||
return new AcknowledgedResponse(in);
|
||||
|
|
|
@ -72,11 +72,6 @@ public class TransportDeleteDatafeedAction extends TransportMasterNodeAction<Del
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(DeleteDatafeedAction.Request request, ClusterState state,
|
||||
ActionListener<AcknowledgedResponse> listener) {
|
||||
|
|
|
@ -50,11 +50,11 @@ import org.elasticsearch.tasks.Task;
|
|||
import org.elasticsearch.tasks.TaskId;
|
||||
import org.elasticsearch.threadpool.ThreadPool;
|
||||
import org.elasticsearch.transport.TransportService;
|
||||
import org.elasticsearch.xpack.core.action.util.PageParams;
|
||||
import org.elasticsearch.xpack.core.ml.MlTasks;
|
||||
import org.elasticsearch.xpack.core.ml.action.DeleteJobAction;
|
||||
import org.elasticsearch.xpack.core.ml.action.GetModelSnapshotsAction;
|
||||
import org.elasticsearch.xpack.core.ml.action.KillProcessAction;
|
||||
import org.elasticsearch.xpack.core.action.util.PageParams;
|
||||
import org.elasticsearch.xpack.core.ml.job.config.Job;
|
||||
import org.elasticsearch.xpack.core.ml.job.config.JobState;
|
||||
import org.elasticsearch.xpack.core.ml.job.config.JobTaskState;
|
||||
|
@ -139,11 +139,6 @@ public class TransportDeleteJobAction extends TransportMasterNodeAction<DeleteJo
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(DeleteJobAction.Request request, ClusterState state) {
|
||||
return state.blocks().globalBlockedException(ClusterBlockLevel.METADATA_WRITE);
|
||||
|
|
|
@ -60,11 +60,6 @@ public class TransportFinalizeJobExecutionAction extends TransportMasterNodeActi
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(FinalizeJobExecutionAction.Request request, ClusterState state,
|
||||
ActionListener<AcknowledgedResponse> listener) {
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.action;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -32,7 +32,8 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class TransportGetDatafeedsAction extends TransportMasterNodeReadAction<GetDatafeedsAction.Request, GetDatafeedsAction.Response> {
|
||||
public class TransportGetDatafeedsAction extends
|
||||
StreamableTransportMasterNodeReadAction<GetDatafeedsAction.Request, GetDatafeedsAction.Response> {
|
||||
|
||||
private final DatafeedConfigProvider datafeedConfigProvider;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.action;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -30,7 +30,7 @@ import org.elasticsearch.xpack.ml.job.persistence.JobResultsProvider;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class TransportGetDatafeedsStatsAction extends TransportMasterNodeReadAction<GetDatafeedsStatsAction.Request,
|
||||
public class TransportGetDatafeedsStatsAction extends StreamableTransportMasterNodeReadAction<GetDatafeedsStatsAction.Request,
|
||||
GetDatafeedsStatsAction.Response> {
|
||||
|
||||
private final DatafeedConfigProvider datafeedConfigProvider;
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.action;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeReadAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeReadAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -19,7 +19,7 @@ import org.elasticsearch.transport.TransportService;
|
|||
import org.elasticsearch.xpack.core.ml.action.GetJobsAction;
|
||||
import org.elasticsearch.xpack.ml.job.JobManager;
|
||||
|
||||
public class TransportGetJobsAction extends TransportMasterNodeReadAction<GetJobsAction.Request, GetJobsAction.Response> {
|
||||
public class TransportGetJobsAction extends StreamableTransportMasterNodeReadAction<GetJobsAction.Request, GetJobsAction.Response> {
|
||||
|
||||
private final JobManager jobManager;
|
||||
|
||||
|
|
|
@ -196,11 +196,6 @@ public class TransportOpenJobAction extends TransportMasterNodeAction<OpenJobAct
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ClusterBlockException checkBlock(OpenJobAction.Request request, ClusterState state) {
|
||||
// We only delegate here to PersistentTasksService, but if there is a metadata writeblock,
|
||||
|
|
|
@ -11,7 +11,7 @@ import org.elasticsearch.ElasticsearchException;
|
|||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.search.SearchAction;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -60,7 +60,7 @@ import java.util.Map;
|
|||
import static org.elasticsearch.xpack.core.ClientHelper.ML_ORIGIN;
|
||||
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
|
||||
|
||||
public class TransportPutDatafeedAction extends TransportMasterNodeAction<PutDatafeedAction.Request, PutDatafeedAction.Response> {
|
||||
public class TransportPutDatafeedAction extends StreamableTransportMasterNodeAction<PutDatafeedAction.Request, PutDatafeedAction.Response> {
|
||||
|
||||
private static final Logger logger = LogManager.getLogger(TransportPutDatafeedAction.class);
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.action;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockLevel;
|
||||
|
@ -24,7 +24,7 @@ import org.elasticsearch.xpack.core.XPackField;
|
|||
import org.elasticsearch.xpack.core.ml.action.PutJobAction;
|
||||
import org.elasticsearch.xpack.ml.job.JobManager;
|
||||
|
||||
public class TransportPutJobAction extends TransportMasterNodeAction<PutJobAction.Request, PutJobAction.Response> {
|
||||
public class TransportPutJobAction extends StreamableTransportMasterNodeAction<PutJobAction.Request, PutJobAction.Response> {
|
||||
|
||||
private final JobManager jobManager;
|
||||
private final XPackLicenseState licenseState;
|
||||
|
|
|
@ -8,7 +8,7 @@ package org.elasticsearch.xpack.ml.action;
|
|||
import org.elasticsearch.ResourceNotFoundException;
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -36,7 +36,7 @@ import org.elasticsearch.xpack.ml.job.persistence.JobResultsProvider;
|
|||
import java.util.Date;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class TransportRevertModelSnapshotAction extends TransportMasterNodeAction<RevertModelSnapshotAction.Request,
|
||||
public class TransportRevertModelSnapshotAction extends StreamableTransportMasterNodeAction<RevertModelSnapshotAction.Request,
|
||||
RevertModelSnapshotAction.Response> {
|
||||
|
||||
private final Client client;
|
||||
|
|
|
@ -81,11 +81,6 @@ public class TransportSetUpgradeModeAction extends TransportMasterNodeAction<Set
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(SetUpgradeModeAction.Request request, ClusterState state, ActionListener<AcknowledgedResponse> listener)
|
||||
throws Exception {
|
||||
|
|
|
@ -110,11 +110,6 @@ public class TransportStartDataFrameAnalyticsAction
|
|||
return ThreadPool.Names.SAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse read(StreamInput in) throws IOException {
|
||||
return new AcknowledgedResponse(in);
|
||||
|
|
|
@ -145,11 +145,6 @@ public class TransportStartDatafeedAction extends TransportMasterNodeAction<Star
|
|||
return new AcknowledgedResponse(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AcknowledgedResponse newResponse() {
|
||||
throw new UnsupportedOperationException("usage of Streamable is to be replaced by Writeable");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void masterOperation(StartDatafeedAction.Request request, ClusterState state,
|
||||
ActionListener<AcknowledgedResponse> listener) {
|
||||
|
|
|
@ -7,7 +7,7 @@ package org.elasticsearch.xpack.ml.action;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.support.ActionFilters;
|
||||
import org.elasticsearch.action.support.master.TransportMasterNodeAction;
|
||||
import org.elasticsearch.action.support.master.StreamableTransportMasterNodeAction;
|
||||
import org.elasticsearch.client.Client;
|
||||
import org.elasticsearch.cluster.ClusterState;
|
||||
import org.elasticsearch.cluster.block.ClusterBlockException;
|
||||
|
@ -36,7 +36,8 @@ import org.elasticsearch.xpack.ml.job.persistence.JobDataDeleter;
|
|||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
|
||||
public class TransportUpdateDatafeedAction extends TransportMasterNodeAction<UpdateDatafeedAction.Request, PutDatafeedAction.Response> {
|
||||
public class TransportUpdateDatafeedAction extends
|
||||
StreamableTransportMasterNodeAction<UpdateDatafeedAction.Request, PutDatafeedAction.Response> {
|
||||
|
||||
private final Client client;
|
||||
private final DatafeedConfigProvider datafeedConfigProvider;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue