Skip to content

Commit

Permalink
Merge branch 'master' into aarch64
Browse files Browse the repository at this point in the history
* master: (129 commits)
  Add doc note regarding explicit publish host
  Fix typo in name of test
  Add additional test for sequence-number recovery
  WrapperQueryBuilder should also rewrite the parsed query.
  Remove dead code and stale Javadoc
  Update defaults in documentation (#25483)
  [DOCS] Add docs-dir to Painless (#25482)
  Add concurrent deprecation logger test
  [DOCS] Update shared attributes for Elasticsearch (#25479)
  Use LRU set to reduce repeat deprecation messages
  Add NioTransport threads to thread name checks (#25477)
  Add shortcut for AbstractQueryBuilder.parseInnerQueryBuilder to QueryShardContext
  Prevent channel enqueue after selector close (#25478)
  Fix Java 9 compilation issue
  Remove unregistered `transport.netty.*` settings (#25476)
  Handle ping correctly in NioTransport (#25462)
  Tests: Remove platform specific assertion in NioSocketChannelTests
  Remove QueryParseContext from parsing QueryBuilders (#25448)
  Promote replica on the highest version node (#25277)
  test: added not null assertion
  ...
  • Loading branch information
jasontedor committed Jun 30, 2017
2 parents 075c1b8 + 1b60247 commit 83d692c
Show file tree
Hide file tree
Showing 596 changed files with 15,995 additions and 5,860 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
*/
Set<String> unconvertedCandidates = new HashSet<>()

/**
* The last non-TESTRESPONSE snippet.
*/
Snippet previousTest

/**
* Called each time a snippet is encountered. Tracks the snippets and
* calls buildTest to actually build the test.
Expand All @@ -142,6 +147,7 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
}
if (snippet.testSetup) {
setup(snippet)
previousTest = snippet
return
}
if (snippet.testResponse) {
Expand All @@ -150,6 +156,7 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
}
if (snippet.test || snippet.console) {
test(snippet)
previousTest = snippet
return
}
// Must be an unmarked snippet....
Expand All @@ -158,7 +165,18 @@ public class RestTestsFromSnippetsTask extends SnippetsTask {
private void test(Snippet test) {
setupCurrent(test)

if (false == test.continued) {
if (test.continued) {
/* Catch some difficult to debug errors with // TEST[continued]
* and throw a helpful error message. */
if (previousTest == null || previousTest.path != test.path) {
throw new InvalidUserDataException("// TEST[continued] " +
"cannot be on first snippet in a file: $test")
}
if (previousTest != null && previousTest.testSetup) {
throw new InvalidUserDataException("// TEST[continued] " +
"cannot immediately follow // TESTSETUP: $test")
}
} else {
current.println('---')
current.println("\"line_$test.start\":")
/* The Elasticsearch test runner doesn't support the warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.elasticsearch.gradle.test

import org.apache.tools.ant.taskdefs.condition.Os
import org.elasticsearch.gradle.Version
import org.gradle.api.InvalidUserDataException
import org.gradle.api.Project

Expand Down Expand Up @@ -143,7 +144,7 @@ class NodeInfo {
args.add("${esScript}")
}

env = [ 'JAVA_HOME' : project.javaHome ]
env = ['JAVA_HOME': project.javaHome]
args.addAll("-E", "node.portsfile=true")
String collectedSystemProperties = config.systemProperties.collect { key, value -> "-D${key}=${value}" }.join(" ")
String esJavaOpts = config.jvmArgs.isEmpty() ? collectedSystemProperties : collectedSystemProperties + " " + config.jvmArgs
Expand All @@ -158,7 +159,11 @@ class NodeInfo {
}
}
env.put('ES_JVM_OPTIONS', new File(confDir, 'jvm.options'))
args.addAll("-E", "path.conf=${confDir}")
if (Version.fromString(nodeVersion).major == 5) {
args.addAll("-E", "path.conf=${confDir}")
} else {
args.addAll("--path.conf", "${confDir}")
}
if (!System.properties.containsKey("tests.es.path.data")) {
args.addAll("-E", "path.data=${-> dataDir.toString()}")
}
Expand Down
4 changes: 3 additions & 1 deletion buildSrc/src/main/resources/checkstyle_suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<!-- JNA requires the no-argument constructor on JNAKernel32Library.SizeT to be public-->
<suppress files="core[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]bootstrap[/\\]JNAKernel32Library.java" checks="RedundantModifier" />

<!-- the constructors on some local classes in these tests must be public-->
<suppress files="core[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]plugins[/\\]PluginsServiceTests.java" checks="RedundantModifier" />

<!-- Hopefully temporary suppression of LineLength on files that don't pass it. We should remove these when we the
files start to pass. -->
<suppress files="client[/\\]rest[/\\]src[/\\]test[/\\]java[/\\]org[/\\]elasticsearch[/\\]client[/\\]HeapBufferedAsyncResponseConsumerTests.java" checks="LineLength" />
Expand Down Expand Up @@ -267,7 +270,6 @@
<suppress files="core[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]index[/\\]analysis[/\\]CustomAnalyzerProvider.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]index[/\\]analysis[/\\]ShingleTokenFilterFactory.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]index[/\\]analysis[/\\]StemmerOverrideTokenFilterFactory.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]index[/\\]analysis[/\\]compound[/\\]HyphenationCompoundWordTokenFilterFactory.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]index[/\\]cache[/\\]bitset[/\\]BitsetFilterCache.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]index[/\\]codec[/\\]PerFieldMappingPostingFormatCodec.java" checks="LineLength" />
<suppress files="core[/\\]src[/\\]main[/\\]java[/\\]org[/\\]elasticsearch[/\\]index[/\\]engine[/\\]ElasticsearchConcurrentMergeScheduler.java" checks="LineLength" />
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/version.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# When updating elasticsearch, please update 'rest' version in core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
elasticsearch = 6.0.0-alpha3
lucene = 7.0.0-snapshot-92b1783
lucene = 7.0.0-snapshot-ad2cb77

# optional dependencies
spatial4j = 0.6
Expand All @@ -25,7 +25,7 @@ commonscodec = 1.10
hamcrest = 1.3
securemock = 1.2
# When updating mocksocket, please also update core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy
mocksocket = 1.1
mocksocket = 1.2

# benchmark dependencies
jmh = 1.17.3
Original file line number Diff line number Diff line change
Expand Up @@ -276,49 +276,59 @@ public void testSearchWithMatrixStats() throws IOException {
}

public void testSearchWithParentJoin() throws IOException {
final String indexName = "child_example";
StringEntity parentMapping = new StringEntity("{\n" +
" \"mappings\": {\n" +
" \"answer\" : {\n" +
" \"_parent\" : {\n" +
" \"type\" : \"question\"\n" +
" \"qa\" : {\n" +
" \"properties\" : {\n" +
" \"qa_join_field\" : {\n" +
" \"type\" : \"join\",\n" +
" \"relations\" : { \"question\" : \"answer\" }\n" +
" }\n" +
" }\n" +
" }\n" +
" },\n" +
" \"settings\": {\n" +
" \"index.mapping.single_type\": false" +
" }\n" +
" }" +
"}", ContentType.APPLICATION_JSON);
client().performRequest("PUT", "/child_example", Collections.emptyMap(), parentMapping);
client().performRequest("PUT", "/" + indexName, Collections.emptyMap(), parentMapping);
StringEntity questionDoc = new StringEntity("{\n" +
" \"body\": \"<p>I have Windows 2003 server and i bought a new Windows 2008 server...\",\n" +
" \"title\": \"Whats the best way to file transfer my site from server to a newer one?\",\n" +
" \"tags\": [\n" +
" \"windows-server-2003\",\n" +
" \"windows-server-2008\",\n" +
" \"file-transfer\"\n" +
" ]\n" +
" ],\n" +
" \"qa_join_field\" : \"question\"\n" +
"}", ContentType.APPLICATION_JSON);
client().performRequest("PUT", "/child_example/question/1", Collections.emptyMap(), questionDoc);
client().performRequest("PUT", "/" + indexName + "/qa/1", Collections.emptyMap(), questionDoc);
StringEntity answerDoc1 = new StringEntity("{\n" +
" \"owner\": {\n" +
" \"location\": \"Norfolk, United Kingdom\",\n" +
" \"display_name\": \"Sam\",\n" +
" \"id\": 48\n" +
" },\n" +
" \"body\": \"<p>Unfortunately you're pretty much limited to FTP...\",\n" +
" \"qa_join_field\" : {\n" +
" \"name\" : \"answer\",\n" +
" \"parent\" : \"1\"\n" +
" },\n" +
" \"creation_date\": \"2009-05-04T13:45:37.030\"\n" +
"}", ContentType.APPLICATION_JSON);
client().performRequest("PUT", "child_example/answer/1", Collections.singletonMap("parent", "1"), answerDoc1);
client().performRequest("PUT", "/" + indexName + "/qa/2", Collections.singletonMap("routing", "1"), answerDoc1);
StringEntity answerDoc2 = new StringEntity("{\n" +
" \"owner\": {\n" +
" \"location\": \"Norfolk, United Kingdom\",\n" +
" \"display_name\": \"Troll\",\n" +
" \"id\": 49\n" +
" },\n" +
" \"body\": \"<p>Use Linux...\",\n" +
" \"qa_join_field\" : {\n" +
" \"name\" : \"answer\",\n" +
" \"parent\" : \"1\"\n" +
" },\n" +
" \"creation_date\": \"2009-05-05T13:45:37.030\"\n" +
"}", ContentType.APPLICATION_JSON);
client().performRequest("PUT", "/child_example/answer/2", Collections.singletonMap("parent", "1"), answerDoc2);
client().performRequest("PUT", "/" + indexName + "/qa/3", Collections.singletonMap("routing", "1"), answerDoc2);
client().performRequest("POST", "/_refresh");

TermsAggregationBuilder leafTermAgg = new TermsAggregationBuilder("top-names", ValueType.STRING)
Expand All @@ -328,7 +338,7 @@ public void testSearchWithParentJoin() throws IOException {
.size(10).subAggregation(childrenAgg);
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.size(0).aggregation(termsAgg);
SearchRequest searchRequest = new SearchRequest("child_example");
SearchRequest searchRequest = new SearchRequest(indexName);
searchRequest.source(searchSourceBuilder);

SearchResponse searchResponse = execute(searchRequest, highLevelClient()::search, highLevelClient()::searchAsync);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
00d3260223eac0405a82eeeb8439de0e5eb5f888

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3a698989219afd9150738899bc849075c102881b
1 change: 0 additions & 1 deletion core/licenses/lucene-core-7.0.0-snapshot-92b1783.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions core/licenses/lucene-core-7.0.0-snapshot-ad2cb77.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bb636d31949418943454dbe2d72b9b66cd743f9f

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
720252d786273edcc48b2ae7b380bc229fe8930c

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
735178c26f3eb361c30657beeec9e57bd5548d58
1 change: 0 additions & 1 deletion core/licenses/lucene-join-7.0.0-snapshot-92b1783.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions core/licenses/lucene-join-7.0.0-snapshot-ad2cb77.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
de5e5cd9b00be4d005d0e51c74084be6c07b0bbd

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
796ca5e5a9af3cc21f50156fa7e614338ec15ceb
1 change: 0 additions & 1 deletion core/licenses/lucene-misc-7.0.0-snapshot-92b1783.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions core/licenses/lucene-misc-7.0.0-snapshot-ad2cb77.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7ba802083c4c97a07d9487c2b26ee39e4f8e3c7e

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d66adfdb3f330b726420db5f8db21b17a0d9991d

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
569c6362cb87858fc282fd786ba0fda0c44f0a8b

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0ba62e91082910b1057027b8912395da670105d0

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
968e678dc4a236bbc8e4c2eb66f5702ea48aae10

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
579670cc27104fdbd627959b7982a99eab1d16d1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
53f3fc06ed3357dc75d7b050172520aa86d41010

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5281aa095f4f46580ea2008ffd040733096d0246
8 changes: 8 additions & 0 deletions core/src/main/java/org/elasticsearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public class Version implements Comparable<Version> {
public static final Version V_5_4_0 = new Version(V_5_4_0_ID, org.apache.lucene.util.Version.LUCENE_6_5_0);
public static final int V_5_4_1_ID = 5040199;
public static final Version V_5_4_1 = new Version(V_5_4_1_ID, org.apache.lucene.util.Version.LUCENE_6_5_1);
public static final int V_5_4_2_ID = 5040299;
public static final Version V_5_4_2 = new Version(V_5_4_2_ID, org.apache.lucene.util.Version.LUCENE_6_5_1);
public static final int V_5_4_3_ID = 5040399;
public static final Version V_5_4_3 = new Version(V_5_4_3_ID, org.apache.lucene.util.Version.LUCENE_6_5_1);
public static final int V_5_5_0_ID = 5050099;
public static final Version V_5_5_0 = new Version(V_5_5_0_ID, org.apache.lucene.util.Version.LUCENE_6_6_0);
public static final int V_5_6_0_ID = 5060099;
Expand Down Expand Up @@ -116,6 +120,10 @@ public static Version fromId(int id) {
return V_5_6_0;
case V_5_5_0_ID:
return V_5_5_0;
case V_5_4_3_ID:
return V_5_4_3;
case V_5_4_2_ID:
return V_5_4_2;
case V_5_4_1_ID:
return V_5_4_1;
case V_5_4_0_ID:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ public class GetSnapshotsRequest extends MasterNodeRequest<GetSnapshotsRequest>

public static final String ALL_SNAPSHOTS = "_all";
public static final String CURRENT_SNAPSHOT = "_current";
public static final boolean DEFAULT_VERBOSE_MODE = true;

private String repository;

private String[] snapshots = Strings.EMPTY_ARRAY;

private boolean ignoreUnavailable;

private boolean verbose = true;
private boolean verbose = DEFAULT_VERBOSE_MODE;

public GetSnapshotsRequest() {
}
Expand Down
Loading

0 comments on commit 83d692c

Please sign in to comment.