OpenSearch/docs/java-rest/high-level/ml/delete-expired-data.asciidoc
Benjamin Trent 297f864884
[ML] relax throttling on expired data cleanup (#56711) (#56895)
Throttling nightly cleanup as much as we do has been over cautious.

Night cleanup should be more lenient in its throttling. We still
keep the same batch size, but now the requests per second scale
with the number of data nodes. If we have more than 5 data nodes,
we don't throttle at all.

Additionally, the API now has `requests_per_second` and `timeout` set.
So users calling the API directly can set the throttling.

This commit also adds a new setting `xpack.ml.nightly_maintenance_requests_per_second`.
This will allow users to adjust throttling of the nightly maintenance.
2020-05-18 08:46:42 -04:00

40 lines
1.3 KiB
Plaintext

--
:api: delete-expired-data
:request: DeleteExpiredRequest
:response: DeleteExpiredResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Delete Expired Data API
Delete expired {ml} data.
The API accepts a +{request}+ and responds
with a +{response}+ object.
[id="{upid}-{api}-request"]
==== Delete Expired Data Request
A `DeleteExpiredDataRequest` object does not require any arguments.
["source","java",subs="attributes,callouts,macros"]
---------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
---------------------------------------------------
<1> Constructing a new request.
<2> Providing requests per second throttling for the
deletion processes. Default is no throttling.
<3> Setting how long the deletion processes will be allowed
to run before they are canceled. Default value is `8h` (8 hours).
[id="{upid}-{api}-response"]
==== Delete Expired Data Response
The returned +{response}+ object indicates the acknowledgement of the request:
["source","java",subs="attributes,callouts,macros"]
---------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
---------------------------------------------------
<1> `getDeleted` acknowledges the deletion request.
include::../execution.asciidoc[]