opensearch-project / opensearch-java

Java Client for OpenSearch
Apache License 2.0
118 stars 182 forks source link

[BUG] org.opensearch.client.util.MissingRequiredPropertyException: Missing required property 'DataPathStats.mount' #872

Open KaueMoura opened 7 months ago

KaueMoura commented 7 months ago

What is the bug?

When a try to get node stats information the exception is thrown. org.opensearch.client.util.MissingRequiredPropertyException: Missing required property 'DataPathStats.mount'

How can one reproduce the bug?

Just get a Opensearch client object and execute this code example.

final OpenSearchClient opClient = OpensearchFactory.getInstance();
final OpenSearchNodesClient nodes = opClient.nodes();
final NodesStatsResponse stats = nodes.stats();  // <- Exception here
System.out.println(stats.nodeStats().total());
System.out.println(stats.nodeStats().successful());
System.out.println(stats.nodeStats().failed());

What is the expected behavior?

I would like to run this code in order to get part of the information from the JSON returned in the node stats api. Request: GET _nodes/stats

"_nodes": {
    "total": 1,
    "successful": 1,
    "failed": 0
},[...]

What is your host/environment?

opensearch-java client version 2.8.4

OpenSearch version 2.11 (Amazon OpenSearch Service)

dennisoelkers commented 6 months ago

Refs #894.