|
21 | 21 |
|
22 | 22 | import org.apache.logging.log4j.LogManager;
|
23 | 23 | import org.apache.logging.log4j.Logger;
|
24 |
| -import org.elasticsearch.Build; |
25 | 24 | import org.elasticsearch.action.admin.cluster.allocation.ClusterAllocationExplainAction;
|
26 | 25 | import org.elasticsearch.action.admin.cluster.allocation.TransportClusterAllocationExplainAction;
|
27 | 26 | import org.elasticsearch.action.admin.cluster.configuration.AddVotingConfigExclusionsAction;
|
@@ -415,21 +414,6 @@ public class ActionModule extends AbstractModule {
|
415 | 414 |
|
416 | 415 | private static final Logger logger = LogManager.getLogger(ActionModule.class);
|
417 | 416 |
|
418 |
| - public static final boolean DATASTREAMS_FEATURE_ENABLED; |
419 |
| - |
420 |
| - static { |
421 |
| - final String property = System.getProperty("es.datastreams_feature_enabled"); |
422 |
| - if (Build.CURRENT.isSnapshot() || "true".equals(property)) { |
423 |
| - DATASTREAMS_FEATURE_ENABLED = true; |
424 |
| - } else if ("false".equals(property) || property == null) { |
425 |
| - DATASTREAMS_FEATURE_ENABLED = false; |
426 |
| - } else { |
427 |
| - throw new IllegalArgumentException( |
428 |
| - "expected es.datastreams_feature_enabled to be unset or [true|false] but was [" + property + "]" |
429 |
| - ); |
430 |
| - } |
431 |
| - } |
432 |
| - |
433 | 417 | private final Settings settings;
|
434 | 418 | private final IndexNameExpressionResolver indexNameExpressionResolver;
|
435 | 419 | private final IndexScopedSettings indexScopedSettings;
|
@@ -616,13 +600,11 @@ public <Request extends ActionRequest, Response extends ActionResponse> void reg
|
616 | 600 | actionPlugins.stream().flatMap(p -> p.getActions().stream()).forEach(actions::register);
|
617 | 601 |
|
618 | 602 | // Data streams:
|
619 |
| - if (DATASTREAMS_FEATURE_ENABLED) { |
620 |
| - actions.register(CreateDataStreamAction.INSTANCE, CreateDataStreamAction.TransportAction.class); |
621 |
| - actions.register(DeleteDataStreamAction.INSTANCE, DeleteDataStreamAction.TransportAction.class); |
622 |
| - actions.register(GetDataStreamAction.INSTANCE, GetDataStreamAction.TransportAction.class); |
623 |
| - actions.register(ResolveIndexAction.INSTANCE, ResolveIndexAction.TransportAction.class); |
624 |
| - actions.register(DataStreamsStatsAction.INSTANCE, DataStreamsStatsAction.TransportAction.class); |
625 |
| - } |
| 603 | + actions.register(CreateDataStreamAction.INSTANCE, CreateDataStreamAction.TransportAction.class); |
| 604 | + actions.register(DeleteDataStreamAction.INSTANCE, DeleteDataStreamAction.TransportAction.class); |
| 605 | + actions.register(GetDataStreamAction.INSTANCE, GetDataStreamAction.TransportAction.class); |
| 606 | + actions.register(ResolveIndexAction.INSTANCE, ResolveIndexAction.TransportAction.class); |
| 607 | + actions.register(DataStreamsStatsAction.INSTANCE, DataStreamsStatsAction.TransportAction.class); |
626 | 608 |
|
627 | 609 | // Persistent tasks:
|
628 | 610 | actions.register(StartPersistentTaskAction.INSTANCE, StartPersistentTaskAction.TransportAction.class);
|
@@ -793,13 +775,11 @@ public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
|
793 | 775 | registerHandler.accept(new RestDeleteDanglingIndexAction());
|
794 | 776 |
|
795 | 777 | // Data Stream API
|
796 |
| - if (DATASTREAMS_FEATURE_ENABLED) { |
797 |
| - registerHandler.accept(new RestCreateDataStreamAction()); |
798 |
| - registerHandler.accept(new RestDeleteDataStreamAction()); |
799 |
| - registerHandler.accept(new RestGetDataStreamsAction()); |
800 |
| - registerHandler.accept(new RestResolveIndexAction()); |
801 |
| - registerHandler.accept(new RestDataStreamsStatsAction()); |
802 |
| - } |
| 778 | + registerHandler.accept(new RestCreateDataStreamAction()); |
| 779 | + registerHandler.accept(new RestDeleteDataStreamAction()); |
| 780 | + registerHandler.accept(new RestGetDataStreamsAction()); |
| 781 | + registerHandler.accept(new RestResolveIndexAction()); |
| 782 | + registerHandler.accept(new RestDataStreamsStatsAction()); |
803 | 783 |
|
804 | 784 | // CAT API
|
805 | 785 | registerHandler.accept(new RestAllocationAction());
|
|
0 commit comments