-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML] Add "close_job" parameter to the stop datafeed API #138634
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
base: main
Are you sure you want to change the base?
Conversation
When the stop datafeed API is called with close_job=true the job associated with the datafeed will be closed first, which in turn will result in the datafeed being closed. Closes elastic#138010
|
Pinging @elastic/ml-core (Team:ML) |
|
Hi @edsavage, I've created a changelog YAML for you. |
…op_datafeed_close_job_param
…nto stop_datafeed_close_job_param
…op_datafeed_close_job_param
davidkyle
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
Couple of minor comments. The change is well tested
| }); | ||
| } | ||
|
|
||
| private void doTestRealtime_GivenCloseJobParameter(String jobId, boolean closeJobParameter, JobState jobState) throws Exception { |
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.
Are closeJobParameter and jobState used in this method?
| } | ||
| } | ||
| if (request.closeJob() && startedDatafeedsJobs.isEmpty() == false) { | ||
| // If the "close_job" parameter was set to "true" on the stop datafeed request we attempt to first close the |
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.
In the close jobs action where the datafeed is stopped please explicitly set close job to false so when looking at that code we are aware of this interation
Line 329 in 88b5900
| StopDatafeedAction.Request request = new StopDatafeedAction.Request(String.join(",", runningDatafeedIds)); |
When the stop datafeed API is called with close_job=true the job associated with the datafeed will be closed first, which in turn will result in the datafeed being closed.
Closes #138010