Skip to content

Commit 4ba731a

Browse files
committed
Merge remote-tracking branch 'origin/master' into snapshot-lifecycle-management
2 parents 6d0aad5 + 2b35157 commit 4ba731a

File tree

135 files changed

+975
-3671
lines changed

Some content is hidden

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

135 files changed

+975
-3671
lines changed

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

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,9 @@
1919

2020
package org.elasticsearch.client;
2121

22+
import org.elasticsearch.action.ActionListener;
2223
import org.elasticsearch.client.migration.DeprecationInfoRequest;
2324
import org.elasticsearch.client.migration.DeprecationInfoResponse;
24-
import org.elasticsearch.client.migration.IndexUpgradeInfoRequest;
25-
import org.elasticsearch.client.migration.IndexUpgradeInfoResponse;
26-
import org.elasticsearch.action.ActionListener;
27-
import org.elasticsearch.client.tasks.TaskSubmissionResponse;
28-
import org.elasticsearch.index.reindex.BulkByScrollResponse;
29-
import org.elasticsearch.client.migration.IndexUpgradeRequest;
30-
3125

3226
import java.io.IOException;
3327
import java.util.Collections;
@@ -47,34 +41,6 @@ public final class MigrationClient {
4741
this.restHighLevelClient = restHighLevelClient;
4842
}
4943

50-
/**
51-
* Get Migration Assistance for one or more indices
52-
*
53-
* @param request the request
54-
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
55-
* @return the response
56-
* @throws IOException in case there is a problem sending the request or parsing back the response
57-
*/
58-
public IndexUpgradeInfoResponse getAssistance(IndexUpgradeInfoRequest request, RequestOptions options) throws IOException {
59-
return restHighLevelClient.performRequestAndParseEntity(request, MigrationRequestConverters::getMigrationAssistance, options,
60-
IndexUpgradeInfoResponse::fromXContent, Collections.emptySet());
61-
}
62-
63-
public BulkByScrollResponse upgrade(IndexUpgradeRequest request, RequestOptions options) throws IOException {
64-
return restHighLevelClient.performRequestAndParseEntity(request, MigrationRequestConverters::migrate, options,
65-
BulkByScrollResponse::fromXContent, Collections.emptySet());
66-
}
67-
68-
public TaskSubmissionResponse submitUpgradeTask(IndexUpgradeRequest request, RequestOptions options) throws IOException {
69-
return restHighLevelClient.performRequestAndParseEntity(request, MigrationRequestConverters::submitMigrateTask, options,
70-
TaskSubmissionResponse::fromXContent, Collections.emptySet());
71-
}
72-
73-
public void upgradeAsync(IndexUpgradeRequest request, RequestOptions options, ActionListener<BulkByScrollResponse> listener) {
74-
restHighLevelClient.performRequestAsyncAndParseEntity(request, MigrationRequestConverters::migrate, options,
75-
BulkByScrollResponse::fromXContent, listener, Collections.emptySet());
76-
}
77-
7844
/**
7945
* Get deprecation info for one or more indices
8046
* @param request the request

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

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,13 @@
2020
package org.elasticsearch.client;
2121

2222
import org.apache.http.client.methods.HttpGet;
23-
import org.apache.http.client.methods.HttpPost;
2423
import org.elasticsearch.client.migration.DeprecationInfoRequest;
25-
import org.elasticsearch.client.migration.IndexUpgradeInfoRequest;
26-
import org.elasticsearch.client.migration.IndexUpgradeRequest;
2724

2825
final class MigrationRequestConverters {
2926

3027
private MigrationRequestConverters() {
3128
}
3229

33-
static Request getMigrationAssistance(IndexUpgradeInfoRequest indexUpgradeInfoRequest) {
34-
RequestConverters.EndpointBuilder endpointBuilder = new RequestConverters.EndpointBuilder()
35-
.addPathPartAsIs("_migration", "assistance")
36-
.addCommaSeparatedPathParts(indexUpgradeInfoRequest.indices());
37-
String endpoint = endpointBuilder.build();
38-
Request request = new Request(HttpGet.METHOD_NAME, endpoint);
39-
RequestConverters.Params parameters = new RequestConverters.Params(request);
40-
parameters.withIndicesOptions(indexUpgradeInfoRequest.indicesOptions());
41-
return request;
42-
}
43-
44-
static Request migrate(IndexUpgradeRequest indexUpgradeRequest) {
45-
return prepareMigrateRequest(indexUpgradeRequest, true);
46-
}
47-
48-
static Request submitMigrateTask(IndexUpgradeRequest indexUpgradeRequest) {
49-
return prepareMigrateRequest(indexUpgradeRequest, false);
50-
}
51-
5230
static Request getDeprecationInfo(DeprecationInfoRequest deprecationInfoRequest) {
5331
String endpoint = new RequestConverters.EndpointBuilder()
5432
.addCommaSeparatedPathParts(deprecationInfoRequest.getIndices())
@@ -57,18 +35,4 @@ static Request getDeprecationInfo(DeprecationInfoRequest deprecationInfoRequest)
5735

5836
return new Request(HttpGet.METHOD_NAME, endpoint);
5937
}
60-
61-
private static Request prepareMigrateRequest(IndexUpgradeRequest indexUpgradeRequest, boolean waitForCompletion) {
62-
String endpoint = new RequestConverters.EndpointBuilder()
63-
.addPathPartAsIs("_migration", "upgrade")
64-
.addPathPart(indexUpgradeRequest.index())
65-
.build();
66-
67-
Request request = new Request(HttpPost.METHOD_NAME, endpoint);
68-
69-
RequestConverters.Params params = new RequestConverters.Params(request)
70-
.withWaitForCompletion(waitForCompletion);
71-
72-
return request;
73-
}
7438
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@
9494
import org.elasticsearch.search.aggregations.bucket.filter.ParsedFilter;
9595
import org.elasticsearch.search.aggregations.bucket.filter.ParsedFilters;
9696
import org.elasticsearch.search.aggregations.bucket.geogrid.GeoHashGridAggregationBuilder;
97+
import org.elasticsearch.search.aggregations.bucket.geogrid.GeoTileGridAggregationBuilder;
9798
import org.elasticsearch.search.aggregations.bucket.geogrid.ParsedGeoHashGrid;
9899
import org.elasticsearch.search.aggregations.bucket.geogrid.ParsedGeoTileGrid;
99-
import org.elasticsearch.search.aggregations.bucket.geogrid.GeoTileGridAggregationBuilder;
100100
import org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder;
101101
import org.elasticsearch.search.aggregations.bucket.global.ParsedGlobal;
102102
import org.elasticsearch.search.aggregations.bucket.histogram.AutoDateHistogramAggregationBuilder;
@@ -428,7 +428,7 @@ public IndexLifecycleClient indexLifecycle() {
428428
}
429429

430430
/**
431-
* Provides methods for accessing the Elastic Licensed Licensing APIs that
431+
* Provides methods for accessing the Elastic Licensed Migration APIs that
432432
* are shipped with the default distribution of Elasticsearch. All of
433433
* these APIs will 404 if run against the OSS distribution of Elasticsearch.
434434
* <p>

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

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

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

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

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

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

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

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

0 commit comments

Comments
 (0)