-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML] Data frame analytics as persistent tasks #37919
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
[ML] Data frame analytics as persistent tasks #37919
Conversation
|
Pinging @elastic/ml-core |
...n/core/src/main/java/org/elasticsearch/xpack/core/ml/action/PutDataFrameAnalyticsAction.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/action/RunAnalyticsAction.java
Outdated
Show resolved
Hide resolved
...in/core/src/main/java/org/elasticsearch/xpack/core/ml/dataframe/DataFrameAnalysisConfig.java
Outdated
Show resolved
Hide resolved
...in/core/src/main/java/org/elasticsearch/xpack/core/ml/dataframe/DataFrameAnalyticsState.java
Outdated
Show resolved
Hide resolved
...ore/src/main/java/org/elasticsearch/xpack/core/ml/job/persistence/ElasticsearchMappings.java
Outdated
Show resolved
Hide resolved
...k/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/process/writer/RecordWriter.java
Outdated
Show resolved
Hide resolved
.../main/java/org/elasticsearch/xpack/ml/dataframe/extractor/DataFrameDataExtractorFactory.java
Outdated
Show resolved
Hide resolved
.../java/org/elasticsearch/xpack/ml/dataframe/persistence/DataFrameAnalyticsConfigProvider.java
Outdated
Show resolved
Hide resolved
...k/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/process/AnalyticsProcess.java
Outdated
Show resolved
Hide resolved
...n/ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/process/AnalyticsProcessManager.java
Outdated
Show resolved
Hide resolved
...n/ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/process/AnalyticsProcessManager.java
Outdated
Show resolved
Hide resolved
.../ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/process/AnalyticsResultProcessor.java
Outdated
Show resolved
Hide resolved
.../ml/src/main/java/org/elasticsearch/xpack/ml/dataframe/process/AnalyticsResultProcessor.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/elasticsearch/xpack/ml/dataframe/process/NativeAnalyticsProcessFactory.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/elasticsearch/xpack/ml/dataframe/process/NativeAnalyticsProcessFactory.java
Outdated
Show resolved
Hide resolved
...va/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java
Outdated
Show resolved
Hide resolved
...va/org/elasticsearch/xpack/ml/job/process/autodetect/writer/AbstractDataToProcessWriter.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/elasticsearch/xpack/ml/rest/dataframe/RestGetDataFrameAnalyticsAction.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/elasticsearch/xpack/ml/rest/dataframe/RestGetDataFrameAnalyticsAction.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/elasticsearch/xpack/ml/rest/dataframe/RestStartDataFrameAnalyticsAction.java
Outdated
Show resolved
Hide resolved
...ore/src/main/java/org/elasticsearch/xpack/core/ml/dataframe/DataFrameAnalyticsTaskState.java
Outdated
Show resolved
Hide resolved
0d538ed to
22afa85
Compare
|
I have now updated this PR with some tests. There will definitely be more coming but I believe at this point there's enough to get this merged. |
|
run elasticsearch-ci/2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 putting the validations outside of the model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't needed to delete the configs because the base class will delete the index they're stored in, so they'll all get wiped between tests.
The only thing this is doing is possibly triggering the error that delete throws when you try to delete an analytics process that's running. If that's the reason this method exists then I think it should be renamed to reflect that.
But maybe ESRestTestCase.waitForPendingTasks() already does that check? In which case there is no need to have this method at all.
(As an aside, the anomaly detector and datafeed methods in this class will no longer need to call delete once we're sure every config is in an index, and then those methods can be renamed. But that's for a different PR.)
benwtrent
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Some discussion topics/future concerns but looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to make sure that in the future we remember to add these new tasks to our upgrade_mode settings. So that when users upgrade from 7.x -> 8.x they can do so without stopping these tasks themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add a TODO.
...in/core/src/main/java/org/elasticsearch/xpack/core/ml/dataframe/DataFrameAnalyticsState.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we have a FAILED state, adding a REASON field would be very helpful for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no proper handling of failures yet. I'll make sure to add the reason in when I add failure handling.
hendrikmuhs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It might be practical to break out the generic parts and PR them to master, so we can use them before the feature branch is merged
|
@hendrikmuhs I think we need a usage in master before porting the abstract-get-action. I'll try to use it for get-filters soon. |
droberts195
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is only going into a feature branch I'm happy to merge it now and resolve everything that's left in followups
0d035a8 to
2ac526d
Compare
after harmonizing them.
Converts data frame analytics to run as persistent tasks.
Adds the following APIs: