|
32 | 32 | import org.elasticsearch.cluster.service.ClusterService; |
33 | 33 | import org.elasticsearch.common.breaker.CircuitBreaker; |
34 | 34 | import org.elasticsearch.common.io.stream.NamedWriteableRegistry; |
| 35 | +import org.elasticsearch.common.logging.DeprecationCategory; |
| 36 | +import org.elasticsearch.common.logging.DeprecationLogger; |
35 | 37 | import org.elasticsearch.common.settings.ClusterSettings; |
36 | 38 | import org.elasticsearch.common.settings.IndexScopedSettings; |
37 | 39 | import org.elasticsearch.common.settings.Setting; |
|
68 | 70 | import org.elasticsearch.plugins.IngestPlugin; |
69 | 71 | import org.elasticsearch.plugins.MapperPlugin; |
70 | 72 | import org.elasticsearch.plugins.PersistentTaskPlugin; |
| 73 | +import org.elasticsearch.plugins.Platforms; |
71 | 74 | import org.elasticsearch.plugins.Plugin; |
72 | 75 | import org.elasticsearch.plugins.SearchPlugin; |
73 | 76 | import org.elasticsearch.plugins.ShutdownAwarePlugin; |
@@ -753,6 +756,7 @@ public void loadExtensions(ExtensionLoader loader) { |
753 | 756 | public static final int MAX_LOW_PRIORITY_MODELS_PER_NODE = 100; |
754 | 757 |
|
755 | 758 | private static final Logger logger = LogManager.getLogger(MachineLearning.class); |
| 759 | + private static final DeprecationLogger deprecationLogger = DeprecationLogger.getLogger(MachineLearning.class); |
756 | 760 |
|
757 | 761 | private final Settings settings; |
758 | 762 | private final boolean enabled; |
@@ -919,6 +923,15 @@ public Collection<?> createComponents(PluginServices services) { |
919 | 923 | return List.of(new JobManagerHolder(), new MachineLearningExtensionHolder()); |
920 | 924 | } |
921 | 925 |
|
| 926 | + if ("darwin-x86_64".equals(Platforms.PLATFORM_NAME)) { |
| 927 | + String msg = "The machine learning plugin will be permanently disabled on macOS x86_64 in new minor versions released " |
| 928 | + + "from December 2024 onwards. To continue to use machine learning functionality on macOS please switch to an arm64 " |
| 929 | + + "machine (Apple silicon). Alternatively, it will still be possible to run Elasticsearch with machine learning " |
| 930 | + + "enabled in a Docker container on macOS x86_64."; |
| 931 | + logger.warn(msg); |
| 932 | + deprecationLogger.warn(DeprecationCategory.PLUGINS, "ml-darwin-x86_64", msg); |
| 933 | + } |
| 934 | + |
922 | 935 | machineLearningExtension.get().configure(environment.settings()); |
923 | 936 |
|
924 | 937 | this.mlUpgradeModeActionFilter.set(new MlUpgradeModeActionFilter(clusterService)); |
|
0 commit comments