-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[ML] Implement force deleting a data frame analytics job #50553
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] Implement force deleting a data frame analytics job #50553
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
Pinging @elastic/ml-core (:ml) |
Could @szabosteve or @lcawl take a look at the docs changes of this one? |
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.
just some minor things.
|
||
public Request(StreamInput in) throws IOException { | ||
super(in); | ||
id = in.readString(); | ||
if (in.getVersion().onOrAfter(Version.CURRENT)) { |
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.
#nit,
if (in.getVersion().onOrAfter(Version.CURRENT)) { | |
if (in.getVersion().onOrAfter(Version.V_8_0_0)) { |
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 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.
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.
@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
} | ||
|
||
@Override | ||
public void writeTo(StreamOutput out) throws IOException { | ||
super.writeTo(out); | ||
out.writeString(id); | ||
if (out.getVersion().onOrAfter(Version.CURRENT)) { |
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.
#nit,
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); |
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.
logger.debug("[] Force deleting data frame analytics job", id); | |
logger.debug("[{}] Force deleting data frame analytics job", id); |
docs/reference/ml/df-analytics/apis/delete-dfanalytics.asciidoc
Outdated
Show resolved
Hide resolved
docs/reference/ml/df-analytics/apis/delete-dfanalytics.asciidoc
Outdated
Show resolved
Hide resolved
Co-Authored-By: Lisa Cawley <[email protected]>
Co-Authored-By: István Zoltán Szabó <[email protected]>
Until #50553 is backported to 7.x
…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
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
Until elastic#50553 is backported to 7.x
Adds a
force
parameter to the delete data frame analyticsrequest. When
force
istrue
, 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: