|
|
@@ -22,6 +22,7 @@ import org.elasticsearch.common.xcontent.ObjectParser;
|
|
|
import org.elasticsearch.common.xcontent.ToXContentObject;
|
|
|
import org.elasticsearch.common.xcontent.XContentBuilder;
|
|
|
import org.elasticsearch.common.xcontent.XContentParser;
|
|
|
+import org.elasticsearch.tasks.Task;
|
|
|
import org.elasticsearch.xpack.core.ml.dataframe.DataFrameAnalyticsConfig;
|
|
|
import org.elasticsearch.xpack.core.ml.job.messages.Messages;
|
|
|
import org.elasticsearch.xpack.core.ml.utils.ExceptionsHelper;
|
|
|
@@ -125,6 +126,11 @@ public class StopDataFrameAnalyticsAction extends ActionType<StopDataFrameAnalyt
|
|
|
this.expandedIds = Objects.requireNonNull(expandedIds);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean match(Task task) {
|
|
|
+ return expandedIds.stream().anyMatch(expandedId -> StartDataFrameAnalyticsAction.TaskMatcher.match(task, expandedId));
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public ActionRequestValidationException validate() {
|
|
|
return null;
|