Skip to content

Commit

Permalink
Merge branch '6.x' into retention-leases-recovery-6.x
Browse files Browse the repository at this point in the history
* 6.x: (25 commits)
  Backport of types removal for Put/Get index templates (elastic#38465)
  Add support for API keys to access Elasticsearch (elastic#38291) (elastic#38399)
  Deprecate support for internal versioning for concurrency control (elastic#38451)
  Deprecate types in rollover index API (elastic#38389) (elastic#38458)
  Add typless client side GetIndexRequest calls and response class (elastic#38422)
  [ML] Report index unavailable instead of waiting for lazy node (elastic#38444)
  await fix CurtIT#testIndex until elastic#38451 is merged (elastic#38466)
  Update ilm-api.asciidoc, point to REMOVE policy (elastic#38235) (elastic#38464)
  SQL: Fix esType for DATETIME/DATE and INTERVALS (elastic#38179)
  Clean up duplicate follow config parameter code (elastic#37688) (elastic#38443)
  Deprecation check for No Master Block setting (elastic#38383)
  Bubble-up exceptions from scheduler (elastic#38441)
  Lift retention lease expiration to index shard (elastic#38391)
  Deprecate maxRetryTimeout in RestClient and increase default value (elastic#38425)
  Update Rollup Caps to allow unknown fields (elastic#38446)
  Backport of elastic#38411: `if_seq_no` and `if_primary_term` parameters aren't wired correctly in REST Client's CRUD API
  Support unknown fields in ingest pipeline map configuration (elastic#38429)
  SQL: Implement CURRENT_DATE (elastic#38175)
  Backport changes to the release notes script. (elastic#38346)
  Fix ILM explain response to allow unknown fields (elastic#38363)
  ...
  • Loading branch information
jasontedor committed Feb 6, 2019
2 parents e3a38c8 + 9f3b3b4 commit 3344768
Show file tree
Hide file tree
Showing 310 changed files with 15,288 additions and 3,375 deletions.
1 change: 1 addition & 0 deletions client/rest-high-level/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ integTestCluster {
setting 'xpack.license.self_generated.type', 'trial'
setting 'xpack.security.enabled', 'true'
setting 'xpack.security.authc.token.enabled', 'true'
setting 'xpack.security.authc.api_key.enabled', 'true'
// Truststore settings are not used since TLS is not enabled. Included for testing the get certificates API
setting 'xpack.security.http.ssl.certificate_authorities', 'testnode.crt'
setting 'xpack.security.http.ssl.supported_protocols', 'TLSv1.2,TLSv1.1,TLSv1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,10 @@
import org.elasticsearch.action.admin.indices.flush.SyncedFlushRequest;
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequest;
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeResponse;
import org.elasticsearch.action.admin.indices.get.GetIndexRequest;
import org.elasticsearch.action.admin.indices.get.GetIndexResponse;
import org.elasticsearch.client.indices.GetFieldMappingsRequest;
import org.elasticsearch.client.indices.GetFieldMappingsResponse;
import org.elasticsearch.action.admin.indices.open.OpenIndexRequest;
import org.elasticsearch.action.admin.indices.open.OpenIndexResponse;
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
import org.elasticsearch.action.admin.indices.refresh.RefreshResponse;
import org.elasticsearch.action.admin.indices.rollover.RolloverRequest;
import org.elasticsearch.action.admin.indices.rollover.RolloverResponse;
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;
Expand All @@ -57,6 +51,10 @@
import org.elasticsearch.client.indices.CreateIndexRequest;
import org.elasticsearch.client.indices.CreateIndexResponse;
import org.elasticsearch.client.indices.FreezeIndexRequest;
import org.elasticsearch.client.indices.GetFieldMappingsRequest;
import org.elasticsearch.client.indices.GetFieldMappingsResponse;
import org.elasticsearch.client.indices.GetIndexRequest;
import org.elasticsearch.client.indices.GetIndexResponse;
import org.elasticsearch.client.indices.GetIndexTemplatesRequest;
import org.elasticsearch.client.indices.GetMappingsRequest;
import org.elasticsearch.client.indices.GetMappingsResponse;
Expand All @@ -65,6 +63,8 @@
import org.elasticsearch.client.indices.PutIndexTemplateRequest;
import org.elasticsearch.client.indices.PutMappingRequest;
import org.elasticsearch.client.indices.UnfreezeIndexRequest;
import org.elasticsearch.client.indices.rollover.RolloverRequest;
import org.elasticsearch.client.indices.rollover.RolloverResponse;
import org.elasticsearch.rest.RestStatus;

import java.io.IOException;
Expand Down Expand Up @@ -901,6 +901,41 @@ public void getAsync(GetIndexRequest getIndexRequest, RequestOptions options,
GetIndexResponse::fromXContent, listener, emptySet());
}

/**
* Retrieve information about one or more indexes
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html">
* Indices Get Index API on elastic.co</a>
* @param getIndexRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @return the response
* @throws IOException in case there is a problem sending the request or parsing back the response
* @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
* {@link #get(GetIndexRequest, RequestOptions)} should be used instead, which accepts a new request object.
*/
@Deprecated
public org.elasticsearch.action.admin.indices.get.GetIndexResponse get(
org.elasticsearch.action.admin.indices.get.GetIndexRequest getIndexRequest, RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(getIndexRequest, IndicesRequestConverters::getIndex, options,
org.elasticsearch.action.admin.indices.get.GetIndexResponse::fromXContent, emptySet());
}

/**
* Retrieve information about one or more indexes
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html">
* Indices Get Index API on elastic.co</a>
* @param getIndexRequest the 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
* @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
* {@link #getAsync(GetIndexRequest, RequestOptions, ActionListener)} should be used instead, which accepts a new request object.
*/
@Deprecated
public void getAsync(org.elasticsearch.action.admin.indices.get.GetIndexRequest getIndexRequest, RequestOptions options,
ActionListener<org.elasticsearch.action.admin.indices.get.GetIndexResponse> listener) {
restHighLevelClient.performRequestAsyncAndParseEntity(getIndexRequest, IndicesRequestConverters::getIndex, options,
org.elasticsearch.action.admin.indices.get.GetIndexResponse::fromXContent, listener, emptySet());
}

/**
* Force merge one or more indices using the Force Merge API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html">
Expand Down Expand Up @@ -1058,15 +1093,38 @@ public boolean exists(GetIndexRequest request, RequestOptions options) throws IO
);
}

/**
* Checks if the index (indices) exists or not.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html">
* Indices Exists API on elastic.co</a>
* @param request the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @return the response
* @throws IOException in case there is a problem sending the request
* @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
* {@link #exists(GetIndexRequest, RequestOptions)} should be used instead, which accepts a new request object.
*/
@Deprecated
public boolean exists(org.elasticsearch.action.admin.indices.get.GetIndexRequest request, RequestOptions options) throws IOException {
return restHighLevelClient.performRequest(
request,
IndicesRequestConverters::indicesExist,
options,
RestHighLevelClient::convertExistsResponse,
Collections.emptySet()
);
}

/**
* Checks if the index (indices) exists or not.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html">
* Indices Exists API on elastic.co</a>
* @deprecated Prefer {@link #exists(GetIndexRequest, RequestOptions)}
* @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
* {@link #exists(GetIndexRequest, RequestOptions)} should be used instead, which accepts a new request object.
*/
@Deprecated
public boolean exists(GetIndexRequest request, Header... headers) throws IOException {
public boolean exists(org.elasticsearch.action.admin.indices.get.GetIndexRequest request, Header... headers) throws IOException {
return restHighLevelClient.performRequest(
request,
IndicesRequestConverters::indicesExist,
Expand Down Expand Up @@ -1095,15 +1153,40 @@ public void existsAsync(GetIndexRequest request, RequestOptions options, ActionL
);
}

/**
* Asynchronously checks if the index (indices) exists or not.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html">
* Indices Exists API on elastic.co</a>
* @param request the 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
* @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
* {@link #existsAsync(GetIndexRequest, RequestOptions, ActionListener)} should be used instead, which accepts a new request object.
*/
@Deprecated
public void existsAsync(org.elasticsearch.action.admin.indices.get.GetIndexRequest request, RequestOptions options,
ActionListener<Boolean> listener) {
restHighLevelClient.performRequestAsync(
request,
IndicesRequestConverters::indicesExist,
options,
RestHighLevelClient::convertExistsResponse,
listener,
Collections.emptySet()
);
}

/**
* Asynchronously checks if the index (indices) exists or not.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html">
* Indices Exists API on elastic.co</a>
* @deprecated Prefer {@link #existsAsync(GetIndexRequest, RequestOptions, ActionListener)}
* @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
* {@link #existsAsync(GetIndexRequest, RequestOptions, ActionListener)} should be used instead, which accepts a new request object.
*/
@Deprecated
public void existsAsync(GetIndexRequest request, ActionListener<Boolean> listener, Header... headers) {
public void existsAsync(org.elasticsearch.action.admin.indices.get.GetIndexRequest request, ActionListener<Boolean> listener,
Header... headers) {
restHighLevelClient.performRequestAsync(
request,
IndicesRequestConverters::indicesExist,
Expand Down Expand Up @@ -1234,17 +1317,54 @@ public RolloverResponse rollover(RolloverRequest rolloverRequest, RequestOptions
RolloverResponse::fromXContent, emptySet());
}

/**
* Asynchronously rolls over an index using the Rollover Index API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html">
* Rollover Index API on elastic.co</a>
* @param rolloverRequest the 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 rolloverAsync(RolloverRequest rolloverRequest, RequestOptions options, ActionListener<RolloverResponse> listener) {
restHighLevelClient.performRequestAsyncAndParseEntity(rolloverRequest, IndicesRequestConverters::rollover, options,
RolloverResponse::fromXContent, listener, emptySet());
}

/**
* Rolls over an index using the Rollover Index API.
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html">
* Rollover Index API on elastic.co</a>
* @param rolloverRequest the request
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
* @return the response
* @throws IOException in case there is a problem sending the request or parsing back the response
*
* @deprecated This method uses deprecated request and response objects.
* The method {@link #rollover(RolloverRequest, RequestOptions)} should be used instead, which accepts a new request object.
*/
@Deprecated
public org.elasticsearch.action.admin.indices.rollover.RolloverResponse rollover(
org.elasticsearch.action.admin.indices.rollover.RolloverRequest rolloverRequest,
RequestOptions options) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(rolloverRequest, IndicesRequestConverters::rollover, options,
org.elasticsearch.action.admin.indices.rollover.RolloverResponse::fromXContent, emptySet());
}

/**
* Rolls over an index using the Rollover Index API.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html">
* Rollover Index API on elastic.co</a>
* @deprecated Prefer {@link #rollover(RolloverRequest, RequestOptions)}
*
* @deprecated This method uses deprecated request and response objects.
* The method {@link #rollover(RolloverRequest, RequestOptions)} should be used instead, which accepts a new request object.
*/
@Deprecated
public RolloverResponse rollover(RolloverRequest rolloverRequest, Header... headers) throws IOException {
public org.elasticsearch.action.admin.indices.rollover.RolloverResponse rollover(
org.elasticsearch.action.admin.indices.rollover.RolloverRequest rolloverRequest,
Header... headers) throws IOException {
return restHighLevelClient.performRequestAndParseEntity(rolloverRequest, IndicesRequestConverters::rollover,
RolloverResponse::fromXContent, emptySet(), headers);
org.elasticsearch.action.admin.indices.rollover.RolloverResponse::fromXContent, emptySet(), headers);
}

/**
Expand All @@ -1254,23 +1374,33 @@ public RolloverResponse rollover(RolloverRequest rolloverRequest, Header... head
* @param rolloverRequest the 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
*
* @deprecated This method uses deprecated request and response objects.
* The method {@link #rolloverAsync(RolloverRequest, RequestOptions, ActionListener)} should be used instead, which
* accepts a new request object.
*/
public void rolloverAsync(RolloverRequest rolloverRequest, RequestOptions options, ActionListener<RolloverResponse> listener) {
@Deprecated
public void rolloverAsync(org.elasticsearch.action.admin.indices.rollover.RolloverRequest rolloverRequest,
RequestOptions options, ActionListener<org.elasticsearch.action.admin.indices.rollover.RolloverResponse> listener) {
restHighLevelClient.performRequestAsyncAndParseEntity(rolloverRequest, IndicesRequestConverters::rollover, options,
RolloverResponse::fromXContent, listener, emptySet());
org.elasticsearch.action.admin.indices.rollover.RolloverResponse::fromXContent, listener, emptySet());
}

/**
* Asynchronously rolls over an index using the Rollover Index API.
* <p>
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html">
* Rollover Index API on elastic.co</a>
* @deprecated Prefer {@link #rolloverAsync(RolloverRequest, RequestOptions, ActionListener)}
*
* @deprecated This method uses deprecated request and response objects.
* The method {@link #rolloverAsync(RolloverRequest, RequestOptions, ActionListener)} should be used instead, which
* accepts a new request object.
*/
@Deprecated
public void rolloverAsync(RolloverRequest rolloverRequest, ActionListener<RolloverResponse> listener, Header... headers) {
public void rolloverAsync(org.elasticsearch.action.admin.indices.rollover.RolloverRequest rolloverRequest,
ActionListener<org.elasticsearch.action.admin.indices.rollover.RolloverResponse> listener, Header... headers) {
restHighLevelClient.performRequestAsyncAndParseEntity(rolloverRequest, IndicesRequestConverters::rollover,
RolloverResponse::fromXContent, listener, emptySet(), headers);
org.elasticsearch.action.admin.indices.rollover.RolloverResponse::fromXContent, listener, emptySet(), headers);
}

/**
Expand Down
Loading

0 comments on commit 3344768

Please sign in to comment.