Module org.elasticsearch.server
Class TransportGetSampleConfigurationAction
java.lang.Object
org.elasticsearch.action.support.TransportAction<GetSampleConfigurationAction.Request,GetSampleConfigurationAction.Response>
org.elasticsearch.action.support.local.TransportLocalClusterStateAction<GetSampleConfigurationAction.Request,GetSampleConfigurationAction.Response>
org.elasticsearch.action.support.local.TransportLocalProjectMetadataAction<GetSampleConfigurationAction.Request,GetSampleConfigurationAction.Response>
org.elasticsearch.action.admin.indices.sampling.TransportGetSampleConfigurationAction
public class TransportGetSampleConfigurationAction
extends TransportLocalProjectMetadataAction<GetSampleConfigurationAction.Request,GetSampleConfigurationAction.Response>
Transport action for retrieving sampling configuration for an index.
This action retrieves the sampling configuration from the project metadata's custom sampling metadata. If no configuration exists for the specified index, a response with null configuration is returned.
-
Field Summary
Fields inherited from class org.elasticsearch.action.support.local.TransportLocalClusterStateAction
clusterService, executorFields inherited from class org.elasticsearch.action.support.TransportAction
actionName, taskManager -
Constructor Summary
ConstructorsConstructorDescriptionTransportGetSampleConfigurationAction(ActionFilters actionFilters, TransportService transportService, ClusterService clusterService, ProjectResolver projectResolver, IndexNameExpressionResolver indexNameExpressionResolver) Constructs a new TransportGetSampleConfigurationAction. -
Method Summary
Modifier and TypeMethodDescriptionprotected ClusterBlockExceptioncheckBlock(GetSampleConfigurationAction.Request request, ProjectState state) Checks for cluster blocks that would prevent this operation from executing.protected voidlocalClusterStateOperation(Task task, GetSampleConfigurationAction.Request request, ProjectState state, ActionListener<GetSampleConfigurationAction.Response> listener) Executes the get sampling configuration operation against the local cluster state.Methods inherited from class org.elasticsearch.action.support.local.TransportLocalProjectMetadataAction
checkBlock, localClusterStateOperationMethods inherited from class org.elasticsearch.action.support.local.TransportLocalClusterStateAction
doExecuteMethods inherited from class org.elasticsearch.action.support.TransportAction
execute, executeDirect, localOnly
-
Constructor Details
-
TransportGetSampleConfigurationAction
@Inject public TransportGetSampleConfigurationAction(ActionFilters actionFilters, TransportService transportService, ClusterService clusterService, ProjectResolver projectResolver, IndexNameExpressionResolver indexNameExpressionResolver) Constructs a new TransportGetSampleConfigurationAction.- Parameters:
actionFilters- the action filters to applytransportService- the transport serviceclusterService- the cluster serviceprojectResolver- the project resolverindexNameExpressionResolver- the index name expression resolver for resolving index names
-
-
Method Details
-
localClusterStateOperation
protected void localClusterStateOperation(Task task, GetSampleConfigurationAction.Request request, ProjectState state, ActionListener<GetSampleConfigurationAction.Response> listener) Executes the get sampling configuration operation against the local cluster state.Retrieves the sampling configuration for the specified index from the project metadata. Returns null configuration if no sampling metadata exists or if no configuration is set for the index.
- Specified by:
localClusterStateOperationin classTransportLocalProjectMetadataAction<GetSampleConfigurationAction.Request,GetSampleConfigurationAction.Response> - Parameters:
task- the task executing this operationrequest- the get sampling configuration request containing the index namestate- the current project statelistener- the listener to notify with the response or failure
-
checkBlock
protected ClusterBlockException checkBlock(GetSampleConfigurationAction.Request request, ProjectState state) Checks for cluster blocks that would prevent this operation from executing.- Specified by:
checkBlockin classTransportLocalProjectMetadataAction<GetSampleConfigurationAction.Request,GetSampleConfigurationAction.Response> - Parameters:
request- the get sampling configuration requeststate- the current project state- Returns:
- a cluster block exception if the operation is blocked, null otherwise
-