From b3ae0229851c0567bba7f1feafd25f562de6f6e9 Mon Sep 17 00:00:00 2001 From: Dimitris Athanasiou Date: Tue, 26 Sep 2017 14:12:27 +0100 Subject: [PATCH] [ML] Remove unused member in NativeAutodetectProcessFactory (elastic/x-pack-elasticsearch#2629) Original commit: elastic/x-pack-elasticsearch@31f265f0e56c5b801081cc92055ecd4a3bc44b66 --- .../java/org/elasticsearch/xpack/ml/MachineLearning.java | 2 +- .../process/autodetect/NativeAutodetectProcessFactory.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/MachineLearning.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/MachineLearning.java index 57bde0eb70c..df819ef874c 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/MachineLearning.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/MachineLearning.java @@ -283,7 +283,7 @@ public class MachineLearning implements ActionPlugin { // This will only only happen when path.home is not set, which is disallowed in production throw new ElasticsearchException("Failed to create native process controller for Machine Learning"); } - autodetectProcessFactory = new NativeAutodetectProcessFactory(jobProvider, env, settings, nativeController, internalClient); + autodetectProcessFactory = new NativeAutodetectProcessFactory(env, settings, nativeController, internalClient); normalizerProcessFactory = new NativeNormalizerProcessFactory(env, settings, nativeController); } catch (IOException e) { // This also should not happen in production, as the MachineLearningFeatureSet should have diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java index 16ec2621c92..02ddb82198a 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/job/process/autodetect/NativeAutodetectProcessFactory.java @@ -14,7 +14,6 @@ import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException; import org.elasticsearch.env.Environment; import org.elasticsearch.xpack.ml.job.config.Job; import org.elasticsearch.xpack.ml.job.config.MlFilter; -import org.elasticsearch.xpack.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.process.NativeController; import org.elasticsearch.xpack.ml.job.process.ProcessCtrl; import org.elasticsearch.xpack.ml.job.process.ProcessPipes; @@ -44,14 +43,11 @@ public class NativeAutodetectProcessFactory implements AutodetectProcessFactory private final Client client; private final Environment env; private final Settings settings; - private final JobProvider jobProvider; private final NativeController nativeController; - public NativeAutodetectProcessFactory(JobProvider jobProvider, Environment env, Settings settings, - NativeController nativeController, Client client) { + public NativeAutodetectProcessFactory(Environment env, Settings settings, NativeController nativeController, Client client) { this.env = Objects.requireNonNull(env); this.settings = Objects.requireNonNull(settings); - this.jobProvider = Objects.requireNonNull(jobProvider); this.nativeController = Objects.requireNonNull(nativeController); this.client = client; }