Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Adding RestActions support for Detector Stats API #237

Merged
merged 3 commits into from
Sep 30, 2020

Conversation

saratvemulapalli
Copy link
Contributor

*Issue #195 *

Description of changes:
Adding RestActions support Detector Stats API which is needed for FGAC support.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@saratvemulapalli
Copy link
Contributor Author

Adding Unit Tests in the coming commit.

@saratvemulapalli saratvemulapalli added the enhancement New feature or request label Sep 24, 2020
@codecov
Copy link

codecov bot commented Sep 24, 2020

Codecov Report

Merging #237 into master will increase coverage by 0.11%.
The diff coverage is 37.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #237      +/-   ##
============================================
+ Coverage     71.97%   72.08%   +0.11%     
- Complexity     1284     1294      +10     
============================================
  Files           143      146       +3     
  Lines          5980     6005      +25     
  Branches        469      469              
============================================
+ Hits           4304     4329      +25     
- Misses         1462     1463       +1     
+ Partials        214      213       -1     
Flag Coverage Δ Complexity Δ
#cli 78.11% <ø> (ø) 0.00 <ø> (ø)
#plugin 71.38% <37.33%> (+0.13%) 1294.00 <11.00> (+10.00)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
...transport/StatsAnomalyDetectorTransportAction.java 9.80% <9.80%> (ø) 1.00 <1.00> (?)
...search/ad/rest/RestStatsAnomalyDetectorAction.java 17.07% <50.00%> (+7.87%) 3.00 <1.00> (ø)
...stroforelasticsearch/ad/AnomalyDetectorPlugin.java 93.54% <100.00%> (ø) 10.00 <0.00> (ø)
...stroforelasticsearch/ad/stats/ADStatsResponse.java 77.77% <100.00%> (+4.09%) 17.00 <3.00> (+2.00)
...earch/ad/transport/StatsAnomalyDetectorAction.java 100.00% <100.00%> (ø) 2.00 <2.00> (?)
...rch/ad/transport/StatsAnomalyDetectorResponse.java 100.00% <100.00%> (ø) 4.00 <4.00> (?)
... and 1 more

@@ -20,7 +20,7 @@

public class SearchAnomalyDetectorAction extends ActionType<SearchResponse> {
public static final SearchAnomalyDetectorAction INSTANCE = new SearchAnomalyDetectorAction();
public static final String NAME = "cluster:admin/opendistro/ad/detector/search";
public static final String NAME = "cluster:admin/ad/search/detector";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old name sound more reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that was some merge issue which showed up here.
Cleaned it up with another commit.

@saratvemulapalli saratvemulapalli changed the base branch from fgac-search-apis to master September 25, 2020 19:05
@@ -249,6 +249,7 @@ List<String> jacocoExclusions = [
'com.amazon.opendistroforelasticsearch.ad.AnomalyDetectorRunner',
'com.amazon.opendistroforelasticsearch.ad.indices.AnomalyDetectionIndices',
'com.amazon.opendistroforelasticsearch.ad.util.ParseUtils',
'com.amazon.opendistroforelasticsearch.ad.transport.StatsAnomalyDetectorTransportAction'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we are already covering them in our IntegTests, its getting complicated to unit test it.

@saratvemulapalli saratvemulapalli changed the title Adding RestActions support for detector stats Adding RestActions support for Detector Stats Sep 25, 2020
@saratvemulapalli saratvemulapalli changed the title Adding RestActions support for Detector Stats Adding RestActions support for Detector Stats API Sep 25, 2020
@saratvemulapalli saratvemulapalli merged commit 4c52b23 into master Sep 30, 2020
@saratvemulapalli saratvemulapalli deleted the fgac-stats-api branch September 30, 2020 16:54
@saratvemulapalli saratvemulapalli self-assigned this Sep 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants