|
19 | 19 | import org.elasticsearch.action.datastreams.MigrateToDataStreamAction;
|
20 | 20 | import org.elasticsearch.action.datastreams.ModifyDataStreamsAction;
|
21 | 21 | import org.elasticsearch.action.datastreams.PromoteDataStreamAction;
|
22 |
| -import org.elasticsearch.action.datastreams.ReindexDataStreamAction; |
23 | 22 | import org.elasticsearch.action.datastreams.lifecycle.ExplainDataStreamLifecycleAction;
|
24 | 23 | import org.elasticsearch.action.datastreams.lifecycle.GetDataStreamLifecycleAction;
|
25 | 24 | import org.elasticsearch.action.datastreams.lifecycle.PutDataStreamLifecycleAction;
|
26 |
| -import org.elasticsearch.client.internal.Client; |
27 | 25 | import org.elasticsearch.client.internal.OriginSettingClient;
|
28 | 26 | import org.elasticsearch.cluster.metadata.DataStream;
|
29 | 27 | import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
|
30 | 28 | import org.elasticsearch.cluster.node.DiscoveryNodes;
|
31 |
| -import org.elasticsearch.cluster.service.ClusterService; |
32 | 29 | import org.elasticsearch.common.io.stream.NamedWriteableRegistry;
|
33 | 30 | import org.elasticsearch.common.settings.ClusterSettings;
|
34 | 31 | import org.elasticsearch.common.settings.IndexScopedSettings;
|
35 | 32 | import org.elasticsearch.common.settings.Setting;
|
36 | 33 | import org.elasticsearch.common.settings.Settings;
|
37 | 34 | import org.elasticsearch.common.settings.SettingsFilter;
|
38 |
| -import org.elasticsearch.common.settings.SettingsModule; |
39 | 35 | import org.elasticsearch.core.IOUtils;
|
40 | 36 | import org.elasticsearch.core.TimeValue;
|
41 | 37 | import org.elasticsearch.datastreams.action.CreateDataStreamTransportAction;
|
|
44 | 40 | import org.elasticsearch.datastreams.action.MigrateToDataStreamTransportAction;
|
45 | 41 | import org.elasticsearch.datastreams.action.ModifyDataStreamsTransportAction;
|
46 | 42 | import org.elasticsearch.datastreams.action.PromoteDataStreamTransportAction;
|
47 |
| -import org.elasticsearch.datastreams.action.ReindexDataStreamTransportAction; |
48 | 43 | import org.elasticsearch.datastreams.action.TransportGetDataStreamsAction;
|
49 | 44 | import org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleErrorStore;
|
50 | 45 | import org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleService;
|
|
78 | 73 | import org.elasticsearch.datastreams.rest.RestMigrateToDataStreamAction;
|
79 | 74 | import org.elasticsearch.datastreams.rest.RestModifyDataStreamsAction;
|
80 | 75 | import org.elasticsearch.datastreams.rest.RestPromoteDataStreamAction;
|
81 |
| -import org.elasticsearch.datastreams.task.ReindexDataStreamPersistentTaskExecutor; |
82 |
| -import org.elasticsearch.datastreams.task.ReindexDataStreamPersistentTaskState; |
83 |
| -import org.elasticsearch.datastreams.task.ReindexDataStreamStatus; |
84 |
| -import org.elasticsearch.datastreams.task.ReindexDataStreamTask; |
85 |
| -import org.elasticsearch.datastreams.task.ReindexDataStreamTaskParams; |
86 | 76 | import org.elasticsearch.features.NodeFeature;
|
87 | 77 | import org.elasticsearch.health.HealthIndicatorService;
|
88 | 78 | import org.elasticsearch.index.IndexSettingProvider;
|
89 |
| -import org.elasticsearch.persistent.PersistentTaskParams; |
90 |
| -import org.elasticsearch.persistent.PersistentTaskState; |
91 |
| -import org.elasticsearch.persistent.PersistentTasksExecutor; |
92 | 79 | import org.elasticsearch.plugins.ActionPlugin;
|
93 | 80 | import org.elasticsearch.plugins.HealthPlugin;
|
94 |
| -import org.elasticsearch.plugins.PersistentTaskPlugin; |
95 | 81 | import org.elasticsearch.plugins.Plugin;
|
96 | 82 | import org.elasticsearch.rest.RestController;
|
97 | 83 | import org.elasticsearch.rest.RestHandler;
|
98 |
| -import org.elasticsearch.tasks.Task; |
99 |
| -import org.elasticsearch.threadpool.ThreadPool; |
100 |
| -import org.elasticsearch.xcontent.NamedXContentRegistry; |
101 |
| -import org.elasticsearch.xcontent.ParseField; |
102 | 84 |
|
103 | 85 | import java.io.IOException;
|
104 | 86 | import java.time.Clock;
|
|
111 | 93 |
|
112 | 94 | import static org.elasticsearch.cluster.metadata.DataStreamLifecycle.DATA_STREAM_LIFECYCLE_ORIGIN;
|
113 | 95 |
|
114 |
| -public class DataStreamsPlugin extends Plugin implements ActionPlugin, HealthPlugin, PersistentTaskPlugin { |
| 96 | +public class DataStreamsPlugin extends Plugin implements ActionPlugin, HealthPlugin { |
115 | 97 |
|
116 | 98 | public static final Setting<TimeValue> TIME_SERIES_POLL_INTERVAL = Setting.timeSetting(
|
117 | 99 | "time_series.poll_interval",
|
@@ -262,7 +244,6 @@ public Collection<?> createComponents(PluginServices services) {
|
262 | 244 | actions.add(new ActionHandler<>(PutDataStreamOptionsAction.INSTANCE, TransportPutDataStreamOptionsAction.class));
|
263 | 245 | actions.add(new ActionHandler<>(DeleteDataStreamOptionsAction.INSTANCE, TransportDeleteDataStreamOptionsAction.class));
|
264 | 246 | }
|
265 |
| - actions.add(new ActionHandler<>(ReindexDataStreamAction.INSTANCE, ReindexDataStreamTransportAction.class)); |
266 | 247 | return actions;
|
267 | 248 | }
|
268 | 249 |
|
@@ -321,48 +302,4 @@ public void close() throws IOException {
|
321 | 302 | public Collection<HealthIndicatorService> getHealthIndicatorServices() {
|
322 | 303 | return List.of(dataStreamLifecycleHealthIndicatorService.get());
|
323 | 304 | }
|
324 |
| - |
325 |
| - @Override |
326 |
| - public List<NamedXContentRegistry.Entry> getNamedXContent() { |
327 |
| - return List.of( |
328 |
| - new NamedXContentRegistry.Entry( |
329 |
| - PersistentTaskState.class, |
330 |
| - new ParseField(ReindexDataStreamPersistentTaskState.NAME), |
331 |
| - ReindexDataStreamPersistentTaskState::fromXContent |
332 |
| - ), |
333 |
| - new NamedXContentRegistry.Entry( |
334 |
| - PersistentTaskParams.class, |
335 |
| - new ParseField(ReindexDataStreamTaskParams.NAME), |
336 |
| - ReindexDataStreamTaskParams::fromXContent |
337 |
| - ) |
338 |
| - ); |
339 |
| - } |
340 |
| - |
341 |
| - @Override |
342 |
| - public List<NamedWriteableRegistry.Entry> getNamedWriteables() { |
343 |
| - return List.of( |
344 |
| - new NamedWriteableRegistry.Entry( |
345 |
| - PersistentTaskState.class, |
346 |
| - ReindexDataStreamPersistentTaskState.NAME, |
347 |
| - ReindexDataStreamPersistentTaskState::new |
348 |
| - ), |
349 |
| - new NamedWriteableRegistry.Entry( |
350 |
| - PersistentTaskParams.class, |
351 |
| - ReindexDataStreamTaskParams.NAME, |
352 |
| - ReindexDataStreamTaskParams::new |
353 |
| - ), |
354 |
| - new NamedWriteableRegistry.Entry(Task.Status.class, ReindexDataStreamStatus.NAME, ReindexDataStreamStatus::new) |
355 |
| - ); |
356 |
| - } |
357 |
| - |
358 |
| - @Override |
359 |
| - public List<PersistentTasksExecutor<?>> getPersistentTasksExecutor( |
360 |
| - ClusterService clusterService, |
361 |
| - ThreadPool threadPool, |
362 |
| - Client client, |
363 |
| - SettingsModule settingsModule, |
364 |
| - IndexNameExpressionResolver expressionResolver |
365 |
| - ) { |
366 |
| - return List.of(new ReindexDataStreamPersistentTaskExecutor(client, clusterService, ReindexDataStreamTask.TASK_NAME, threadPool)); |
367 |
| - } |
368 | 305 | }
|
0 commit comments