Module org.elasticsearch.server
Class MetadataDataStreamsService
java.lang.Object
org.elasticsearch.cluster.metadata.MetadataDataStreamsService
Handles data stream modification requests.
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataDataStreamsService(ClusterService clusterService, IndicesService indicesService, DataStreamGlobalRetentionSettings globalRetentionSettings) -
Method Summary
Modifier and TypeMethodDescriptionstatic ClusterStatedeleteDataStreams(ProjectState projectState, Set<DataStream> dataStreams, Settings settings) Removes the given data stream and their backing indices from the Project State.voidmodifyDataStream(ProjectId projectId, ModifyDataStreamsAction.Request request, ActionListener<AcknowledgedResponse> listener) voidremoveDataStreamOptions(ProjectId projectId, List<String> dataStreamNames, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to remove the data stream options from the requested data streams.voidremoveLifecycle(ProjectId projectId, List<String> dataStreamNames, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to remove the lifecycle from the requested data streams.voidsetDataStreamOptions(ProjectId projectId, List<String> dataStreamNames, DataStreamOptions options, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to set the provided data stream options to the requested data streams.voidsetLifecycle(ProjectId projectId, List<String> dataStreamNames, DataStreamLifecycle lifecycle, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to set the lifecycle to the requested data streams.voidsetRolloverOnWrite(ProjectId projectId, String dataStreamName, boolean rolloverOnWrite, boolean targetFailureStore, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to signal that the next time this data stream receives a document, it will be rolled over.static ClusterStatesetRolloverOnWrite(ProjectState currentState, String dataStreamName, boolean rolloverOnWrite, boolean targetFailureStore) Creates an updated cluster state in which the requested data stream has the flagDataStream.rolloverOnWrite()set to the value of the parameter rolloverOnWritevoidupdateSettings(ProjectId projectId, TimeValue masterNodeTimeout, TimeValue ackTimeout, String dataStreamName, Settings settingsOverrides, boolean dryRun, ActionListener<DataStream> listener)
-
Constructor Details
-
MetadataDataStreamsService
public MetadataDataStreamsService(ClusterService clusterService, IndicesService indicesService, DataStreamGlobalRetentionSettings globalRetentionSettings)
-
-
Method Details
-
modifyDataStream
public void modifyDataStream(ProjectId projectId, ModifyDataStreamsAction.Request request, ActionListener<AcknowledgedResponse> listener) -
setLifecycle
public void setLifecycle(ProjectId projectId, List<String> dataStreamNames, DataStreamLifecycle lifecycle, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to set the lifecycle to the requested data streams. -
removeLifecycle
public void removeLifecycle(ProjectId projectId, List<String> dataStreamNames, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to remove the lifecycle from the requested data streams. -
setDataStreamOptions
public void setDataStreamOptions(ProjectId projectId, List<String> dataStreamNames, DataStreamOptions options, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to set the provided data stream options to the requested data streams. -
removeDataStreamOptions
public void removeDataStreamOptions(ProjectId projectId, List<String> dataStreamNames, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to remove the data stream options from the requested data streams. -
setRolloverOnWrite
public void setRolloverOnWrite(ProjectId projectId, String dataStreamName, boolean rolloverOnWrite, boolean targetFailureStore, TimeValue ackTimeout, TimeValue masterTimeout, ActionListener<AcknowledgedResponse> listener) Submits the task to signal that the next time this data stream receives a document, it will be rolled over. -
setRolloverOnWrite
public static ClusterState setRolloverOnWrite(ProjectState currentState, String dataStreamName, boolean rolloverOnWrite, boolean targetFailureStore) Creates an updated cluster state in which the requested data stream has the flagDataStream.rolloverOnWrite()set to the value of the parameter rolloverOnWrite- Parameters:
currentState- the initial project statedataStreamName- the name of the data stream to be updatedrolloverOnWrite- the value of the flagtargetFailureStore- whether this rollover targets the failure store or the backing indices- Returns:
- the updated cluster state
-
updateSettings
public void updateSettings(ProjectId projectId, TimeValue masterNodeTimeout, TimeValue ackTimeout, String dataStreamName, Settings settingsOverrides, boolean dryRun, ActionListener<DataStream> listener) -
deleteDataStreams
public static ClusterState deleteDataStreams(ProjectState projectState, Set<DataStream> dataStreams, Settings settings) Removes the given data stream and their backing indices from the Project State.- Parameters:
projectState- The project statedataStreams- The data streams to removesettings- The settings- Returns:
- The updated Project State
-