This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update/delete historical detector;search AD tasks (#362)
* update/delete historical detector;search AD tasks * delete ad tasks first
- Loading branch information
Showing
28 changed files
with
1,038 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/com/amazon/opendistroforelasticsearch/ad/rest/RestSearchADTasksAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). | ||
* You may not use this file except in compliance with the License. | ||
* A copy of the License is located at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "license" file accompanying this file. This file is distributed | ||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
package com.amazon.opendistroforelasticsearch.ad.rest; | ||
|
||
import com.amazon.opendistroforelasticsearch.ad.AnomalyDetectorPlugin; | ||
import com.amazon.opendistroforelasticsearch.ad.constant.CommonName; | ||
import com.amazon.opendistroforelasticsearch.ad.model.ADTask; | ||
import com.amazon.opendistroforelasticsearch.ad.transport.SearchADTasksAction; | ||
|
||
/** | ||
* This class consists of the REST handler to search AD tasks. | ||
*/ | ||
public class RestSearchADTasksAction extends AbstractSearchAction<ADTask> { | ||
|
||
private static final String URL_PATH = AnomalyDetectorPlugin.AD_BASE_DETECTORS_URI + "/tasks/_search"; | ||
private final String SEARCH_ANOMALY_DETECTION_TASKS = "search_anomaly_detection_tasks"; | ||
|
||
public RestSearchADTasksAction() { | ||
super(URL_PATH, CommonName.DETECTION_STATE_INDEX, ADTask.class, SearchADTasksAction.INSTANCE); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return SEARCH_ANOMALY_DETECTION_TASKS; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.