Skip to content

Commit b15d62c

Browse files
authored
Remove the transport client (#42538)
This commit removes the transport client and all remaining uses in the code.
1 parent 1db3864 commit b15d62c

File tree

155 files changed

+261
-2575
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+261
-2575
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,7 @@ Commercially licensed code that integrates with the rest of Elasticsearch. The
325325
`docs` subdirectory functions just like the top level `docs` subdirectory and
326326
the `qa` subdirectory functions just like the top level `qa` subdirectory. The
327327
`plugin` subdirectory contains the x-pack module which runs inside the
328-
Elasticsearch process. The `transport-client` subdirectory contains extensions
329-
to Elasticsearch's standard transport client to work properly with x-pack.
328+
Elasticsearch process.
330329

331330
### Gradle Build
332331

TESTING.asciidoc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,6 @@ e.g. -Dtests.rest.suite=index,get,create/10_with_id
305305
blacklisted and need to be skipped
306306
e.g. -Dtests.rest.blacklist=index/*/Index document,get/10_basic/*
307307

308-
Note that the REST tests, like all the integration tests, can be run against an external
309-
cluster by specifying the `tests.cluster` property, which if present needs to contain a
310-
comma separated list of nodes to connect to (e.g. localhost:9300). A transport client will
311-
be created based on that and used for all the before|after test operations, and to extract
312-
the http addresses of the nodes so that REST requests can be sent to them.
313-
314308
== Testing packaging
315309

316310
The packaging tests use Vagrant virtual machines to verify that installing

client/benchmark/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ Example invocation:
5454

5555
The parameters are in order:
5656

57-
* Client type: Use either "rest" or "transport"
57+
* Client type: Always "rest"
5858
* Benchmark type: Use either "bulk" or "search"
5959
* Benchmark target host IP (the host where Elasticsearch is running)
6060
* name of the index
61-
* a search request body (remember to escape double quotes). The `TransportClientBenchmark` uses `QueryBuilders.wrapperQuery()` internally which automatically adds a root key `query`, so it must not be present in the command line parameter.
61+
* a search request body (remember to escape double quotes).
6262
* A comma-separated list of target throughput rates

client/benchmark/build.gradle

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,10 @@ test.enabled = false
3434
dependencies {
3535
compile 'org.apache.commons:commons-math3:3.2'
3636

37-
compile project(":client:rest")
37+
compile project(':server')
38+
compile project(':client:rest')
3839
// bottleneck should be the client, not Elasticsearch
3940
compile project(path: ':client:client-benchmark-noop-api-plugin')
40-
// for transport client
41-
compile project(":server")
42-
compile project(":client:transport")
43-
compile project(path: ':modules:transport-netty4', configuration: 'runtime')
44-
compile project(path: ':modules:reindex', configuration: 'runtime')
45-
compile project(path: ':modules:lang-mustache', configuration: 'runtime')
46-
compile project(path: ':modules:percolator', configuration: 'runtime')
4741
}
4842

4943
// No licenses for our benchmark deps (we don't ship benchmarks)

client/benchmark/src/main/java/org/elasticsearch/client/benchmark/BenchmarkMain.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
package org.elasticsearch.client.benchmark;
2020

2121
import org.elasticsearch.client.benchmark.rest.RestClientBenchmark;
22-
import org.elasticsearch.client.benchmark.transport.TransportClientBenchmark;
2322
import org.elasticsearch.common.SuppressForbidden;
2423

2524
import java.util.Arrays;
@@ -30,9 +29,6 @@ public static void main(String[] args) throws Exception {
3029
String type = args[0];
3130
AbstractBenchmark<?> benchmark = null;
3231
switch (type) {
33-
case "transport":
34-
benchmark = new TransportClientBenchmark();
35-
break;
3632
case "rest":
3733
benchmark = new RestClientBenchmark();
3834
break;

client/benchmark/src/main/java/org/elasticsearch/client/benchmark/transport/TransportClientBenchmark.java

Lines changed: 0 additions & 127 deletions
This file was deleted.

client/rest-high-level/src/main/java/org/elasticsearch/client/IndicesRequestConverters.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,6 @@ static Request getIndex(GetIndexRequest getIndexRequest) {
447447
*/
448448
@Deprecated
449449
static Request indicesExist(org.elasticsearch.action.admin.indices.get.GetIndexRequest getIndexRequest) {
450-
// this can be called with no indices as argument by transport client, not via REST though
451450
if (getIndexRequest.indices() == null || getIndexRequest.indices().length == 0) {
452451
throw new IllegalArgumentException("indices are mandatory");
453452
}
@@ -465,7 +464,6 @@ static Request indicesExist(org.elasticsearch.action.admin.indices.get.GetIndexR
465464
}
466465

467466
static Request indicesExist(GetIndexRequest getIndexRequest) {
468-
// this can be called with no indices as argument by transport client, not via REST though
469467
if (getIndexRequest.indices() == null || getIndexRequest.indices().length == 0) {
470468
throw new IllegalArgumentException("indices are mandatory");
471469
}

client/rest-high-level/src/test/java/org/elasticsearch/client/DataFrameRequestConvertersTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class DataFrameRequestConvertersTests extends ESTestCase {
5252

5353
@Override
5454
protected NamedXContentRegistry xContentRegistry() {
55-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
55+
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
5656
return new NamedXContentRegistry(searchModule.getNamedXContents());
5757
}
5858

client/rest-high-level/src/test/java/org/elasticsearch/client/ESRestHighLevelClientTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ protected interface AsyncMethodNoRequest<Response> {
131131

132132
private static class HighLevelClient extends RestHighLevelClient {
133133
private HighLevelClient(RestClient restClient) {
134-
super(restClient, (client) -> {}, new SearchModule(Settings.EMPTY, false, Collections.emptyList()).getNamedXContents());
134+
super(restClient, (client) -> {}, new SearchModule(Settings.EMPTY, Collections.emptyList()).getNamedXContents());
135135
}
136136
}
137137

client/rest-high-level/src/test/java/org/elasticsearch/client/PingAndInfoIT.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,7 @@ public void testXPackInfo() throws IOException {
9090
public void testXPackInfoEmptyRequest() throws IOException {
9191
XPackInfoResponse info = highLevelClient().xpack().info(new XPackInfoRequest(), RequestOptions.DEFAULT);
9292

93-
/*
94-
* The default in the transport client is non-verbose and returning
95-
* no categories which is the opposite of the default when you use
96-
* the API over REST. We don't want to break the transport client
97-
* even though it doesn't feel like a good default.
98-
*/
93+
// TODO: reconsider this leniency now that the transport client is gone
9994
assertNull(info.getBuildInfo());
10095
assertNull(info.getLicenseInfo());
10196
assertNull(info.getFeatureSetsInfo());

client/rest-high-level/src/test/java/org/elasticsearch/client/dataframe/GetDataFrameTransformResponseTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private static void toXContent(GetDataFrameTransformResponse response, XContentB
7878

7979
@Override
8080
protected NamedXContentRegistry xContentRegistry() {
81-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
81+
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
8282
return new NamedXContentRegistry(searchModule.getNamedXContents());
8383
}
8484
}

client/rest-high-level/src/test/java/org/elasticsearch/client/dataframe/PreviewDataFrameTransformRequestTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected boolean supportsUnknownFields() {
5454

5555
@Override
5656
protected NamedXContentRegistry xContentRegistry() {
57-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
57+
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
5858
return new NamedXContentRegistry(searchModule.getNamedXContents());
5959
}
6060

client/rest-high-level/src/test/java/org/elasticsearch/client/dataframe/PutDataFrameTransformRequestTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected boolean supportsUnknownFields() {
7070

7171
@Override
7272
protected NamedXContentRegistry xContentRegistry() {
73-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
73+
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
7474
return new NamedXContentRegistry(searchModule.getNamedXContents());
7575
}
7676
}

client/rest-high-level/src/test/java/org/elasticsearch/client/dataframe/transforms/DataFrameTransformConfigTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected Predicate<String> getRandomFieldsExcludeFilter() {
6363

6464
@Override
6565
protected NamedXContentRegistry xContentRegistry() {
66-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
66+
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
6767
return new NamedXContentRegistry(searchModule.getNamedXContents());
6868
}
6969
}

client/rest-high-level/src/test/java/org/elasticsearch/client/dataframe/transforms/QueryConfigTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected boolean supportsUnknownFields() {
5656

5757
@Override
5858
protected NamedXContentRegistry xContentRegistry() {
59-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, emptyList());
59+
SearchModule searchModule = new SearchModule(Settings.EMPTY, emptyList());
6060
return new NamedXContentRegistry(searchModule.getNamedXContents());
6161
}
6262
}

client/rest-high-level/src/test/java/org/elasticsearch/client/dataframe/transforms/SourceConfigTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected SourceConfig createTestInstance() {
6262

6363
@Override
6464
protected NamedXContentRegistry xContentRegistry() {
65-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, emptyList());
65+
SearchModule searchModule = new SearchModule(Settings.EMPTY, emptyList());
6666
return new NamedXContentRegistry(searchModule.getNamedXContents());
6767
}
6868
}

client/rest-high-level/src/test/java/org/elasticsearch/client/dataframe/transforms/pivot/AggregationConfigTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ protected boolean supportsUnknownFields() {
6666

6767
@Override
6868
protected NamedXContentRegistry xContentRegistry() {
69-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, emptyList());
69+
SearchModule searchModule = new SearchModule(Settings.EMPTY, emptyList());
7070
return new NamedXContentRegistry(searchModule.getNamedXContents());
7171
}
7272

client/rest-high-level/src/test/java/org/elasticsearch/client/dataframe/transforms/pivot/PivotConfigTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ protected Predicate<String> getRandomFieldsExcludeFilter() {
6060

6161
@Override
6262
protected NamedXContentRegistry xContentRegistry() {
63-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
63+
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
6464
return new NamedXContentRegistry(searchModule.getNamedXContents());
6565
}
6666
}

client/rest-high-level/src/test/java/org/elasticsearch/client/ml/job/config/AnalysisConfigTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ private static AnalysisConfig.Builder createValidCategorizationConfig() {
256256

257257
@Override
258258
protected NamedXContentRegistry xContentRegistry() {
259-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
259+
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
260260
return new NamedXContentRegistry(searchModule.getNamedXContents());
261261
}
262262
}

client/rest-high-level/src/test/java/org/elasticsearch/client/ml/job/config/JobTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public static Job createRandomizedJob() {
168168

169169
@Override
170170
protected NamedXContentRegistry xContentRegistry() {
171-
SearchModule searchModule = new SearchModule(Settings.EMPTY, false, Collections.emptyList());
171+
SearchModule searchModule = new SearchModule(Settings.EMPTY, Collections.emptyList());
172172
return new NamedXContentRegistry(searchModule.getNamedXContents());
173173
}
174174
}

client/transport/build.gradle

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)