Skip to content

Commit eb67200

Browse files
Merge branch 'master' into system-jvm-options
2 parents c966fb2 + 62e1492 commit eb67200

File tree

111 files changed

+2100
-1711
lines changed

Some content is hidden

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

111 files changed

+2100
-1711
lines changed

.ci/os.ps1

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ New-Item -ItemType directory -Path \tmp
2727

2828
$ErrorActionPreference="Continue"
2929
# TODO: remove the task exclusions once dependencies are set correctly and these don't run for Windows or buldiung the deb on windows is fixed
30-
& .\gradlew.bat -g "C:\Users\$env:username\.gradle" --parallel --scan --console=plain destructiveDistroTest `
31-
-x :distribution:packages:buildOssDeb `
32-
-x :distribution:packages:buildDeb `
33-
-x :distribution:packages:buildOssRpm `
34-
-x :distribution:packages:buildRpm `
30+
& .\gradlew.bat -g "C:\Users\$env:username\.gradle" --parallel --scan --console=plain destructiveDistroTest
3531

3632
exit $LastExitCode

TESTING.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ supports a remote debugging option:
4343
./gradlew run --debug-jvm
4444
---------------------------------------------------------------------------
4545

46+
This will instruct all JVMs (including any that run cli tools such as creating the keyring or adding users)
47+
to suspend and initiate a debug connection on port incrementing from `5005`.
48+
As such the IDE needs to be instructed to listen for connections on this port.
49+
Since we might run multiple JVMs as part of configuring and starting the cluster it's
50+
recommended to have the option to aut restart checked.
51+
4652
==== Distribution
4753

4854
By default a node is started with the zip distribution.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import org.gradle.util.GradleVersion
3232
import static org.elasticsearch.gradle.tool.Boilerplate.maybeConfigure
3333

3434
plugins {
35-
id 'com.gradle.build-scan' version '2.4'
35+
id 'com.gradle.build-scan' version '2.4.2'
3636
id 'lifecycle-base'
3737
id 'elasticsearch.global-build-info'
3838
id "com.diffplug.gradle.spotless" version "3.24.2" apply false

buildSrc/src/main/java/org/elasticsearch/gradle/testclusters/RunTask.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public Boolean getDebug() {
3636

3737
@Override
3838
public void beforeStart() {
39-
int debugPort = 8000;
39+
int debugPort = 5005;
4040
int httpPort = 9200;
4141
int transportPort = 9300;
4242
Map<String, String> additionalSettings = System.getProperties().entrySet().stream()
@@ -57,7 +57,7 @@ public void beforeStart() {
5757
"Running elasticsearch in debug mode, {} suspending until connected on debugPort {}",
5858
node, debugPort
5959
);
60-
node.jvmArgs("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=" + debugPort);
60+
node.jvmArgs("-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=" + debugPort);
6161
debugPort += 1;
6262
}
6363
}

client/rest-high-level/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,11 @@ testClusters.integTest {
129129

130130
setting 'indices.lifecycle.poll_interval', '1000ms'
131131
keystore 'xpack.security.transport.ssl.truststore.secure_password', 'testnode'
132+
extraConfigFile 'roles.yml', file('roles.yml')
132133
user username: System.getProperty('tests.rest.cluster.username', 'test_user'),
133-
password: System.getProperty('tests.rest.cluster.password', 'test-password')
134+
password: System.getProperty('tests.rest.cluster.password', 'test-password'),
135+
role: System.getProperty('tests.rest.cluster.role', 'admin')
136+
user username: 'admin_user', password: 'admin-password'
134137

135138
extraConfigFile nodeCert.name, nodeCert
136139
extraConfigFile nodeTrustStore.name, nodeTrustStore

client/rest-high-level/roles.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
admin:
2+
cluster:
3+
- all
4+
indices:
5+
- names: '*'
6+
privileges:
7+
- all
8+
run_as: [ '*' ]
9+
applications:
10+
- application: '*'
11+
privileges: [ '*' ]
12+
resources: [ '*' ]

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

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -297,55 +297,6 @@ public Cancellable getMappingAsync(GetMappingsRequest getMappingsRequest, Reques
297297
emptySet());
298298
}
299299

300-
/**
301-
* Retrieves the mappings on an index or indices using the Get Mapping API.
302-
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html">
303-
* Get Mapping API on elastic.co</a>
304-
* @param getMappingsRequest the request
305-
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
306-
* @return the response
307-
* @throws IOException in case there is a problem sending the request or parsing back the response
308-
*
309-
* @deprecated This method uses old request and response objects which still refer to types, a deprecated
310-
* feature. The method {@link #getMapping(GetMappingsRequest, RequestOptions)} should be used instead, which
311-
* accepts a new request object.
312-
*/
313-
@Deprecated
314-
public org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse getMapping(
315-
org.elasticsearch.action.admin.indices.mapping.get.GetMappingsRequest getMappingsRequest,
316-
RequestOptions options) throws IOException {
317-
return restHighLevelClient.performRequestAndParseEntity(getMappingsRequest,
318-
IndicesRequestConverters::getMappings,
319-
options,
320-
org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse::fromXContent,
321-
emptySet());
322-
}
323-
324-
/**
325-
* Asynchronously retrieves the mappings on an index on indices using the Get Mapping API.
326-
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html">
327-
* Get Mapping API on elastic.co</a>
328-
* @param getMappingsRequest the request
329-
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
330-
* @param listener the listener to be notified upon request completion
331-
*
332-
* @deprecated This method uses old request and response objects which still refer to types, a deprecated feature.
333-
* The method {@link #getMapping(GetMappingsRequest, RequestOptions)} should be used instead, which accepts a new
334-
* request object.
335-
* @return cancellable that may be used to cancel the request
336-
*/
337-
@Deprecated
338-
public Cancellable getMappingAsync(org.elasticsearch.action.admin.indices.mapping.get.GetMappingsRequest getMappingsRequest,
339-
RequestOptions options,
340-
ActionListener<org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse> listener) {
341-
return restHighLevelClient.performRequestAsyncAndParseEntity(getMappingsRequest,
342-
IndicesRequestConverters::getMappings,
343-
options,
344-
org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse::fromXContent,
345-
listener,
346-
emptySet());
347-
}
348-
349300
/**
350301
* Retrieves the field mappings on an index or indices using the Get Field Mapping API.
351302
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html">
@@ -679,42 +630,6 @@ public Cancellable getAsync(GetIndexRequest getIndexRequest, RequestOptions opti
679630
GetIndexResponse::fromXContent, listener, emptySet());
680631
}
681632

682-
/**
683-
* Retrieve information about one or more indexes
684-
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html">
685-
* Indices Get Index API on elastic.co</a>
686-
* @param getIndexRequest the request
687-
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
688-
* @return the response
689-
* @throws IOException in case there is a problem sending the request or parsing back the response
690-
* @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
691-
* {@link #get(GetIndexRequest, RequestOptions)} should be used instead, which accepts a new request object.
692-
*/
693-
@Deprecated
694-
public org.elasticsearch.action.admin.indices.get.GetIndexResponse get(
695-
org.elasticsearch.action.admin.indices.get.GetIndexRequest getIndexRequest, RequestOptions options) throws IOException {
696-
return restHighLevelClient.performRequestAndParseEntity(getIndexRequest, IndicesRequestConverters::getIndex, options,
697-
org.elasticsearch.action.admin.indices.get.GetIndexResponse::fromXContent, emptySet());
698-
}
699-
700-
/**
701-
* Retrieve information about one or more indexes
702-
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html">
703-
* Indices Get Index API on elastic.co</a>
704-
* @param getIndexRequest the request
705-
* @param options the request options (e.g. headers), use {@link RequestOptions#DEFAULT} if nothing needs to be customized
706-
* @param listener the listener to be notified upon request completion
707-
* @deprecated This method uses an old request object which still refers to types, a deprecated feature. The method
708-
* {@link #getAsync(GetIndexRequest, RequestOptions, ActionListener)} should be used instead, which accepts a new request object.
709-
* @return cancellable that may be used to cancel the request
710-
*/
711-
@Deprecated
712-
public Cancellable getAsync(org.elasticsearch.action.admin.indices.get.GetIndexRequest getIndexRequest, RequestOptions options,
713-
ActionListener<org.elasticsearch.action.admin.indices.get.GetIndexResponse> listener) {
714-
return restHighLevelClient.performRequestAsyncAndParseEntity(getIndexRequest, IndicesRequestConverters::getIndex, options,
715-
org.elasticsearch.action.admin.indices.get.GetIndexResponse::fromXContent, listener, emptySet());
716-
}
717-
718633
/**
719634
* Force merge one or more indices using the Force Merge API.
720635
* See <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html">

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -189,22 +189,6 @@ static Request getMappings(GetMappingsRequest getMappingsRequest) {
189189
return request;
190190
}
191191

192-
@Deprecated
193-
static Request getMappings(org.elasticsearch.action.admin.indices.mapping.get.GetMappingsRequest getMappingsRequest) {
194-
String[] indices = getMappingsRequest.indices() == null ? Strings.EMPTY_ARRAY : getMappingsRequest.indices();
195-
String[] types = getMappingsRequest.types() == null ? Strings.EMPTY_ARRAY : getMappingsRequest.types();
196-
197-
Request request = new Request(HttpGet.METHOD_NAME, RequestConverters.endpoint(indices, "_mapping", types));
198-
199-
RequestConverters.Params parameters = new RequestConverters.Params();
200-
parameters.withMasterTimeout(getMappingsRequest.masterNodeTimeout());
201-
parameters.withIndicesOptions(getMappingsRequest.indicesOptions());
202-
parameters.withLocal(getMappingsRequest.local());
203-
parameters.putParam(INCLUDE_TYPE_NAME_PARAMETER, "true");
204-
request.addParameters(parameters.asMap());
205-
return request;
206-
}
207-
208192
static Request getFieldMapping(GetFieldMappingsRequest getFieldMappingsRequest) {
209193
String[] indices = getFieldMappingsRequest.indices() == null ? Strings.EMPTY_ARRAY : getFieldMappingsRequest.indices();
210194
String[] fields = getFieldMappingsRequest.fields() == null ? Strings.EMPTY_ARRAY : getFieldMappingsRequest.fields();

0 commit comments

Comments
 (0)