From 55a19ed39436e328bb362db33c2fb93ab6f49887 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Fri, 1 Dec 2017 12:24:26 +0100 Subject: [PATCH] Deprecate the transport client in favour of the high-level REST client (elastic/x-pack-elasticsearch#2779) Original commit: elastic/x-pack-elasticsearch@2aeef5df3f1beca31b823a62ed019658dbeb7e14 --- docs/en/security/tribe-clients-integrations/java.asciidoc | 2 ++ docs/en/setup/setup-xclient.asciidoc | 6 ++---- docs/en/watcher/java.asciidoc | 2 ++ .../xpack/client/PreBuiltXPackTransportClient.java | 3 +++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/en/security/tribe-clients-integrations/java.asciidoc b/docs/en/security/tribe-clients-integrations/java.asciidoc index 150a4c38638..f3acd757124 100644 --- a/docs/en/security/tribe-clients-integrations/java.asciidoc +++ b/docs/en/security/tribe-clients-integrations/java.asciidoc @@ -1,6 +1,8 @@ [[java-clients]] === Java Client and Security +deprecated[7.0.0, The `TransportClient` is deprecated in favour of the {java-rest}/java-rest-high.html[Java High Level REST Client] and will be removed in Elasticsearch 8.0. The {java-rest}/java-rest-high-level-migration.html[migration guide] describes all the steps needed to migrate.] + {security} supports the Java http://www.elastic.co/guide/en/elasticsearch/client/java-api/current/transport-client.html[transport client] for Elasticsearch. The transport client uses the same transport protocol that the cluster nodes use for inter-node communication. It is very efficient as it does not have to marshall diff --git a/docs/en/setup/setup-xclient.asciidoc b/docs/en/setup/setup-xclient.asciidoc index 46aca116885..b94d4fe9c10 100644 --- a/docs/en/setup/setup-xclient.asciidoc +++ b/docs/en/setup/setup-xclient.asciidoc @@ -2,14 +2,12 @@ [[setup-xpack-client]] == Configuring {xpack} Java Clients +deprecated[7.0.0, The `TransportClient` is deprecated in favour of the {java-rest}/java-rest-high.html[Java High Level REST Client] and will be removed in Elasticsearch 8.0. The {java-rest}/java-rest-high-level-migration.html[migration guide] describes all the steps needed to migrate.] + If you want to use a Java {javaclient}/transport-client.html[transport client] with a cluster where {xpack} is installed, then you must download and configure the {xpack} transport client. -WARNING: The `TransportClient` is aimed to be replaced by the Java High Level REST -Client, which executes HTTP requests instead of serialized Java requests. The -`TransportClient` will be deprecated in upcoming versions of {es}. - . Add the {xpack} transport JAR file to your *CLASSPATH*. You can download the {xpack} distribution and extract the JAR file manually or you can get it from the https://artifacts.elastic.co/maven/org/elasticsearch/client/x-pack-transport/{version}/x-pack-transport-{version}.jar[Elasticsearc Maven repository]. diff --git a/docs/en/watcher/java.asciidoc b/docs/en/watcher/java.asciidoc index f4b81f9eaeb..b16df8e19b7 100644 --- a/docs/en/watcher/java.asciidoc +++ b/docs/en/watcher/java.asciidoc @@ -1,6 +1,8 @@ [[api-java]] == Java API +deprecated[7.0.0, The `TransportClient` is deprecated in favour of the {java-rest}/java-rest-high.html[Java High Level REST Client] and will be removed in Elasticsearch 8.0. The {java-rest}/java-rest-high-level-migration.html[migration guide] describes all the steps needed to migrate.] + {xpack} provides a Java client called `WatcherClient` that adds native Java support for the {watcher}. diff --git a/transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java b/transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java index 907fee4cdaa..2fffd105bc7 100644 --- a/transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java +++ b/transport-client/src/main/java/org/elasticsearch/xpack/client/PreBuiltXPackTransportClient.java @@ -25,8 +25,11 @@ import java.util.concurrent.TimeUnit; * all of the plugins installed by the {@link PreBuiltTransportClient} and the * {@link XPackPlugin} so that the client may be used with an x-pack enabled * cluster. + * + * @deprecated {@link TransportClient} is deprecated in favour of the high-level REST client and will be removed in Elasticsearch 8.0 */ @SuppressWarnings({"unchecked","varargs"}) +@Deprecated public class PreBuiltXPackTransportClient extends PreBuiltTransportClient { @SafeVarargs