|
@@ -20,7 +20,6 @@ import org.elasticsearch.action.datastreams.ModifyDataStreamsAction;
|
|
|
import org.elasticsearch.action.datastreams.PromoteDataStreamAction;
|
|
|
import org.elasticsearch.client.internal.Client;
|
|
|
import org.elasticsearch.client.internal.OriginSettingClient;
|
|
|
-import org.elasticsearch.cluster.metadata.DataStreamLifecycle;
|
|
|
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
|
|
import org.elasticsearch.cluster.node.DiscoveryNodes;
|
|
|
import org.elasticsearch.cluster.routing.allocation.AllocationService;
|
|
@@ -140,12 +139,9 @@ public class DataStreamsPlugin extends Plugin implements ActionPlugin {
|
|
|
List<Setting<?>> pluginSettings = new ArrayList<>();
|
|
|
pluginSettings.add(TIME_SERIES_POLL_INTERVAL);
|
|
|
pluginSettings.add(LOOK_AHEAD_TIME);
|
|
|
-
|
|
|
- if (DataStreamLifecycle.isFeatureEnabled()) {
|
|
|
- pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_LIFECYCLE_POLL_INTERVAL_SETTING);
|
|
|
- pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_MERGE_POLICY_TARGET_FLOOR_SEGMENT_SETTING);
|
|
|
- pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_MERGE_POLICY_TARGET_FACTOR_SETTING);
|
|
|
- }
|
|
|
+ pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_LIFECYCLE_POLL_INTERVAL_SETTING);
|
|
|
+ pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_MERGE_POLICY_TARGET_FLOOR_SEGMENT_SETTING);
|
|
|
+ pluginSettings.add(DataStreamLifecycleService.DATA_STREAM_MERGE_POLICY_TARGET_FACTOR_SETTING);
|
|
|
return pluginSettings;
|
|
|
}
|
|
|
|
|
@@ -171,24 +167,21 @@ public class DataStreamsPlugin extends Plugin implements ActionPlugin {
|
|
|
var updateTimeSeriesRangeService = new UpdateTimeSeriesRangeService(environment.settings(), threadPool, clusterService);
|
|
|
this.updateTimeSeriesRangeService.set(updateTimeSeriesRangeService);
|
|
|
components.add(this.updateTimeSeriesRangeService.get());
|
|
|
-
|
|
|
- if (DataStreamLifecycle.isFeatureEnabled()) {
|
|
|
- errorStoreInitialisationService.set(new DataStreamLifecycleErrorStore());
|
|
|
- dataLifecycleInitialisationService.set(
|
|
|
- new DataStreamLifecycleService(
|
|
|
- settings,
|
|
|
- new OriginSettingClient(client, DATA_STREAM_LIFECYCLE_ORIGIN),
|
|
|
- clusterService,
|
|
|
- getClock(),
|
|
|
- threadPool,
|
|
|
- threadPool::absoluteTimeInMillis,
|
|
|
- errorStoreInitialisationService.get()
|
|
|
- )
|
|
|
- );
|
|
|
- dataLifecycleInitialisationService.get().init();
|
|
|
- components.add(errorStoreInitialisationService.get());
|
|
|
- components.add(dataLifecycleInitialisationService.get());
|
|
|
- }
|
|
|
+ errorStoreInitialisationService.set(new DataStreamLifecycleErrorStore());
|
|
|
+ dataLifecycleInitialisationService.set(
|
|
|
+ new DataStreamLifecycleService(
|
|
|
+ settings,
|
|
|
+ new OriginSettingClient(client, DATA_STREAM_LIFECYCLE_ORIGIN),
|
|
|
+ clusterService,
|
|
|
+ getClock(),
|
|
|
+ threadPool,
|
|
|
+ threadPool::absoluteTimeInMillis,
|
|
|
+ errorStoreInitialisationService.get()
|
|
|
+ )
|
|
|
+ );
|
|
|
+ dataLifecycleInitialisationService.get().init();
|
|
|
+ components.add(errorStoreInitialisationService.get());
|
|
|
+ components.add(dataLifecycleInitialisationService.get());
|
|
|
return components;
|
|
|
}
|
|
|
|
|
@@ -202,13 +195,10 @@ public class DataStreamsPlugin extends Plugin implements ActionPlugin {
|
|
|
actions.add(new ActionHandler<>(MigrateToDataStreamAction.INSTANCE, MigrateToDataStreamTransportAction.class));
|
|
|
actions.add(new ActionHandler<>(PromoteDataStreamAction.INSTANCE, PromoteDataStreamTransportAction.class));
|
|
|
actions.add(new ActionHandler<>(ModifyDataStreamsAction.INSTANCE, ModifyDataStreamsTransportAction.class));
|
|
|
-
|
|
|
- if (DataStreamLifecycle.isFeatureEnabled()) {
|
|
|
- actions.add(new ActionHandler<>(PutDataStreamLifecycleAction.INSTANCE, TransportPutDataStreamLifecycleAction.class));
|
|
|
- actions.add(new ActionHandler<>(GetDataStreamLifecycleAction.INSTANCE, TransportGetDataStreamLifecycleAction.class));
|
|
|
- actions.add(new ActionHandler<>(DeleteDataStreamLifecycleAction.INSTANCE, TransportDeleteDataStreamLifecycleAction.class));
|
|
|
- actions.add(new ActionHandler<>(ExplainDataStreamLifecycleAction.INSTANCE, TransportExplainDataStreamLifecycleAction.class));
|
|
|
- }
|
|
|
+ actions.add(new ActionHandler<>(PutDataStreamLifecycleAction.INSTANCE, TransportPutDataStreamLifecycleAction.class));
|
|
|
+ actions.add(new ActionHandler<>(GetDataStreamLifecycleAction.INSTANCE, TransportGetDataStreamLifecycleAction.class));
|
|
|
+ actions.add(new ActionHandler<>(DeleteDataStreamLifecycleAction.INSTANCE, TransportDeleteDataStreamLifecycleAction.class));
|
|
|
+ actions.add(new ActionHandler<>(ExplainDataStreamLifecycleAction.INSTANCE, TransportExplainDataStreamLifecycleAction.class));
|
|
|
return actions;
|
|
|
}
|
|
|
|
|
@@ -234,13 +224,10 @@ public class DataStreamsPlugin extends Plugin implements ActionPlugin {
|
|
|
handlers.add(new RestMigrateToDataStreamAction());
|
|
|
handlers.add(new RestPromoteDataStreamAction());
|
|
|
handlers.add(new RestModifyDataStreamsAction());
|
|
|
-
|
|
|
- if (DataStreamLifecycle.isFeatureEnabled()) {
|
|
|
- handlers.add(new RestPutDataStreamLifecycleAction());
|
|
|
- handlers.add(new RestGetDataStreamLifecycleAction());
|
|
|
- handlers.add(new RestDeleteDataStreamLifecycleAction());
|
|
|
- handlers.add(new RestExplainDataStreamLifecycleAction());
|
|
|
- }
|
|
|
+ handlers.add(new RestPutDataStreamLifecycleAction());
|
|
|
+ handlers.add(new RestGetDataStreamLifecycleAction());
|
|
|
+ handlers.add(new RestDeleteDataStreamLifecycleAction());
|
|
|
+ handlers.add(new RestExplainDataStreamLifecycleAction());
|
|
|
return handlers;
|
|
|
}
|
|
|
|