WARNING: Deprecated in 7.15.0.
The Java REST Client is deprecated in favor of the Java API Client.
Info API
editInfo API
editExecution
editCluster information can be retrieved using the info()
method:
MainResponse response = client.info(RequestOptions.DEFAULT);
Response
editThe returned MainResponse
provides various kinds of information about the cluster:
String clusterName = response.getClusterName(); String clusterUuid = response.getClusterUuid(); String nodeName = response.getNodeName(); MainResponse.Version version = response.getVersion(); String buildDate = version.getBuildDate(); String buildFlavor = version.getBuildFlavor(); String buildHash = version.getBuildHash(); String buildType = version.getBuildType(); String luceneVersion = version.getLuceneVersion(); String minimumIndexCompatibilityVersion= version.getMinimumIndexCompatibilityVersion(); String minimumWireCompatibilityVersion = version.getMinimumWireCompatibilityVersion(); String number = version.getNumber();