[ML] Renamed action names from */anomaly_detectors/* to */job/*

The action name is currently inconsistent with the class name.
Also as more types of jobs will be added, they should reuse the existing actions,
so it make more sense to gave a generic job name for the action name. Note that
it is ok to have additional rest handlers for new type of jobs.

Original commit: elastic/x-pack-elasticsearch@a70d46fb8a
This commit is contained in:
Martijn van Groningen 2017-03-21 09:58:37 +01:00
parent a59badf842
commit f20efa7152
21 changed files with 40 additions and 40 deletions

View File

@ -56,7 +56,7 @@ import java.util.Optional;
public class CloseJobAction extends Action<CloseJobAction.Request, CloseJobAction.Response, CloseJobAction.RequestBuilder> {
public static final CloseJobAction INSTANCE = new CloseJobAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/close";
public static final String NAME = "cluster:admin/ml/job/close";
private CloseJobAction() {
super(NAME);

View File

@ -38,7 +38,7 @@ import java.util.Objects;
public class DeleteJobAction extends Action<DeleteJobAction.Request, DeleteJobAction.Response, DeleteJobAction.RequestBuilder> {
public static final DeleteJobAction INSTANCE = new DeleteJobAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/delete";
public static final String NAME = "cluster:admin/ml/job/delete";
private DeleteJobAction() {
super(NAME);

View File

@ -42,7 +42,7 @@ public class DeleteModelSnapshotAction extends Action<DeleteModelSnapshotAction.
DeleteModelSnapshotAction.Response, DeleteModelSnapshotAction.RequestBuilder> {
public static final DeleteModelSnapshotAction INSTANCE = new DeleteModelSnapshotAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/model_snapshots/delete";
public static final String NAME = "cluster:admin/ml/job/model_snapshots/delete";
private DeleteModelSnapshotAction() {
super(NAME);

View File

@ -38,7 +38,7 @@ import java.util.Objects;
public class FlushJobAction extends Action<FlushJobAction.Request, FlushJobAction.Response, FlushJobAction.RequestBuilder> {
public static final FlushJobAction INSTANCE = new FlushJobAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/flush";
public static final String NAME = "cluster:admin/ml/job/flush";
private FlushJobAction() {
super(NAME);

View File

@ -45,7 +45,7 @@ import java.util.Objects;
public class GetBucketsAction extends Action<GetBucketsAction.Request, GetBucketsAction.Response, GetBucketsAction.RequestBuilder> {
public static final GetBucketsAction INSTANCE = new GetBucketsAction();
public static final String NAME = "cluster:monitor/ml/anomaly_detectors/results/buckets/get";
public static final String NAME = "cluster:monitor/ml/job/results/buckets/get";
private GetBucketsAction() {
super(NAME);

View File

@ -44,7 +44,7 @@ public class GetCategoriesAction extends
Action<GetCategoriesAction.Request, GetCategoriesAction.Response, GetCategoriesAction.RequestBuilder> {
public static final GetCategoriesAction INSTANCE = new GetCategoriesAction();
public static final String NAME = "cluster:monitor/ml/anomaly_detectors/results/categories/get";
public static final String NAME = "cluster:monitor/ml/job/results/categories/get";
private GetCategoriesAction() {
super(NAME);

View File

@ -44,7 +44,7 @@ public class GetInfluencersAction
extends Action<GetInfluencersAction.Request, GetInfluencersAction.Response, GetInfluencersAction.RequestBuilder> {
public static final GetInfluencersAction INSTANCE = new GetInfluencersAction();
public static final String NAME = "cluster:monitor/ml/anomaly_detectors/results/influencers/get";
public static final String NAME = "cluster:monitor/ml/job/results/influencers/get";
private GetInfluencersAction() {
super(NAME);

View File

@ -39,7 +39,7 @@ import java.util.Objects;
public class GetJobsAction extends Action<GetJobsAction.Request, GetJobsAction.Response, GetJobsAction.RequestBuilder> {
public static final GetJobsAction INSTANCE = new GetJobsAction();
public static final String NAME = "cluster:monitor/ml/anomaly_detectors/get";
public static final String NAME = "cluster:monitor/ml/job/get";
private GetJobsAction() {
super(NAME);

View File

@ -64,7 +64,7 @@ import java.util.stream.Collectors;
public class GetJobsStatsAction extends Action<GetJobsStatsAction.Request, GetJobsStatsAction.Response, GetJobsStatsAction.RequestBuilder> {
public static final GetJobsStatsAction INSTANCE = new GetJobsStatsAction();
public static final String NAME = "cluster:monitor/ml/anomaly_detectors/stats/get";
public static final String NAME = "cluster:monitor/ml/job/stats/get";
private static final String DATA_COUNTS = "data_counts";
private static final String MODEL_SIZE_STATS = "model_size_stats";

View File

@ -44,7 +44,7 @@ public class GetModelSnapshotsAction
extends Action<GetModelSnapshotsAction.Request, GetModelSnapshotsAction.Response, GetModelSnapshotsAction.RequestBuilder> {
public static final GetModelSnapshotsAction INSTANCE = new GetModelSnapshotsAction();
public static final String NAME = "cluster:monitor/ml/anomaly_detectors/model_snapshots/get";
public static final String NAME = "cluster:monitor/ml/job/model_snapshots/get";
private GetModelSnapshotsAction() {
super(NAME);

View File

@ -45,7 +45,7 @@ import java.util.Objects;
public class GetRecordsAction extends Action<GetRecordsAction.Request, GetRecordsAction.Response, GetRecordsAction.RequestBuilder> {
public static final GetRecordsAction INSTANCE = new GetRecordsAction();
public static final String NAME = "cluster:monitor/ml/anomaly_detectors/results/records/get";
public static final String NAME = "cluster:monitor/ml/job/results/records/get";
private GetRecordsAction() {
super(NAME);

View File

@ -72,7 +72,7 @@ import static org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProces
public class OpenJobAction extends Action<OpenJobAction.Request, PersistentActionResponse, OpenJobAction.RequestBuilder> {
public static final OpenJobAction INSTANCE = new OpenJobAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/open";
public static final String NAME = "cluster:admin/ml/job/open";
private OpenJobAction() {
super(NAME);

View File

@ -39,7 +39,7 @@ import java.util.Optional;
public class PostDataAction extends Action<PostDataAction.Request, PostDataAction.Response, PostDataAction.RequestBuilder> {
public static final PostDataAction INSTANCE = new PostDataAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/data/post";
public static final String NAME = "cluster:admin/ml/job/data/post";
private PostDataAction() {
super(NAME);

View File

@ -45,7 +45,7 @@ import java.util.Objects;
public class PutJobAction extends Action<PutJobAction.Request, PutJobAction.Response, PutJobAction.RequestBuilder> {
public static final PutJobAction INSTANCE = new PutJobAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/put";
public static final String NAME = "cluster:admin/ml/job/put";
private PutJobAction() {
super(NAME);

View File

@ -55,7 +55,7 @@ public class RevertModelSnapshotAction
extends Action<RevertModelSnapshotAction.Request, RevertModelSnapshotAction.Response, RevertModelSnapshotAction.RequestBuilder> {
public static final RevertModelSnapshotAction INSTANCE = new RevertModelSnapshotAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/model_snapshots/revert";
public static final String NAME = "cluster:admin/ml/job/model_snapshots/revert";
private RevertModelSnapshotAction() {
super(NAME);

View File

@ -44,7 +44,7 @@ import java.util.concurrent.Semaphore;
public class UpdateJobAction extends Action<UpdateJobAction.Request, PutJobAction.Response, UpdateJobAction.RequestBuilder> {
public static final UpdateJobAction INSTANCE = new UpdateJobAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/update";
public static final String NAME = "cluster:admin/ml/job/update";
private UpdateJobAction() {
super(NAME);

View File

@ -47,7 +47,7 @@ Action<UpdateModelSnapshotAction.Request, UpdateModelSnapshotAction.Response,
UpdateModelSnapshotAction.RequestBuilder> {
public static final UpdateModelSnapshotAction INSTANCE = new UpdateModelSnapshotAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/model_snapshots/update";
public static final String NAME = "cluster:admin/ml/job/model_snapshots/update";
private UpdateModelSnapshotAction() {
super(NAME);

View File

@ -36,7 +36,7 @@ public class UpdateProcessAction extends
Action<UpdateProcessAction.Request, UpdateProcessAction.Response, UpdateProcessAction.RequestBuilder> {
public static final UpdateProcessAction INSTANCE = new UpdateProcessAction();
public static final String NAME = "internal:admin/ml/anomaly_detectors/update/process";
public static final String NAME = "internal:admin/ml/job/update/process";
private UpdateProcessAction() {
super(NAME);

View File

@ -34,7 +34,7 @@ public class ValidateDetectorAction
extends Action<ValidateDetectorAction.Request, ValidateDetectorAction.Response, ValidateDetectorAction.RequestBuilder> {
public static final ValidateDetectorAction INSTANCE = new ValidateDetectorAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/validate/detector";
public static final String NAME = "cluster:admin/ml/job/validate/detector";
protected ValidateDetectorAction() {
super(NAME);

View File

@ -35,7 +35,7 @@ public class ValidateJobConfigAction
extends Action<ValidateJobConfigAction.Request, ValidateJobConfigAction.Response, ValidateJobConfigAction.RequestBuilder> {
public static final ValidateJobConfigAction INSTANCE = new ValidateJobConfigAction();
public static final String NAME = "cluster:admin/ml/anomaly_detectors/validate";
public static final String NAME = "cluster:admin/ml/job/validate";
protected ValidateJobConfigAction() {
super(NAME);

View File

@ -107,37 +107,37 @@ cluster:admin/ingest/pipeline/get
cluster:admin/ingest/pipeline/put
cluster:admin/ingest/pipeline/simulate
cluster:admin/ml/filters/get
cluster:monitor/ml/anomaly_detectors/results/categories/get
cluster:monitor/ml/anomaly_detectors/stats/get
cluster:monitor/ml/anomaly_detectors/results/buckets/get
cluster:monitor/ml/anomaly_detectors/model_snapshots/get
cluster:monitor/ml/anomaly_detectors/results/records/get
cluster:monitor/ml/anomaly_detectors/results/influencers/get
cluster:monitor/ml/job/results/categories/get
cluster:monitor/ml/job/stats/get
cluster:monitor/ml/job/results/buckets/get
cluster:monitor/ml/job/model_snapshots/get
cluster:monitor/ml/job/results/records/get
cluster:monitor/ml/job/results/influencers/get
cluster:admin/ml/datafeeds/preview
cluster:admin/ml/datafeeds/put
cluster:admin/ml/datafeeds/update
cluster:admin/ml/anomaly_detectors/model_snapshots/delete
cluster:admin/ml/anomaly_detectors/validate/detector
cluster:admin/ml/anomaly_detectors/validate
cluster:admin/ml/anomaly_detectors/delete
cluster:admin/ml/anomaly_detectors/model_snapshots/revert
cluster:admin/ml/job/model_snapshots/delete
cluster:admin/ml/job/validate/detector
cluster:admin/ml/job/validate
cluster:admin/ml/job/delete
cluster:admin/ml/job/model_snapshots/revert
cluster:admin/ml/datafeeds/delete
cluster:admin/ml/anomaly_detectors/data/post
cluster:admin/ml/anomaly_detectors/close
cluster:admin/ml/job/data/post
cluster:admin/ml/job/close
cluster:admin/ml/filters/put
cluster:admin/ml/anomaly_detectors/put
cluster:monitor/ml/anomaly_detectors/get
cluster:admin/ml/job/put
cluster:monitor/ml/job/get
cluster:monitor/ml/datafeeds/get
cluster:admin/ml/anomaly_detectors/model_snapshots/update
cluster:admin/ml/anomaly_detectors/flush
cluster:admin/ml/job/model_snapshots/update
cluster:admin/ml/job/flush
cluster:admin/ml/filters/delete
cluster:monitor/ml/datafeeds/stats/get
cluster:admin/ml/datafeeds/stop
cluster:admin/ml/datafeeds/start
cluster:admin/ml/anomaly_detectors/open
cluster:admin/ml/anomaly_detectors/update
cluster:admin/ml/job/open
cluster:admin/ml/job/update
indices:internal/data/write/mldeletebyquery
internal:admin/ml/anomaly_detectors/update/process
internal:admin/ml/job/update/process
cluster:admin/ml/delete_expired_data
cluster:admin/persistent/create
cluster:admin/persistent/start