Skip to content

Commit

Permalink
Merge remote-tracking branch 'elastic/master' into ccr
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
jasontedor committed Aug 15, 2018
2 parents 6556186 + bb3eacf commit aa147cc
Show file tree
Hide file tree
Showing 307 changed files with 4,611 additions and 3,638 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@

import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesRequest;
import org.elasticsearch.action.admin.indices.alias.IndicesAliasesResponse;
import org.elasticsearch.action.admin.indices.alias.get.GetAliasesRequest;
import org.elasticsearch.action.admin.indices.analyze.AnalyzeRequest;
import org.elasticsearch.action.admin.indices.analyze.AnalyzeResponse;
import org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheRequest;
import org.elasticsearch.action.admin.indices.cache.clear.ClearIndicesCacheResponse;
import org.elasticsearch.action.admin.indices.close.CloseIndexRequest;
import org.elasticsearch.action.admin.indices.close.CloseIndexResponse;
import org.elasticsearch.action.admin.indices.create.CreateIndexRequest;
import org.elasticsearch.action.admin.indices.create.CreateIndexResponse;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse;
import org.elasticsearch.action.admin.indices.flush.FlushRequest;
import org.elasticsearch.action.admin.indices.flush.FlushResponse;
import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest;
Expand All @@ -45,7 +42,6 @@
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsRequest;
import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest;
import org.elasticsearch.action.admin.indices.mapping.put.PutMappingResponse;
import org.elasticsearch.action.admin.indices.open.OpenIndexRequest;
import org.elasticsearch.action.admin.indices.open.OpenIndexResponse;
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
Expand All @@ -55,15 +51,14 @@
import org.elasticsearch.action.admin.indices.settings.get.GetSettingsRequest;
import org.elasticsearch.action.admin.indices.settings.get.GetSettingsResponse;
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest;
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsResponse;
import org.elasticsearch.action.admin.indices.shrink.ResizeRequest;
import org.elasticsearch.action.admin.indices.shrink.ResizeResponse;
import org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesRequest;
import org.elasticsearch.action.admin.indices.template.get.GetIndexTemplatesResponse;
import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateRequest;
import org.elasticsearch.action.admin.indices.template.put.PutIndexTemplateResponse;
import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryRequest;
import org.elasticsearch.action.admin.indices.validate.query.ValidateQueryResponse;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.rest.RestStatus;

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

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

/**
Expand Down Expand Up @@ -147,9 +142,9 @@ public void createAsync(CreateIndexRequest createIndexRequest, RequestOptions op
* @return the response
* @throws IOException in case there is a problem sending the request or parsing back the response
*/
public PutMappingResponse putMapping(PutMappingRequest putMappingRequest, RequestOptions options) throws IOException {
public AcknowledgedResponse putMapping(PutMappingRequest putMappingRequest, RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(putMappingRequest, RequestConverters::putMapping, options,
PutMappingResponse::fromXContent, emptySet());
AcknowledgedResponse::fromXContent, emptySet());
}

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

/**
Expand Down Expand Up @@ -231,9 +227,9 @@ public void getFieldMappingAsync(GetFieldMappingsRequest getFieldMappingsRequest
* @return the response
* @throws IOException in case there is a problem sending the request or parsing back the response
*/
public IndicesAliasesResponse updateAliases(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options) throws IOException {
public AcknowledgedResponse updateAliases(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(indicesAliasesRequest, RequestConverters::updateAliases, options,
IndicesAliasesResponse::fromXContent, emptySet());
AcknowledgedResponse::fromXContent, emptySet());
}

/**
Expand All @@ -245,9 +241,9 @@ public IndicesAliasesResponse updateAliases(IndicesAliasesRequest indicesAliases
* @param listener the listener to be notified upon request completion
*/
public void updateAliasesAsync(IndicesAliasesRequest indicesAliasesRequest, RequestOptions options,
ActionListener<IndicesAliasesResponse> listener) {
ActionListener<AcknowledgedResponse> listener) {
restHighLevelClient.performRequestAsyncAndParseEntity(indicesAliasesRequest, RequestConverters::updateAliases, options,
IndicesAliasesResponse::fromXContent, listener, emptySet());
AcknowledgedResponse::fromXContent, listener, emptySet());
}

/**
Expand Down Expand Up @@ -286,9 +282,9 @@ public void openAsync(OpenIndexRequest openIndexRequest, RequestOptions options,
* @return the response
* @throws IOException in case there is a problem sending the request or parsing back the response
*/
public CloseIndexResponse close(CloseIndexRequest closeIndexRequest, RequestOptions options) throws IOException {
public AcknowledgedResponse close(CloseIndexRequest closeIndexRequest, RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(closeIndexRequest, RequestConverters::closeIndex, options,
CloseIndexResponse::fromXContent, emptySet());
AcknowledgedResponse::fromXContent, emptySet());
}

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


Expand Down Expand Up @@ -706,9 +702,9 @@ public void getAliasAsync(GetAliasesRequest getAliasesRequest, RequestOptions op
* @return the response
* @throws IOException in case there is a problem sending the request or parsing back the response
*/
public UpdateSettingsResponse putSettings(UpdateSettingsRequest updateSettingsRequest, RequestOptions options) throws IOException {
public AcknowledgedResponse putSettings(UpdateSettingsRequest updateSettingsRequest, RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(updateSettingsRequest, RequestConverters::indexPutSettings, options,
UpdateSettingsResponse::fromXContent, emptySet());
AcknowledgedResponse::fromXContent, emptySet());
}

/**
Expand All @@ -720,9 +716,9 @@ public UpdateSettingsResponse putSettings(UpdateSettingsRequest updateSettingsRe
* @param listener the listener to be notified upon request completion
*/
public void putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, RequestOptions options,
ActionListener<UpdateSettingsResponse> listener) {
ActionListener<AcknowledgedResponse> listener) {
restHighLevelClient.performRequestAsyncAndParseEntity(updateSettingsRequest, RequestConverters::indexPutSettings, options,
UpdateSettingsResponse::fromXContent, listener, emptySet());
AcknowledgedResponse::fromXContent, listener, emptySet());
}

/**
Expand All @@ -734,10 +730,10 @@ public void putSettingsAsync(UpdateSettingsRequest updateSettingsRequest, Reques
* @return the response
* @throws IOException in case there is a problem sending the request or parsing back the response
*/
public PutIndexTemplateResponse putTemplate(PutIndexTemplateRequest putIndexTemplateRequest,
RequestOptions options) throws IOException {
public AcknowledgedResponse putTemplate(PutIndexTemplateRequest putIndexTemplateRequest,
RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(putIndexTemplateRequest, RequestConverters::putTemplate, options,
PutIndexTemplateResponse::fromXContent, emptySet());
AcknowledgedResponse::fromXContent, emptySet());
}

/**
Expand All @@ -749,9 +745,9 @@ public PutIndexTemplateResponse putTemplate(PutIndexTemplateRequest putIndexTemp
* @param listener the listener to be notified upon request completion
*/
public void putTemplateAsync(PutIndexTemplateRequest putIndexTemplateRequest, RequestOptions options,
ActionListener<PutIndexTemplateResponse> listener) {
ActionListener<AcknowledgedResponse> listener) {
restHighLevelClient.performRequestAsyncAndParseEntity(putIndexTemplateRequest, RequestConverters::putTemplate, options,
PutIndexTemplateResponse::fromXContent, listener, emptySet());
AcknowledgedResponse::fromXContent, listener, emptySet());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import org.apache.http.HttpEntity;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.xcontent.DeprecationHandler;
Expand All @@ -30,7 +31,6 @@
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.protocol.xpack.license.DeleteLicenseRequest;
import org.elasticsearch.protocol.xpack.license.DeleteLicenseResponse;
import org.elasticsearch.protocol.xpack.license.GetLicenseRequest;
import org.elasticsearch.protocol.xpack.license.GetLicenseResponse;
import org.elasticsearch.protocol.xpack.license.PutLicenseRequest;
Expand Down Expand Up @@ -106,19 +106,19 @@ public void getLicenseAsync(GetLicenseRequest request, RequestOptions options, A
* @return the response
* @throws IOException in case there is a problem sending the request or parsing back the response
*/
public DeleteLicenseResponse deleteLicense(DeleteLicenseRequest request, RequestOptions options) throws IOException {
public AcknowledgedResponse deleteLicense(DeleteLicenseRequest request, RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(request, RequestConverters::deleteLicense, options,
DeleteLicenseResponse::fromXContent, emptySet());
AcknowledgedResponse::fromXContent, emptySet());
}

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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.admin.cluster.storedscripts.DeleteStoredScriptRequest;
import org.elasticsearch.action.admin.cluster.storedscripts.DeleteStoredScriptResponse;
import org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptRequest;
import org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptResponse;
import org.elasticsearch.action.bulk.BulkRequest;
Expand All @@ -53,6 +52,7 @@
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchScrollRequest;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.common.CheckedConsumer;
Expand Down Expand Up @@ -916,9 +916,9 @@ public void getScriptAsync(GetStoredScriptRequest request, RequestOptions option
* @return the response
* @throws IOException in case there is a problem sending the request or parsing back the response
*/
public DeleteStoredScriptResponse deleteScript(DeleteStoredScriptRequest request, RequestOptions options) throws IOException {
public AcknowledgedResponse deleteScript(DeleteStoredScriptRequest request, RequestOptions options) throws IOException {
return performRequestAndParseEntity(request, RequestConverters::deleteScript, options,
DeleteStoredScriptResponse::fromXContent, emptySet());
AcknowledgedResponse::fromXContent, emptySet());
}

/**
Expand All @@ -930,9 +930,9 @@ public DeleteStoredScriptResponse deleteScript(DeleteStoredScriptRequest request
* @param listener the listener to be notified upon request completion
*/
public void deleteScriptAsync(DeleteStoredScriptRequest request, RequestOptions options,
ActionListener<DeleteStoredScriptResponse> listener) {
ActionListener<AcknowledgedResponse> listener) {
performRequestAsyncAndParseEntity(request, RequestConverters::deleteScript, options,
DeleteStoredScriptResponse::fromXContent, listener, emptySet());
AcknowledgedResponse::fromXContent, listener, emptySet());
}

/**
Expand Down
Loading

0 comments on commit aa147cc

Please sign in to comment.