|
16 | 16 | import org.elasticsearch.cluster.metadata.IndexTemplateMetaData; |
17 | 17 | import org.elasticsearch.cluster.node.DiscoveryNodes; |
18 | 18 | import org.elasticsearch.cluster.service.ClusterService; |
19 | | -import org.elasticsearch.common.ParseField; |
20 | 19 | import org.elasticsearch.common.inject.Module; |
21 | 20 | import org.elasticsearch.common.io.stream.NamedWriteableRegistry; |
22 | 21 | import org.elasticsearch.common.settings.ClusterSettings; |
|
28 | 27 | import org.elasticsearch.env.Environment; |
29 | 28 | import org.elasticsearch.env.NodeEnvironment; |
30 | 29 | import org.elasticsearch.license.XPackLicenseState; |
31 | | -import org.elasticsearch.persistent.PersistentTaskParams; |
32 | | -import org.elasticsearch.persistent.PersistentTaskState; |
33 | 30 | import org.elasticsearch.persistent.PersistentTasksExecutor; |
34 | 31 | import org.elasticsearch.plugins.ActionPlugin; |
35 | 32 | import org.elasticsearch.plugins.PersistentTaskPlugin; |
36 | 33 | import org.elasticsearch.plugins.Plugin; |
37 | 34 | import org.elasticsearch.rest.RestController; |
38 | 35 | import org.elasticsearch.rest.RestHandler; |
39 | 36 | import org.elasticsearch.script.ScriptService; |
40 | | -import org.elasticsearch.tasks.Task; |
41 | 37 | import org.elasticsearch.threadpool.ExecutorBuilder; |
42 | 38 | import org.elasticsearch.threadpool.FixedExecutorBuilder; |
43 | 39 | import org.elasticsearch.threadpool.ThreadPool; |
44 | 40 | import org.elasticsearch.watcher.ResourceWatcherService; |
45 | 41 | import org.elasticsearch.xpack.core.XPackPlugin; |
46 | 42 | import org.elasticsearch.xpack.core.XPackSettings; |
47 | | -import org.elasticsearch.xpack.core.dataframe.DataFrameField; |
48 | | -import org.elasticsearch.xpack.core.dataframe.transforms.DataFrameTransformState; |
49 | | -import org.elasticsearch.xpack.core.scheduler.SchedulerEngine; |
50 | 43 | import org.elasticsearch.xpack.core.dataframe.action.DeleteDataFrameTransformAction; |
51 | 44 | import org.elasticsearch.xpack.core.dataframe.action.GetDataFrameTransformsAction; |
52 | 45 | import org.elasticsearch.xpack.core.dataframe.action.GetDataFrameTransformsStatsAction; |
53 | 46 | import org.elasticsearch.xpack.core.dataframe.action.PreviewDataFrameTransformAction; |
54 | 47 | import org.elasticsearch.xpack.core.dataframe.action.PutDataFrameTransformAction; |
55 | 48 | import org.elasticsearch.xpack.core.dataframe.action.StartDataFrameTransformAction; |
56 | 49 | import org.elasticsearch.xpack.core.dataframe.action.StopDataFrameTransformAction; |
| 50 | +import org.elasticsearch.xpack.core.scheduler.SchedulerEngine; |
57 | 51 | import org.elasticsearch.xpack.dataframe.action.TransportDeleteDataFrameTransformAction; |
58 | 52 | import org.elasticsearch.xpack.dataframe.action.TransportGetDataFrameTransformsAction; |
59 | 53 | import org.elasticsearch.xpack.dataframe.action.TransportGetDataFrameTransformsStatsAction; |
|
70 | 64 | import org.elasticsearch.xpack.dataframe.rest.action.RestPutDataFrameTransformAction; |
71 | 65 | import org.elasticsearch.xpack.dataframe.rest.action.RestStartDataFrameTransformAction; |
72 | 66 | import org.elasticsearch.xpack.dataframe.rest.action.RestStopDataFrameTransformAction; |
73 | | -import org.elasticsearch.xpack.dataframe.transforms.DataFrameTransform; |
74 | 67 | import org.elasticsearch.xpack.dataframe.transforms.DataFrameTransformPersistentTasksExecutor; |
75 | 68 |
|
76 | 69 | import java.io.IOException; |
@@ -214,22 +207,7 @@ public List<PersistentTasksExecutor<?>> getPersistentTasksExecutor(ClusterServic |
214 | 207 | return Collections.singletonList(new DataFrameTransformPersistentTasksExecutor(client, dataFrameTransformsConfigManager.get(), |
215 | 208 | schedulerEngine.get(), threadPool)); |
216 | 209 | } |
217 | | - |
218 | | - @Override |
219 | | - public List<NamedXContentRegistry.Entry> getNamedXContent() { |
220 | | - if (enabled == false) { |
221 | | - return emptyList(); |
222 | | - } |
223 | | - return Arrays.asList( |
224 | | - new NamedXContentRegistry.Entry(PersistentTaskParams.class, new ParseField(DataFrameField.TASK_NAME), |
225 | | - DataFrameTransform::fromXContent), |
226 | | - new NamedXContentRegistry.Entry(Task.Status.class, new ParseField(DataFrameTransformState.NAME), |
227 | | - DataFrameTransformState::fromXContent), |
228 | | - new NamedXContentRegistry.Entry(PersistentTaskState.class, new ParseField(DataFrameTransformState.NAME), |
229 | | - DataFrameTransformState::fromXContent) |
230 | | - ); |
231 | | - } |
232 | | - |
| 210 | + |
233 | 211 | @Override |
234 | 212 | public void close() { |
235 | 213 | if (schedulerEngine.get() != null) { |
|
0 commit comments