From 6ba02e808721a9ea3cc1209fcb8201ad43a400a6 Mon Sep 17 00:00:00 2001 From: David Kyle Date: Thu, 31 Aug 2017 17:49:08 +0100 Subject: [PATCH] [ML] Use the internal client for DeleteModelSnapshotAction (elastic/x-pack-elasticsearch#2407) Original commit: elastic/x-pack-elasticsearch@7d3cbfa0cfb4b6ad6cc178f46e4bdec0dd76be69 --- .../xpack/ml/action/DeleteModelSnapshotAction.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java index 50eeb34fa7f..095df5a2e6f 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/ml/action/DeleteModelSnapshotAction.java @@ -33,6 +33,7 @@ import org.elasticsearch.xpack.ml.job.persistence.JobProvider; import org.elasticsearch.xpack.ml.job.process.autodetect.state.ModelSnapshot; import org.elasticsearch.xpack.ml.notifications.Auditor; import org.elasticsearch.xpack.ml.utils.ExceptionsHelper; +import org.elasticsearch.xpack.security.InternalClient; import java.io.IOException; import java.util.Collections; @@ -130,7 +131,7 @@ public class DeleteModelSnapshotAction extends Action { - private final Client client; + private final InternalClient client; private final JobProvider jobProvider; private final JobManager jobManager; private final ClusterService clusterService; @@ -140,7 +141,7 @@ public class DeleteModelSnapshotAction extends Action