From a545fe2f141be7dc38c6df21f0087cffa7fc87ff Mon Sep 17 00:00:00 2001 From: David Roberts Date: Wed, 18 Oct 2023 12:54:48 +0100 Subject: [PATCH] [ML] Minor tidyups in ML serverless extension (#101039) Followup to #99129 and #100956 --- .../xpack/ml/DefaultMachineLearningExtension.java | 1 + .../elasticsearch/xpack/ml/MachineLearningExtension.java | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/DefaultMachineLearningExtension.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/DefaultMachineLearningExtension.java index cddbe721d3d56..fa94bf96c1167 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/DefaultMachineLearningExtension.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/DefaultMachineLearningExtension.java @@ -56,6 +56,7 @@ public String[] getAnalyticsDestIndexAllowedSettings() { return ANALYTICS_DEST_INDEX_ALLOWED_SETTINGS; } + @Override public AbstractNodeAvailabilityZoneMapper getNodeAvailabilityZoneMapper(Settings settings, ClusterSettings clusterSettings) { return new NodeRealAvailabilityZoneMapper(settings, clusterSettings); } diff --git a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearningExtension.java b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearningExtension.java index b0e65d524036c..552344b4ef10e 100644 --- a/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearningExtension.java +++ b/x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/MachineLearningExtension.java @@ -10,7 +10,6 @@ import org.elasticsearch.common.settings.ClusterSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.xpack.ml.autoscaling.AbstractNodeAvailabilityZoneMapper; -import org.elasticsearch.xpack.ml.autoscaling.NodeRealAvailabilityZoneMapper; public interface MachineLearningExtension { @@ -26,11 +25,7 @@ default void configure(Settings settings) {} boolean isNlpEnabled(); - default String[] getAnalyticsDestIndexAllowedSettings() { - return DefaultMachineLearningExtension.ANALYTICS_DEST_INDEX_ALLOWED_SETTINGS; - } + String[] getAnalyticsDestIndexAllowedSettings(); - default AbstractNodeAvailabilityZoneMapper getNodeAvailabilityZoneMapper(Settings settings, ClusterSettings clusterSettings) { - return new NodeRealAvailabilityZoneMapper(settings, clusterSettings); - } + AbstractNodeAvailabilityZoneMapper getNodeAvailabilityZoneMapper(Settings settings, ClusterSettings clusterSettings); }