Add remote info to the HLRC (#50482)

Unreverts the commit that added the remote info api to HLRC (#49657).

The additional change to the original PR, is that `org.elasticsearch.client.cluster.RemoteConnectionInfo` now parses the initial_connect_timeout field as a string instead of a TimeValue instance.

The reason that this is needed is because that the initial_connect_timeout field in the remote connection api is serialized for human consumption, but not for parsing purposes.
Therefore the HLRC can't parse it correctly (which caused test failures in CI, but not in the PR CI
:( ). The way this field is serialized needs to be changed in the remote connection api, but that is a breaking change. We should wait making this change until rest api versioning is introduced.

Co-Authored-By: j-bean anton.shuvaev91@gmail.com
This commit is contained in:
Martijn van Groningen 2019-12-24 13:20:39 +01:00 committed by GitHub
parent b7ac7324d2
commit a48d19d73a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 773 additions and 74 deletions

View file

@ -0,0 +1,32 @@
--
:api: remote-info
:request: RemoteInfoRequest
:response: RemoteInfoResponse
--
[id="{upid}-{api}"]
=== Remote Cluster Info API
The Remote cluster info API allows to get all of the configured remote cluster information.
[id="{upid}-{api}-request"]
==== Remote Cluster Info Request
A +{request}+:
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
There are no required parameters.
==== Remote Cluster Info Response
The returned +{response}+ allows to retrieve remote cluster information.
It returns connection and endpoint information keyed by the configured remote cluster alias.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------

View file

@ -168,12 +168,14 @@ The Java High Level REST Client supports the following Cluster APIs:
* <<java-rest-high-cluster-put-settings>>
* <<java-rest-high-cluster-get-settings>>
* <<java-rest-high-cluster-health>>
* <<java-rest-high-cluster-remote-info>>
:upid: {mainid}-cluster
:doc-tests-file: {doc-tests}/ClusterClientDocumentationIT.java
include::cluster/put_settings.asciidoc[]
include::cluster/get_settings.asciidoc[]
include::cluster/health.asciidoc[]
include::cluster/remote_info.asciidoc[]
== Ingest APIs
The Java High Level REST Client supports the following Ingest APIs: