-
Notifications
You must be signed in to change notification settings - Fork 191
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
[FEATURE] Add support for indexing pressure stats #453
Comments
in which version of opensearch were these stats added to the node stats API? Is the next step to add this to the API spec? |
The blog post says 1.2. The relevant PR adding the API is opensearch-project/OpenSearch#1336 merged on Oct 7 2021, which would seem to concur (v1.2.0 label on the PR, 1.1 was Oct 5, 1.2 was Nov 23.)
Possibly? I've heard mixed reports on whether we use the spec files. Happy to attempt to update those, is the process to do so and prompt client builds documented somewhere? The issue discussing generating from spec is still open/unresolved. opensearch-project/OpenSearch#3090 See also opensearch-project/opensearch-clients#19 |
opensearch-java is not built from spec, but there's been generator progress in the more loosely typed languages. We should start with smithy spec modification. I'm guessing that's here: https://github.com/opensearch-project/opensearch-api-specification/tree/main/model/nodes/stats You would be the first person since the creation of the smithy spec who would be adding a new field/parameter. Please feel free to open issues in the api spec repo as you run into the inevitable friction in this process. |
To add this feature in the java client, its through manual code until we implement a generator for this client. For other clients where we have client generators in progress, it would be through the spec. We have been adding a lot of new specs to the Smithy specs in various modules, so please feel free to raise an issue for the same and we can help you get those changes in! |
Feel free to assign this issue to me. I'll take care of it as time permits. I understand:
|
Yup that sounds right @dbwiddis. Thank you for taking this up! |
Is your feature request related to a problem?
Extensions need access to the node / shard indexing pressure APIs to know when to throttle requests.
See this blog post.
But with this API:
The Anomaly Detection HCAD framework currently uses local node Indexing Pressure as a throttling mechanism. When indexing pressure is low, all results are recorded; when it is high, selective results are discarded to respect node health.
We would like to enable a similar mechanism for the Anomaly Detection extension, where we can self-throttle what we index based on the health of the cluster.
While the
opensearch-java
client do implementNodeStatsRequest
andNodeStatsResponse
objects for use withclient.nodes().stats()
, they response object only includes a subset of the available Nodes stats, notably missing the results forindexing_pressure
(currently used by AD plugin) andshard_indexing_pressure
(as described in the blog post above).What solution would you like?
Add parsing for the full set of Nodes stats: specifically
indexing_pressure
andshard_indexing_pressure
.What alternatives have you considered?
GET /_nodes/stats/indexing_pressure/
orGET /_nodes/stats/shard_indexing_pressure/
endpoints and manually parsing the JSON response.Do you have any additional context?
Originated from: opensearch-project/opensearch-sdk-java#655
The text was updated successfully, but these errors were encountered: