Skip to content
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

[BUG] /_nodes/stats throwing serialization error #47

Closed
mitalawachat opened this issue Oct 13, 2021 · 8 comments · Fixed by #315
Closed

[BUG] /_nodes/stats throwing serialization error #47

mitalawachat opened this issue Oct 13, 2021 · 8 comments · Fixed by #315
Assignees
Labels
bug Something isn't working

Comments

@mitalawachat
Copy link
Contributor

What is the bug?

import org.opensearch.clients.opensearch.nodes.StatsRequest;
import org.opensearch.clients.opensearch.nodes.StatsResponse;
...
...
StatsRequest statsRequest = new StatsRequest.Builder().build();
StatsResponse statsResponse = client.nodes().stats(statsRequest);
...
...

Throws:

jakarta.json.stream.JsonParsingException: Unexpected JSON event 'VALUE_STRING', expected [START_ARRAY]

What is the expected behavior?
Node stats response.

@mitalawachat mitalawachat added the bug Something isn't working label Oct 13, 2021
@wbeckler
Copy link

wbeckler commented Aug 7, 2022

Has anyone else gotten StatsRequest to work who can share example code? @mitalawachat is this still not working in the latest version?

@VachaShah
Copy link
Collaborator

VachaShah commented Nov 17, 2022

To use NodesStatsRequest:

NodesStatsRequest statsRequest = new NodesStatsRequest.Builder().build();
NodesStatsResponse statsResponse = client.nodes().stats(statsRequest);

which gives the error:

Validation failed Missing required property 'MemoryStats.totalInBytes'

Another example with a specific metric:

NodesStatsRequest statsRequest = new NodesStatsRequest.Builder().metric("os").build();
NodesStatsResponse statsResponse = client.nodes().stats(statsRequest);

which gives the error:

Validation failed Missing required property 'Stats.adaptiveSelection'

Will work on fixing this.

@reta
Copy link
Collaborator

reta commented Dec 1, 2022

@VachaShah are you looking into it? thanks!

@VachaShah
Copy link
Collaborator

@VachaShah are you looking into it? thanks!

@reta Sorry for the delay! I have been on vacation, I was working on this before that but did not get a chance to publish a PR for the same.

@reta
Copy link
Collaborator

reta commented Jan 5, 2023

@VachaShah are you looking into it? thanks!

@reta Sorry for the delay! I have been on vacation, I was working on this before that but did not get a chance to publish a PR for the same.

@VachaShah ah sorry about that, @wbeckler was pretty sure you haven't started on that ....

@VachaShah
Copy link
Collaborator

@VachaShah are you looking into it? thanks!

@reta Sorry for the delay! I have been on vacation, I was working on this before that but did not get a chance to publish a PR for the same.

@VachaShah ah sorry about that, @wbeckler was pretty sure you haven't started on that ....

Thats totally fine. Let me know if you want me to work on it, I see you already raised a PR for fixing it :)

@reta
Copy link
Collaborator

reta commented Jan 5, 2023

@VachaShah are you looking into it? thanks!

@reta Sorry for the delay! I have been on vacation, I was working on this before that but did not get a chance to publish a PR for the same.

@VachaShah ah sorry about that, @wbeckler was pretty sure you haven't started on that ....

Thats totally fine. Let me know if you want me to work on it, I see you already raised a PR for fixing it :)

Yeah, I am not sure what is the best way to go - if you moved further along, please feel free to close my pull request. If not, I have one item to do before moving it from draft state - port all IT tests to use OpenSearchClient instead of RHCL (we have many of those in core). Thanks!

@VachaShah
Copy link
Collaborator

@VachaShah are you looking into it? thanks!

@reta Sorry for the delay! I have been on vacation, I was working on this before that but did not get a chance to publish a PR for the same.

@VachaShah ah sorry about that, @wbeckler was pretty sure you haven't started on that ....

Thats totally fine. Let me know if you want me to work on it, I see you already raised a PR for fixing it :)

Yeah, I am not sure what is the best way to go - if you moved further along, please feel free to close my pull request. If not, I have one item to do before moving it from draft state - port all IT tests to use OpenSearchClient instead of RHCL (we have many of those in core). Thanks!

I think you can take over, the changes are the same plus the port that you mentioned. Thank you for taking this up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants