-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML-DataFrame] add a wait_for_completion option to the stop data frame api #36701
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-DataFrame] add a wait_for_completion option to the stop data frame api #36701
Conversation
|
Pinging @elastic/ml-core |
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.
Is there any mechanism for the end user to see the status of the request? Or to see when it is completed?
From what I can tell, since we do not return a task ID for the action, there is no way for the end user to check the completion of the task. I may be wrong about this as the way this async/sync request handling is done is different than others I have seen in the code base.
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.
timeout already exists with the ActionRequest of which this is a descendant.
Is there a reason for not using that field?
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 changed it to reuse the timeout value from the base class. As discussed it is a bit ugly, but I hope I found a good compromise.
|
The example output: So the task id is basically the job. Right now there is a 1:1 relationship between a job and a task, but that might change. With other words, a user interacts with the high level concept job, the underlying task is an implementation detail. Coming back to this PR. When issuing a stop, the job_state above changes from This is API-wise no different than rollup(#34811), but different to reindex, because in reindex you interact with tasks. I hope this makes it more clear. |
348fdf8 to
e2327e1
Compare
|
run gradle build tests 2 |
Default the stop data frame job API is async, this change adds an option to block until the job has really stopped. This is useful for testing and a prerequisite for a UI.
wait_for_completionfollows similar namings in rollup and reindex.