mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-07 05:28:34 +00:00
This commit replaces the _estimate_memory_usage API with a new API, the _explain API. The API consolidates information that is useful before creating a data frame analytics job. It includes: - memory estimation - field selection explanation Memory estimation is moved here from what was previously calculated in the _estimate_memory_usage API. Field selection is a new feature that explains to the user whether each available field was selected to be included or not in the analysis. In the case it was not included, it also explains the reason why. Backport of #49455
49 lines
1.8 KiB
Plaintext
49 lines
1.8 KiB
Plaintext
--
|
|
:api: explain-data-frame-analytics
|
|
:request: ExplainDataFrameAnalyticsRequest
|
|
:response: ExplainDataFrameAnalyticsResponse
|
|
--
|
|
[role="xpack"]
|
|
[id="{upid}-{api}"]
|
|
=== Explain {dfanalytics}} API
|
|
|
|
Explains the following about a {dataframe-analytics-config}:
|
|
|
|
* field selection: which fields are included or not in the analysis
|
|
* memory estimation: how much memory is estimated to be required. The estimate can be used when deciding the appropriate value for `model_memory_limit` setting later on.
|
|
|
|
The API accepts an +{request}+ object and returns an +{response}+.
|
|
|
|
[id="{upid}-{api}-request"]
|
|
==== Explain {dfanalytics} request
|
|
|
|
The request can be constructed with the id of an existing {dfanalytics-job}.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-id-request]
|
|
--------------------------------------------------
|
|
<1> Constructing a new request with the id of an existing {dfanalytics-job}
|
|
|
|
It can also be constructed with a {dataframe-analytics-config} to explain it before creating it.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-config-request]
|
|
--------------------------------------------------
|
|
<1> Constructing a new request containing a {dataframe-analytics-config}
|
|
|
|
include::../execution.asciidoc[]
|
|
|
|
[id="{upid}-{api}-response"]
|
|
==== Response
|
|
|
|
The returned +{response}+ contains the field selection and the memory usage estimation.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
--------------------------------------------------
|
|
<1> A list where each item explains whether a field was selected for analysis or not
|
|
<2> The memory estimation for the {dfanalytics-job}
|