mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-27 15:39:49 +00:00
When we force delete a DF analytics job, we currently first force stop it and then we proceed with deleting the job config. This may result in logging errors if the job config is deleted before it is retrieved while the job is starting. Instead of force stopping the job, it would make more sense to try to stop the job gracefully first. So we now try that out first. If normal stop fails, then we resort to force stopping the job to ensure we can go through with the delete. In addition, this commit introduces `timeout` for the delete action and makes use of it in the child requests. Backport of #57680
42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
--
|
|
:api: delete-data-frame-analytics
|
|
:request: DeleteDataFrameAnalyticsRequest
|
|
:response: AcknowledgedResponse
|
|
--
|
|
[role="xpack"]
|
|
[id="{upid}-{api}"]
|
|
=== Delete {dfanalytics-jobs} API
|
|
|
|
Delete an existing {dfanalytics-job}.
|
|
The API accepts a +{request}+ object as a request and returns a +{response}+.
|
|
|
|
[id="{upid}-{api}-request"]
|
|
==== Delete {dfanalytics-jobs} request
|
|
|
|
A +{request}+ object requires a {dfanalytics-job} ID.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
---------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
|
---------------------------------------------------
|
|
<1> Constructing a new request referencing an existing {dfanalytics-job}.
|
|
|
|
==== Optional arguments
|
|
|
|
The following arguments are optional:
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
---------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-request-options]
|
|
---------------------------------------------------
|
|
<1> Use to forcefully delete a job that is not stopped. This method is quicker than stopping
|
|
and deleting the job. Defaults to `false`.
|
|
<2> Use to set the time to wait until the job is deleted. Defaults to 1 minute.
|
|
|
|
include::../execution.asciidoc[]
|
|
|
|
[id="{upid}-{api}-response"]
|
|
==== Response
|
|
|
|
The returned +{response}+ object acknowledges the {dfanalytics-job} deletion.
|