Skip to content

Commit aa147cc

Browse files
committed
Merge remote-tracking branch 'elastic/master' into ccr
* elastic/master: Revert "cluster formation DSL - Gradle integration - part 2 (#32028)" (#32876) cluster formation DSL - Gradle integration - part 2 (#32028) Introduce global checkpoint listeners (#32696) Move connection profile into connection manager (#32858) [ML] Temporarily disabling rolling-upgrade tests Use generic AcknowledgedResponse instead of extended classes (#32859) [ML] Removing old per-partition normalization code (#32816) Use JDK 10 for 6.4 BWC builds (#32866) Removed flaky test. Looks like randomisation makes these assertions unreliable. [test] mute IndexShardTests.testDocStats Introduce the dissect library (#32297) Security: remove password hash bootstrap check (#32440) Move validation to server for put user requests (#32471) [ML] Add high level REST client docs for ML put job endpoint (#32843) Test: Fix forbidden uses in test framework (#32824) Painless: Change fqn_only to no_import (#32817) [test] mute testSearchWithSignificantTermsAgg Watcher: Remove unused hipchat render method (#32211) Watcher: Remove extraneous auth classes (#32300) Watcher: migrate PagerDuty v1 events API to v2 API (#32285)
2 parents 6556186 + bb3eacf commit aa147cc

File tree

307 files changed

+4611
-3638
lines changed

Some content is hidden

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

307 files changed

+4611
-3638
lines changed

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

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,15 @@
2121

2222
import org.elasticsearch.action.ActionListener;
2323
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
24-
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesResponse;
2524
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest;
2625
import org.elasticsearch.action.admin.indices.analyze.AnalyzeRequest;
2726
import org.elasticsearch.action.admin.indices.analyze.AnalyzeResponse;
2827
import org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheRequest;
2928
import org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheResponse;
3029
import org.elasticsearch.action.admin.indices.close.CloseIndexRequest;
31-
import org.elasticsearch.action.admin.indices.close.CloseIndexResponse;
3230
import org.elasticsearch.action.admin.indices.create.CreateIndexRequest;
3331
import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
3432
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
35-
import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse;
3633
import org.elasticsearch.action.admin.indices.flush.FlushRequest;
3734
import org.elasticsearch.action.admin.indices.flush.FlushResponse;
3835
import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest;
@@ -45,7 +42,6 @@
4542
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsRequest;
4643
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
4744
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest;
48-
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse;
4945
import org.elasticsearch.action.admin.indices.open.OpenIndexRequest;
5046
import org.elasticsearch.action.admin.indices.open.OpenIndexResponse;
5147
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
@@ -55,15 +51,14 @@
5551
import org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequest;
5652
import org.elasticsearch.action.admin.indices.settings.get.GetSettingsResponse;
5753
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest;
58-
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsResponse;
5954
import org.elasticsearch.action.admin.indices.shrink.ResizeRequest;
6055
import org.elasticsearch.action.admin.indices.shrink.ResizeResponse;
6156
import org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesRequest;
6257
import org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesResponse;
6358
import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequest;
64-
import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateResponse;
6559
import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryRequest;
6660
import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryResponse;
61+
import org.elasticsearch.action.support.master.AcknowledgedResponse;
6762
import org.elasticsearch.rest.RestStatus;
6863

6964
import java.io.IOException;
@@ -93,9 +88,9 @@ public final class IndicesClient {
9388
* @return the response
9489
* @throws IOException in case there is a problem sending the request or parsing back the response
9590
*/
96-
public DeleteIndexResponse delete(DeleteIndexRequest deleteIndexRequest, RequestOptions options) throws IOException {
91+
public AcknowledgedResponse delete(DeleteIndexRequest deleteIndexRequest, RequestOptions options) throws IOException {
9792
return restHighLevelClient.performRequestAndParseEntity(deleteIndexRequest, RequestConverters::deleteIndex, options,
98-
DeleteIndexResponse::fromXContent, emptySet());
93+
AcknowledgedResponse::fromXContent, emptySet());
9994
}
10095

10196
/**
@@ -106,9 +101,9 @@ public DeleteIndexResponse delete(DeleteIndexRequest deleteIndexRequest, Request
106101
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
107102
* @param listener the listener to be notified upon request completion
108103
*/
109-
public void deleteAsync(DeleteIndexRequest deleteIndexRequest, RequestOptions options, ActionListener<DeleteIndexResponse> listener) {
104+
public void deleteAsync(DeleteIndexRequest deleteIndexRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener) {
110105
restHighLevelClient.performRequestAsyncAndParseEntity(deleteIndexRequest, RequestConverters::deleteIndex, options,
111-
DeleteIndexResponse::fromXContent, listener, emptySet());
106+
AcknowledgedResponse::fromXContent, listener, emptySet());
112107
}
113108

114109
/**
@@ -147,9 +142,9 @@ public void createAsync(CreateIndexRequest createIndexRequest, RequestOptions op
147142
* @return the response
148143
* @throws IOException in case there is a problem sending the request or parsing back the response
149144
*/
150-
public PutMappingResponse putMapping(PutMappingRequest putMappingRequest, RequestOptions options) throws IOException {
145+
public AcknowledgedResponse putMapping(PutMappingRequest putMappingRequest, RequestOptions options) throws IOException {
151146
return restHighLevelClient.performRequestAndParseEntity(putMappingRequest, RequestConverters::putMapping, options,
152-
PutMappingResponse::fromXContent, emptySet());
147+
AcknowledgedResponse::fromXContent, emptySet());
153148
}
154149

155150
/**
@@ -160,9 +155,10 @@ public PutMappingResponse putMapping(PutMappingRequest putMappingRequest, Reques
160155
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
161156
* @param listener the listener to be notified upon request completion
162157
*/
163-
public void putMappingAsync(PutMappingRequest putMappingRequest, RequestOptions options, ActionListener<PutMappingResponse> listener) {
158+
public void putMappingAsync(PutMappingRequest putMappingRequest, RequestOptions options,
159+
ActionListener<AcknowledgedResponse> listener) {
164160
restHighLevelClient.performRequestAsyncAndParseEntity(putMappingRequest, RequestConverters::putMapping, options,
165-
PutMappingResponse::fromXContent, listener, emptySet());
161+
AcknowledgedResponse::fromXContent, listener, emptySet());
166162
}
167163

168164
/**
@@ -231,9 +227,9 @@ public void getFieldMappingAsync(GetFieldMappingsRequest getFieldMappingsRequest
231227
* @return the response
232228
* @throws IOException in case there is a problem sending the request or parsing back the response
233229
*/
234-
public IndicesAliasesResponse updateAliases(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options) throws IOException {
230+
public AcknowledgedResponse updateAliases(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options) throws IOException {
235231
return restHighLevelClient.performRequestAndParseEntity(indicesAliasesRequest, RequestConverters::updateAliases, options,
236-
IndicesAliasesResponse::fromXContent, emptySet());
232+
AcknowledgedResponse::fromXContent, emptySet());
237233
}
238234

239235
/**
@@ -245,9 +241,9 @@ public IndicesAliasesResponse updateAliases(IndicesAliasesRequest indicesAliases
245241
* @param listener the listener to be notified upon request completion
246242
*/
247243
public void updateAliasesAsync(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options,
248-
ActionListener<IndicesAliasesResponse> listener) {
244+
ActionListener<AcknowledgedResponse> listener) {
249245
restHighLevelClient.performRequestAsyncAndParseEntity(indicesAliasesRequest, RequestConverters::updateAliases, options,
250-
IndicesAliasesResponse::fromXContent, listener, emptySet());
246+
AcknowledgedResponse::fromXContent, listener, emptySet());
251247
}
252248

253249
/**
@@ -286,9 +282,9 @@ public void openAsync(OpenIndexRequest openIndexRequest, RequestOptions options,
286282
* @return the response
287283
* @throws IOException in case there is a problem sending the request or parsing back the response
288284
*/
289-
public CloseIndexResponse close(CloseIndexRequest closeIndexRequest, RequestOptions options) throws IOException {
285+
public AcknowledgedResponse close(CloseIndexRequest closeIndexRequest, RequestOptions options) throws IOException {
290286
return restHighLevelClient.performRequestAndParseEntity(closeIndexRequest, RequestConverters::closeIndex, options,
291-
CloseIndexResponse::fromXContent, emptySet());
287+
AcknowledgedResponse::fromXContent, emptySet());
292288
}
293289

294290
/**
@@ -299,9 +295,9 @@ public CloseIndexResponse close(CloseIndexRequest closeIndexRequest, RequestOpti
299295
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
300296
* @param listener the listener to be notified upon request completion
301297
*/
302-
public void closeAsync(CloseIndexRequest closeIndexRequest, RequestOptions options, ActionListener<CloseIndexResponse> listener) {
298+
public void closeAsync(CloseIndexRequest closeIndexRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener) {
303299
restHighLevelClient.performRequestAsyncAndParseEntity(closeIndexRequest, RequestConverters::closeIndex, options,
304-
CloseIndexResponse::fromXContent, listener, emptySet());
300+
AcknowledgedResponse::fromXContent, listener, emptySet());
305301
}
306302

307303

@@ -706,9 +702,9 @@ public void getAliasAsync(GetAliasesRequest getAliasesRequest, RequestOptions op
706702
* @return the response
707703
* @throws IOException in case there is a problem sending the request or parsing back the response
708704
*/
709-
public UpdateSettingsResponse putSettings(UpdateSettingsRequest updateSettingsRequest, RequestOptions options) throws IOException {
705+
public AcknowledgedResponse putSettings(UpdateSettingsRequest updateSettingsRequest, RequestOptions options) throws IOException {
710706
return restHighLevelClient.performRequestAndParseEntity(updateSettingsRequest, RequestConverters::indexPutSettings, options,
711-
UpdateSettingsResponse::fromXContent, emptySet());
707+
AcknowledgedResponse::fromXContent, emptySet());
712708
}
713709

714710
/**
@@ -720,9 +716,9 @@ public UpdateSettingsResponse putSettings(UpdateSettingsRequest updateSettingsRe
720716
* @param listener the listener to be notified upon request completion
721717
*/
722718
public void putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, RequestOptions options,
723-
ActionListener<UpdateSettingsResponse> listener) {
719+
ActionListener<AcknowledgedResponse> listener) {
724720
restHighLevelClient.performRequestAsyncAndParseEntity(updateSettingsRequest, RequestConverters::indexPutSettings, options,
725-
UpdateSettingsResponse::fromXContent, listener, emptySet());
721+
AcknowledgedResponse::fromXContent, listener, emptySet());
726722
}
727723

728724
/**
@@ -734,10 +730,10 @@ public void putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, Reques
734730
* @return the response
735731
* @throws IOException in case there is a problem sending the request or parsing back the response
736732
*/
737-
public PutIndexTemplateResponse putTemplate(PutIndexTemplateRequest putIndexTemplateRequest,
738-
RequestOptions options) throws IOException {
733+
public AcknowledgedResponse putTemplate(PutIndexTemplateRequest putIndexTemplateRequest,
734+
RequestOptions options) throws IOException {
739735
return restHighLevelClient.performRequestAndParseEntity(putIndexTemplateRequest, RequestConverters::putTemplate, options,
740-
PutIndexTemplateResponse::fromXContent, emptySet());
736+
AcknowledgedResponse::fromXContent, emptySet());
741737
}
742738

743739
/**
@@ -749,9 +745,9 @@ public PutIndexTemplateResponse putTemplate(PutIndexTemplateRequest putIndexTemp
749745
* @param listener the listener to be notified upon request completion
750746
*/
751747
public void putTemplateAsync(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options,
752-
ActionListener<PutIndexTemplateResponse> listener) {
748+
ActionListener<AcknowledgedResponse> listener) {
753749
restHighLevelClient.performRequestAsyncAndParseEntity(putIndexTemplateRequest, RequestConverters::putTemplate, options,
754-
PutIndexTemplateResponse::fromXContent, listener, emptySet());
750+
AcknowledgedResponse::fromXContent, listener, emptySet());
755751
}
756752

757753
/**

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
import org.apache.http.HttpEntity;
2323
import org.elasticsearch.action.ActionListener;
24+
import org.elasticsearch.action.support.master.AcknowledgedResponse;
2425
import org.elasticsearch.common.Strings;
2526
import org.elasticsearch.common.io.Streams;
2627
import org.elasticsearch.common.xcontent.DeprecationHandler;
@@ -30,7 +31,6 @@
3031
import org.elasticsearch.common.xcontent.XContentParser;
3132
import org.elasticsearch.common.xcontent.XContentType;
3233
import org.elasticsearch.protocol.xpack.license.DeleteLicenseRequest;
33-
import org.elasticsearch.protocol.xpack.license.DeleteLicenseResponse;
3434
import org.elasticsearch.protocol.xpack.license.GetLicenseRequest;
3535
import org.elasticsearch.protocol.xpack.license.GetLicenseResponse;
3636
import org.elasticsearch.protocol.xpack.license.PutLicenseRequest;
@@ -106,19 +106,19 @@ public void getLicenseAsync(GetLicenseRequest request, RequestOptions options, A
106106
* @return the response
107107
* @throws IOException in case there is a problem sending the request or parsing back the response
108108
*/
109-
public DeleteLicenseResponse deleteLicense(DeleteLicenseRequest request, RequestOptions options) throws IOException {
109+
public AcknowledgedResponse deleteLicense(DeleteLicenseRequest request, RequestOptions options) throws IOException {
110110
return restHighLevelClient.performRequestAndParseEntity(request, RequestConverters::deleteLicense, options,
111-
DeleteLicenseResponse::fromXContent, emptySet());
111+
AcknowledgedResponse::fromXContent, emptySet());
112112
}
113113

114114
/**
115115
* Asynchronously deletes license from the cluster.
116116
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
117117
* @param listener the listener to be notified upon request completion
118118
*/
119-
public void deleteLicenseAsync(DeleteLicenseRequest request, RequestOptions options, ActionListener<DeleteLicenseResponse> listener) {
119+
public void deleteLicenseAsync(DeleteLicenseRequest request, RequestOptions options, ActionListener<AcknowledgedResponse> listener) {
120120
restHighLevelClient.performRequestAsyncAndParseEntity(request, RequestConverters::deleteLicense, options,
121-
DeleteLicenseResponse::fromXContent, listener, emptySet());
121+
AcknowledgedResponse::fromXContent, listener, emptySet());
122122
}
123123

124124
/**

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.elasticsearch.action.ActionRequest;
2828
import org.elasticsearch.action.ActionRequestValidationException;
2929
import org.elasticsearch.action.admin.cluster.storedscripts.DeleteStoredScriptRequest;
30-
import org.elasticsearch.action.admin.cluster.storedscripts.DeleteStoredScriptResponse;
3130
import org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptRequest;
3231
import org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptResponse;
3332
import org.elasticsearch.action.bulk.BulkRequest;
@@ -53,6 +52,7 @@
5352
import org.elasticsearch.action.search.SearchRequest;
5453
import org.elasticsearch.action.search.SearchResponse;
5554
import org.elasticsearch.action.search.SearchScrollRequest;
55+
import org.elasticsearch.action.support.master.AcknowledgedResponse;
5656
import org.elasticsearch.action.update.UpdateRequest;
5757
import org.elasticsearch.action.update.UpdateResponse;
5858
import org.elasticsearch.common.CheckedConsumer;
@@ -916,9 +916,9 @@ public void getScriptAsync(GetStoredScriptRequest request, RequestOptions option
916916
* @return the response
917917
* @throws IOException in case there is a problem sending the request or parsing back the response
918918
*/
919-
public DeleteStoredScriptResponse deleteScript(DeleteStoredScriptRequest request, RequestOptions options) throws IOException {
919+
public AcknowledgedResponse deleteScript(DeleteStoredScriptRequest request, RequestOptions options) throws IOException {
920920
return performRequestAndParseEntity(request, RequestConverters::deleteScript, options,
921-
DeleteStoredScriptResponse::fromXContent, emptySet());
921+
AcknowledgedResponse::fromXContent, emptySet());
922922
}
923923

924924
/**
@@ -930,9 +930,9 @@ public DeleteStoredScriptResponse deleteScript(DeleteStoredScriptRequest request
930930
* @param listener the listener to be notified upon request completion
931931
*/
932932
public void deleteScriptAsync(DeleteStoredScriptRequest request, RequestOptions options,
933-
ActionListener<DeleteStoredScriptResponse> listener) {
933+
ActionListener<AcknowledgedResponse> listener) {
934934
performRequestAsyncAndParseEntity(request, RequestConverters::deleteScript, options,
935-
DeleteStoredScriptResponse::fromXContent, listener, emptySet());
935+
AcknowledgedResponse::fromXContent, listener, emptySet());
936936
}
937937

938938
/**

0 commit comments

Comments
 (0)