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

NodeInfoPath.repo should be optional #305

Closed
swallez opened this issue Jun 1, 2022 · 3 comments
Closed

NodeInfoPath.repo should be optional #305

swallez opened this issue Jun 1, 2022 · 3 comments
Labels
Area: Specification Related to the API spec used to generate client code

Comments

@swallez
Copy link
Member

swallez commented Jun 1, 2022

Reported in https://discuss.elastic.co/t/how-to-get-details-from-nodes-api-with-java-client/305732

@swallez swallez added the Area: Specification Related to the API spec used to generate client code label Jun 1, 2022
@MrUmnyj
Copy link

MrUmnyj commented Feb 16, 2023

I found this bug in 7.17.9 version too.
The method given by the link https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/missing-required-property.html is not working because on the co.elastic.clients.elasticsearch.nodes.info.NodeInfoPath#NodeInfoPath this.repo set a value from ApiTypeHelper.unmodifiableRequired, but builder.repo is null, and there is NPE error.
Please fix this bug in 7.17 and 8 versions.

@MrUmnyj
Copy link

MrUmnyj commented Feb 16, 2023

But if we give information without "settings", there is no parsing error.
We can use metrics: https://www.elastic.co/guide/en/elasticsearch/reference/7.17/cluster-nodes-info.html .
For example:

NodesInfoRequest nodesInfoRequest = NodesInfoRequest.of(n -> n.metric("jvm", "os"))
NodesInfoResponse nodesInfoResponse = elasticClient.nodes().info(nodesInfoRequest)

@l-trotta
Copy link
Contributor

fixed as part of elastic/elasticsearch-java#745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Specification Related to the API spec used to generate client code
Projects
None yet
Development

No branches or pull requests

3 participants