Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose agg usage in Feature Usage API #55732

Merged
merged 21 commits into from
Apr 30, 2020
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c0a7dd4
Expose agg usage in Feature Usage API
imotov Apr 24, 2020
1cc437c
Refactor to include non value sources aggregations
imotov Apr 24, 2020
9c8510a
Fix reported values source type for parent and children aggs
imotov Apr 27, 2020
f4ab1e7
Merge remote-tracking branch 'elastic/master' into issue-53746-aggs-u…
imotov Apr 27, 2020
6207497
Refactor SearchModule constructor
imotov Apr 27, 2020
b8e7051
Fix subtype in TTest and IPRanges
imotov Apr 27, 2020
530a5dd
Fix more subtypes in aggs that don't register themselves
imotov Apr 27, 2020
39a9bb3
Fix doc tests
imotov Apr 27, 2020
980ca33
Fix docs
imotov Apr 27, 2020
2eae809
Fix ScriptedMetricAggregatorTests
imotov Apr 27, 2020
5c0393a
Merge remote-tracking branch 'elastic/master' into issue-53746-aggs-u…
imotov Apr 28, 2020
4c6b4dd
Fix compilation issues after merge
imotov Apr 28, 2020
4a76f01
Fix merge fallout
imotov Apr 28, 2020
2d0e952
Merge remote-tracking branch 'elastic/master' into issue-53746-aggs-u…
imotov Apr 28, 2020
424884a
This gets stale quickly...
imotov Apr 28, 2020
ca2fb25
Address review comments
imotov Apr 28, 2020
68a2eb5
Fix tests that were missing proper agg registration in the search module
imotov Apr 28, 2020
c9bed39
Fix ScriptedMetricAggregatorTests
imotov Apr 28, 2020
6f0c4fd
Address review comments
imotov Apr 29, 2020
439aada
Merge remote-tracking branch 'elastic/master' into issue-53746-aggs-u…
imotov Apr 29, 2020
b169633
Merge branch 'master' into issue-53746-aggs-usage
elasticmachine Apr 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
This gets stale quickly...
  • Loading branch information
imotov committed Apr 28, 2020
commit 424884a4bf37001f1072f32283d7d04f49baac69
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.search.SearchModule;
import org.elasticsearch.search.aggregations.AggregatorFactories;
import org.elasticsearch.usage.UsageService;
import org.elasticsearch.xpack.core.ml.AbstractBWCWireSerializationTestCase;
import org.elasticsearch.xpack.core.ml.utils.XContentObjectTransformer;

@@ -24,7 +25,7 @@ public class AggProviderWireSerializationTests extends AbstractBWCWireSerializat

@Override
protected NamedWriteableRegistry writableRegistry() {
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList(), new UsageService());
return new NamedWriteableRegistry(searchModule.getNamedWriteables());
}

@@ -47,7 +48,7 @@ public static AggProvider createRandomValidAggProvider() {
Map<String, Object> agg = Collections.singletonMap(randomAlphaOfLengthBetween(1, 10),
Collections.singletonMap("avg", Collections.singletonMap("field", randomAlphaOfLengthBetween(1, 10))));
try {
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList(), new UsageService());
AggregatorFactories.Builder aggs =
XContentObjectTransformer.aggregatorTransformer(new NamedXContentRegistry(searchModule.getNamedXContents()))
.fromMap(agg);
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.search.SearchModule;
import org.elasticsearch.usage.UsageService;
import org.elasticsearch.xpack.core.ml.datafeed.DatafeedConfig;
import org.elasticsearch.xpack.core.ml.job.persistence.AnomalyDetectorsIndex;
import org.elasticsearch.xpack.ml.MlAutoUpdateService;
@@ -118,7 +119,7 @@ public void testAutomaticModelUpdate() throws Exception {

@Override
public NamedXContentRegistry xContentRegistry() {
return new NamedXContentRegistry(new SearchModule(Settings.EMPTY, Collections.emptyList()).getNamedXContents());
return new NamedXContentRegistry(new SearchModule(Settings.EMPTY, Collections.emptyList(), new UsageService()).getNamedXContents());
}

}