|
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;
|
@@ -416,21 +415,6 @@ public class ActionModule extends AbstractModule {
|
416 | 415 | private static final Logger logger = LogManager.getLogger(ActionModule.class);
|
417 | 416 |
|
418 | 417 | private final boolean transportClient;
|
419 |
| - public static final boolean DATASTREAMS_FEATURE_ENABLED; |
420 |
| - |
421 |
| - static { |
422 |
| - final String property = System.getProperty("es.datastreams_feature_enabled"); |
423 |
| - if (Build.CURRENT.isSnapshot() || "true".equals(property)) { |
424 |
| - DATASTREAMS_FEATURE_ENABLED = true; |
425 |
| - } else if ("false".equals(property) || property == null) { |
426 |
| - DATASTREAMS_FEATURE_ENABLED = false; |
427 |
| - } else { |
428 |
| - throw new IllegalArgumentException( |
429 |
| - "expected es.datastreams_feature_enabled to be unset or [true|false] but was [" + property + "]" |
430 |
| - ); |
431 |
| - } |
432 |
| - } |
433 |
| - |
434 | 418 | private final Settings settings;
|
435 | 419 | private final IndexNameExpressionResolver indexNameExpressionResolver;
|
436 | 420 | private final IndexScopedSettings indexScopedSettings;
|
@@ -627,13 +611,11 @@ public <Request extends ActionRequest, Response extends ActionResponse> void reg
|
627 | 611 | actionPlugins.stream().flatMap(p -> p.getActions().stream()).forEach(actions::register);
|
628 | 612 |
|
629 | 613 | // Data streams:
|
630 |
| - if (DATASTREAMS_FEATURE_ENABLED) { |
631 |
| - actions.register(CreateDataStreamAction.INSTANCE, CreateDataStreamAction.TransportAction.class); |
632 |
| - actions.register(DeleteDataStreamAction.INSTANCE, DeleteDataStreamAction.TransportAction.class); |
633 |
| - actions.register(GetDataStreamAction.INSTANCE, GetDataStreamAction.TransportAction.class); |
634 |
| - actions.register(ResolveIndexAction.INSTANCE, ResolveIndexAction.TransportAction.class); |
635 |
| - actions.register(DataStreamsStatsAction.INSTANCE, DataStreamsStatsAction.TransportAction.class); |
636 |
| - } |
| 614 | + actions.register(CreateDataStreamAction.INSTANCE, CreateDataStreamAction.TransportAction.class); |
| 615 | + actions.register(DeleteDataStreamAction.INSTANCE, DeleteDataStreamAction.TransportAction.class); |
| 616 | + actions.register(GetDataStreamAction.INSTANCE, GetDataStreamAction.TransportAction.class); |
| 617 | + actions.register(ResolveIndexAction.INSTANCE, ResolveIndexAction.TransportAction.class); |
| 618 | + actions.register(DataStreamsStatsAction.INSTANCE, DataStreamsStatsAction.TransportAction.class); |
637 | 619 |
|
638 | 620 | // Persistent tasks:
|
639 | 621 | 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