[ML] Implement force deleting a data frame analytics job#50553
Merged
dimitris-athanasiou merged 4 commits intoelastic:masterfrom Jan 3, 2020
Merged
Conversation
Adds a `force` parameter to the delete data frame analytics request. When `force` is `true`, the action force-stops the jobs and then proceeds to the deletion. This can be used in order to delete a non-stopped job with a single request. Closes elastic#48124
Collaborator
|
Pinging @elastic/ml-core (:ml) |
Contributor
Author
|
Could @szabosteve or @lcawl take a look at the docs changes of this one? |
benwtrent
reviewed
Jan 2, 2020
| public Request(StreamInput in) throws IOException { | ||
| super(in); | ||
| id = in.readString(); | ||
| if (in.getVersion().onOrAfter(Version.CURRENT)) { |
Member
There was a problem hiding this comment.
#nit,
Suggested change
| if (in.getVersion().onOrAfter(Version.CURRENT)) { | |
| if (in.getVersion().onOrAfter(Version.V_8_0_0)) { |
Contributor
Author
There was a problem hiding this comment.
I will have to turn off BWC tests for this. I have the habit of leaving those as CURRENT and change them when I unmute the BWC tests after backporting.
Member
There was a problem hiding this comment.
@dimitris-athanasiou I can understand that, I have just noticed that using CURRENT allows you to backport without actually changing the version (since it still compiles). V_8_0_0 forces me to do things in the correct order.
I just find this helpful, I am not gonna prevent a 👍 over it :D
| public void writeTo(StreamOutput out) throws IOException { | ||
| super.writeTo(out); | ||
| out.writeString(id); | ||
| if (out.getVersion().onOrAfter(Version.CURRENT)) { |
Member
There was a problem hiding this comment.
#nit,
Suggested change
| if (out.getVersion().onOrAfter(Version.CURRENT)) { | |
| if (in.getVersion().onOrAfter(Version.V_8_0_0)) { |
|
|
||
| private void forceDelete(ParentTaskAssigningClient parentTaskClient, String id, | ||
| ActionListener<AcknowledgedResponse> listener) { | ||
| logger.debug("[] Force deleting data frame analytics job", id); |
Member
There was a problem hiding this comment.
Suggested change
| logger.debug("[] Force deleting data frame analytics job", id); | |
| logger.debug("[{}] Force deleting data frame analytics job", id); |
benwtrent
approved these changes
Jan 2, 2020
lcawl
reviewed
Jan 2, 2020
docs/reference/ml/df-analytics/apis/delete-dfanalytics.asciidoc
Outdated
Show resolved
Hide resolved
szabosteve
reviewed
Jan 3, 2020
docs/reference/ml/df-analytics/apis/delete-dfanalytics.asciidoc
Outdated
Show resolved
Hide resolved
Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
Co-Authored-By: István Zoltán Szabó <istvan.szabo@elastic.co>
dimitris-athanasiou
added a commit
that referenced
this pull request
Jan 3, 2020
Until #50553 is backported to 7.x
dimitris-athanasiou
added a commit
to dimitris-athanasiou/elasticsearch
that referenced
this pull request
Jan 3, 2020
…c#50553) Adds a `force` parameter to the delete data frame analytics request. When `force` is `true`, the action force-stops the jobs and then proceeds to the deletion. This can be used in order to delete a non-stopped job with a single request. Closes elastic#48124 Backport of elastic#50553
dimitris-athanasiou
added a commit
to dimitris-athanasiou/elasticsearch
that referenced
this pull request
Jan 3, 2020
dimitris-athanasiou
added a commit
that referenced
this pull request
Jan 3, 2020
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
Adds a `force` parameter to the delete data frame analytics request. When `force` is `true`, the action force-stops the jobs and then proceeds to the deletion. This can be used in order to delete a non-stopped job with a single request. Closes elastic#48124
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
Until elastic#50553 is backported to 7.x
SivagurunathanV
pushed a commit
to SivagurunathanV/elasticsearch
that referenced
this pull request
Jan 23, 2020
This was referenced Feb 3, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
forceparameter to the delete data frame analyticsrequest. When
forceistrue, the action force-stops thejobs and then proceeds to the deletion. This can be used in
order to delete a non-stopped job with a single request.
Closes #48124
Docs preview: