diff --git a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy index 11bdbd19525..a46a7bda374 100644 --- a/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy +++ b/buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy @@ -38,7 +38,7 @@ public class DocsTestPlugin extends RestTestPlugin { * the last released version for docs. */ '\\{version\\}': VersionProperties.elasticsearch.replace('-SNAPSHOT', ''), - '\\{lucene_version\\}' : VersionProperties.lucene, + '\\{lucene_version\\}' : VersionProperties.lucene.replaceAll('-snapshot-\\w+$', ''), ] Task listSnippets = project.tasks.create('listSnippets', SnippetsTask) listSnippets.group 'Docs' diff --git a/buildSrc/version.properties b/buildSrc/version.properties index c630ca3ebb8..7677e8e24bb 100644 --- a/buildSrc/version.properties +++ b/buildSrc/version.properties @@ -1,5 +1,5 @@ elasticsearch = 6.0.0-alpha1 -lucene = 6.2.0 +lucene = 6.3.0-snapshot-ed102d6 # optional dependencies spatial4j = 0.6 @@ -11,7 +11,7 @@ slf4j = 1.6.2 jna = 4.2.2 # test dependencies -randomizedrunner = 2.3.2 +randomizedrunner = 2.4.0 junit = 4.11 httpclient = 4.5.2 httpcore = 4.4.5 diff --git a/client/rest/src/test/java/org/elasticsearch/client/RequestLoggerTests.java b/client/rest/src/test/java/org/elasticsearch/client/RequestLoggerTests.java index 789f2bf6f6d..17c2a158ea8 100644 --- a/client/rest/src/test/java/org/elasticsearch/client/RequestLoggerTests.java +++ b/client/rest/src/test/java/org/elasticsearch/client/RequestLoggerTests.java @@ -19,7 +19,7 @@ package org.elasticsearch.client; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import org.apache.http.HttpEntity; import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.HttpHost; @@ -62,7 +62,7 @@ public class RequestLoggerTests extends RestClientTestCase { } HttpRequestBase request; - int requestType = RandomInts.randomIntBetween(getRandom(), 0, 7); + int requestType = RandomNumbers.randomIntBetween(getRandom(), 0, 7); switch(requestType) { case 0: request = new HttpGetWithEntity(uri); @@ -99,7 +99,7 @@ public class RequestLoggerTests extends RestClientTestCase { expected += " -d '" + requestBody + "'"; HttpEntityEnclosingRequest enclosingRequest = (HttpEntityEnclosingRequest) request; HttpEntity entity; - switch(RandomInts.randomIntBetween(getRandom(), 0, 3)) { + switch(RandomNumbers.randomIntBetween(getRandom(), 0, 3)) { case 0: entity = new StringEntity(requestBody, StandardCharsets.UTF_8); break; @@ -128,12 +128,12 @@ public class RequestLoggerTests extends RestClientTestCase { public void testTraceResponse() throws IOException { ProtocolVersion protocolVersion = new ProtocolVersion("HTTP", 1, 1); - int statusCode = RandomInts.randomIntBetween(getRandom(), 200, 599); + int statusCode = RandomNumbers.randomIntBetween(getRandom(), 200, 599); String reasonPhrase = "REASON"; BasicStatusLine statusLine = new BasicStatusLine(protocolVersion, statusCode, reasonPhrase); String expected = "# " + statusLine.toString(); BasicHttpResponse httpResponse = new BasicHttpResponse(statusLine); - int numHeaders = RandomInts.randomIntBetween(getRandom(), 0, 3); + int numHeaders = RandomNumbers.randomIntBetween(getRandom(), 0, 3); for (int i = 0; i < numHeaders; i++) { httpResponse.setHeader("header" + i, "value"); expected += "\n# header" + i + ": value"; diff --git a/client/rest/src/test/java/org/elasticsearch/client/RestClientMultipleHostsTests.java b/client/rest/src/test/java/org/elasticsearch/client/RestClientMultipleHostsTests.java index 049a216936f..90ee4431009 100644 --- a/client/rest/src/test/java/org/elasticsearch/client/RestClientMultipleHostsTests.java +++ b/client/rest/src/test/java/org/elasticsearch/client/RestClientMultipleHostsTests.java @@ -19,7 +19,7 @@ package org.elasticsearch.client; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import org.apache.http.Header; import org.apache.http.HttpHost; import org.apache.http.HttpResponse; @@ -95,7 +95,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase { return null; } }); - int numHosts = RandomInts.randomIntBetween(getRandom(), 2, 5); + int numHosts = RandomNumbers.randomIntBetween(getRandom(), 2, 5); httpHosts = new HttpHost[numHosts]; for (int i = 0; i < numHosts; i++) { httpHosts[i] = new HttpHost("localhost", 9200 + i); @@ -105,7 +105,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase { } public void testRoundRobinOkStatusCodes() throws IOException { - int numIters = RandomInts.randomIntBetween(getRandom(), 1, 5); + int numIters = RandomNumbers.randomIntBetween(getRandom(), 1, 5); for (int i = 0; i < numIters; i++) { Set hostsSet = new HashSet<>(); Collections.addAll(hostsSet, httpHosts); @@ -121,7 +121,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase { } public void testRoundRobinNoRetryErrors() throws IOException { - int numIters = RandomInts.randomIntBetween(getRandom(), 1, 5); + int numIters = RandomNumbers.randomIntBetween(getRandom(), 1, 5); for (int i = 0; i < numIters; i++) { Set hostsSet = new HashSet<>(); Collections.addAll(hostsSet, httpHosts); @@ -198,7 +198,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase { assertEquals("every host should have been used but some weren't: " + hostsSet, 0, hostsSet.size()); } - int numIters = RandomInts.randomIntBetween(getRandom(), 2, 5); + int numIters = RandomNumbers.randomIntBetween(getRandom(), 2, 5); for (int i = 1; i <= numIters; i++) { //check that one different host is resurrected at each new attempt Set hostsSet = new HashSet<>(); @@ -228,7 +228,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase { if (getRandom().nextBoolean()) { //mark one host back alive through a successful request and check that all requests after that are sent to it HttpHost selectedHost = null; - int iters = RandomInts.randomIntBetween(getRandom(), 2, 10); + int iters = RandomNumbers.randomIntBetween(getRandom(), 2, 10); for (int y = 0; y < iters; y++) { int statusCode = randomErrorNoRetryStatusCode(getRandom()); Response response; @@ -269,7 +269,7 @@ public class RestClientMultipleHostsTests extends RestClientTestCase { } private static String randomErrorRetryEndpoint() { - switch(RandomInts.randomIntBetween(getRandom(), 0, 3)) { + switch(RandomNumbers.randomIntBetween(getRandom(), 0, 3)) { case 0: return "/" + randomErrorRetryStatusCode(getRandom()); case 1: diff --git a/client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java b/client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java index a926cabb87d..aeb0620134b 100644 --- a/client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java +++ b/client/sniffer/src/test/java/org/elasticsearch/client/sniff/ElasticsearchHostsSnifferTests.java @@ -19,7 +19,7 @@ package org.elasticsearch.client.sniff; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import com.carrotsearch.randomizedtesting.generators.RandomPicks; import com.carrotsearch.randomizedtesting.generators.RandomStrings; import com.fasterxml.jackson.core.JsonFactory; @@ -69,7 +69,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase { @Before public void startHttpServer() throws IOException { - this.sniffRequestTimeout = RandomInts.randomIntBetween(getRandom(), 1000, 10000); + this.sniffRequestTimeout = RandomNumbers.randomIntBetween(getRandom(), 1000, 10000); this.scheme = RandomPicks.randomFrom(getRandom(), ElasticsearchHostsSniffer.Scheme.values()); if (rarely()) { this.sniffResponse = SniffResponse.buildFailure(); @@ -101,7 +101,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase { assertEquals(e.getMessage(), "scheme cannot be null"); } try { - new ElasticsearchHostsSniffer(restClient, RandomInts.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0), + new ElasticsearchHostsSniffer(restClient, RandomNumbers.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0), ElasticsearchHostsSniffer.Scheme.HTTP); fail("should have failed"); } catch (IllegalArgumentException e) { @@ -175,7 +175,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase { } private static SniffResponse buildSniffResponse(ElasticsearchHostsSniffer.Scheme scheme) throws IOException { - int numNodes = RandomInts.randomIntBetween(getRandom(), 1, 5); + int numNodes = RandomNumbers.randomIntBetween(getRandom(), 1, 5); List hosts = new ArrayList<>(numNodes); JsonFactory jsonFactory = new JsonFactory(); StringWriter writer = new StringWriter(); @@ -205,7 +205,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase { boolean isHttpEnabled = rarely() == false; if (isHttpEnabled) { String host = "host" + i; - int port = RandomInts.randomIntBetween(getRandom(), 9200, 9299); + int port = RandomNumbers.randomIntBetween(getRandom(), 9200, 9299); HttpHost httpHost = new HttpHost(host, port, scheme.toString()); hosts.add(httpHost); generator.writeObjectFieldStart("http"); @@ -228,7 +228,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase { } if (getRandom().nextBoolean()) { String[] roles = {"master", "data", "ingest"}; - int numRoles = RandomInts.randomIntBetween(getRandom(), 0, 3); + int numRoles = RandomNumbers.randomIntBetween(getRandom(), 0, 3); Set nodeRoles = new HashSet<>(numRoles); for (int j = 0; j < numRoles; j++) { String role; @@ -242,7 +242,7 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase { } generator.writeEndArray(); } - int numAttributes = RandomInts.randomIntBetween(getRandom(), 0, 3); + int numAttributes = RandomNumbers.randomIntBetween(getRandom(), 0, 3); Map attributes = new HashMap<>(numAttributes); for (int j = 0; j < numAttributes; j++) { attributes.put("attr" + j, "value" + j); @@ -291,6 +291,6 @@ public class ElasticsearchHostsSnifferTests extends RestClientTestCase { } private static int randomErrorResponseCode() { - return RandomInts.randomIntBetween(getRandom(), 400, 599); + return RandomNumbers.randomIntBetween(getRandom(), 400, 599); } } diff --git a/client/sniffer/src/test/java/org/elasticsearch/client/sniff/SnifferBuilderTests.java b/client/sniffer/src/test/java/org/elasticsearch/client/sniff/SnifferBuilderTests.java index b0c387d733a..9a7359e9c72 100644 --- a/client/sniffer/src/test/java/org/elasticsearch/client/sniff/SnifferBuilderTests.java +++ b/client/sniffer/src/test/java/org/elasticsearch/client/sniff/SnifferBuilderTests.java @@ -19,7 +19,7 @@ package org.elasticsearch.client.sniff; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import org.apache.http.HttpHost; import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClientTestCase; @@ -31,7 +31,7 @@ import static org.junit.Assert.fail; public class SnifferBuilderTests extends RestClientTestCase { public void testBuild() throws Exception { - int numNodes = RandomInts.randomIntBetween(getRandom(), 1, 5); + int numNodes = RandomNumbers.randomIntBetween(getRandom(), 1, 5); HttpHost[] hosts = new HttpHost[numNodes]; for (int i = 0; i < numNodes; i++) { hosts[i] = new HttpHost("localhost", 9200 + i); @@ -46,14 +46,14 @@ public class SnifferBuilderTests extends RestClientTestCase { } try { - Sniffer.builder(client).setSniffIntervalMillis(RandomInts.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0)); + Sniffer.builder(client).setSniffIntervalMillis(RandomNumbers.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0)); fail("should have failed"); } catch(IllegalArgumentException e) { assertEquals("sniffIntervalMillis must be greater than 0", e.getMessage()); } try { - Sniffer.builder(client).setSniffAfterFailureDelayMillis(RandomInts.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0)); + Sniffer.builder(client).setSniffAfterFailureDelayMillis(RandomNumbers.randomIntBetween(getRandom(), Integer.MIN_VALUE, 0)); fail("should have failed"); } catch(IllegalArgumentException e) { assertEquals("sniffAfterFailureDelayMillis must be greater than 0", e.getMessage()); @@ -74,10 +74,10 @@ public class SnifferBuilderTests extends RestClientTestCase { SnifferBuilder builder = Sniffer.builder(client); if (getRandom().nextBoolean()) { - builder.setSniffIntervalMillis(RandomInts.randomIntBetween(getRandom(), 1, Integer.MAX_VALUE)); + builder.setSniffIntervalMillis(RandomNumbers.randomIntBetween(getRandom(), 1, Integer.MAX_VALUE)); } if (getRandom().nextBoolean()) { - builder.setSniffAfterFailureDelayMillis(RandomInts.randomIntBetween(getRandom(), 1, Integer.MAX_VALUE)); + builder.setSniffAfterFailureDelayMillis(RandomNumbers.randomIntBetween(getRandom(), 1, Integer.MAX_VALUE)); } if (getRandom().nextBoolean()) { builder.setHostsSniffer(new MockHostsSniffer()); diff --git a/core/src/main/java/org/elasticsearch/Version.java b/core/src/main/java/org/elasticsearch/Version.java index 0d8c3b72672..219eaa920d5 100644 --- a/core/src/main/java/org/elasticsearch/Version.java +++ b/core/src/main/java/org/elasticsearch/Version.java @@ -90,7 +90,7 @@ public class Version { public static final int V_5_0_0_rc1_ID = 5000051; public static final Version V_5_0_0_rc1 = new Version(V_5_0_0_rc1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0); public static final int V_6_0_0_alpha1_ID = 6000001; - public static final Version V_6_0_0_alpha1 = new Version(V_6_0_0_alpha1_ID, org.apache.lucene.util.Version.LUCENE_6_2_0); + public static final Version V_6_0_0_alpha1 = new Version(V_6_0_0_alpha1_ID, org.apache.lucene.util.Version.LUCENE_6_3_0); public static final Version CURRENT = V_6_0_0_alpha1; /* NOTE: don't add unreleased version to this list except of the version assigned to CURRENT. diff --git a/core/src/main/java/org/elasticsearch/common/xcontent/support/XContentMapValues.java b/core/src/main/java/org/elasticsearch/common/xcontent/support/XContentMapValues.java index c745c7d6c0c..a94bf63e270 100644 --- a/core/src/main/java/org/elasticsearch/common/xcontent/support/XContentMapValues.java +++ b/core/src/main/java/org/elasticsearch/common/xcontent/support/XContentMapValues.java @@ -185,8 +185,8 @@ public class XContentMapValues { // we want all sub properties to match as soon as an object matches return (map) -> filter(map, - include, include.getInitialState(), - exclude, exclude.getInitialState(), + include, 0, + exclude, 0, matchAllAutomaton); } @@ -237,7 +237,7 @@ public class XContentMapValues { // the object matched, so consider that the include matches every inner property // we only care about excludes now subIncludeAutomaton = matchAllAutomaton; - subIncludeState = includeAutomaton.getInitialState(); + subIncludeState = 0; } } diff --git a/core/src/main/resources/org/elasticsearch/bootstrap/security.policy b/core/src/main/resources/org/elasticsearch/bootstrap/security.policy index cbd1f93491b..310d485f98d 100644 --- a/core/src/main/resources/org/elasticsearch/bootstrap/security.policy +++ b/core/src/main/resources/org/elasticsearch/bootstrap/security.policy @@ -31,7 +31,7 @@ grant codeBase "${codebase.securesm-1.1.jar}" { //// Very special jar permissions: //// These are dangerous permissions that we don't want to grant to everything. -grant codeBase "${codebase.lucene-core-6.2.0.jar}" { +grant codeBase "${codebase.lucene-core-6.3.0-snapshot-ed102d6.jar}" { // needed to allow MMapDirectory's "unmap hack" (die unmap hack, die) // java 8 package permission java.lang.RuntimePermission "accessClassInPackage.sun.misc"; @@ -42,7 +42,7 @@ grant codeBase "${codebase.lucene-core-6.2.0.jar}" { permission java.lang.RuntimePermission "accessDeclaredMembers"; }; -grant codeBase "${codebase.lucene-misc-6.2.0.jar}" { +grant codeBase "${codebase.lucene-misc-6.3.0-snapshot-ed102d6.jar}" { // needed to allow shard shrinking to use hard-links if possible via lucenes HardlinkCopyDirectoryWrapper permission java.nio.file.LinkPermission "hard"; }; diff --git a/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy b/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy index 43f6b62c3c3..2c1a963e296 100644 --- a/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy +++ b/core/src/main/resources/org/elasticsearch/bootstrap/test-framework.policy @@ -33,7 +33,7 @@ grant codeBase "${codebase.securemock-1.2.jar}" { permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; }; -grant codeBase "${codebase.lucene-test-framework-6.2.0.jar}" { +grant codeBase "${codebase.lucene-test-framework-6.3.0-snapshot-ed102d6.jar}" { // needed by RamUsageTester permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; // needed for testing hardlinks in StoreRecoveryTests since we install MockFS @@ -42,7 +42,7 @@ grant codeBase "${codebase.lucene-test-framework-6.2.0.jar}" { permission java.lang.RuntimePermission "accessDeclaredMembers"; }; -grant codeBase "${codebase.randomizedtesting-runner-2.3.2.jar}" { +grant codeBase "${codebase.randomizedtesting-runner-2.4.0.jar}" { // optionally needed for access to private test methods (e.g. beforeClass) permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; // needed to fail tests on uncaught exceptions from other threads diff --git a/core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksTests.java b/core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksTests.java index be2a83af42c..6d0a0824490 100644 --- a/core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksTests.java +++ b/core/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/CancellableTasksTests.java @@ -19,7 +19,7 @@ package org.elasticsearch.action.admin.cluster.node.tasks; import com.carrotsearch.randomizedtesting.RandomizedContext; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import org.elasticsearch.action.ActionListener; import org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest; import org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksResponse; @@ -380,9 +380,9 @@ public class CancellableTasksTests extends TaskManagerTestCase { // Introduce an additional pseudo random repeatable race conditions String delayName = RandomizedContext.current().getRunnerSeedAsString() + ":" + nodeId + ":" + name; Random random = new Random(delayName.hashCode()); - if (RandomInts.randomIntBetween(random, 0, 10) < 1) { + if (RandomNumbers.randomIntBetween(random, 0, 10) < 1) { try { - Thread.sleep(RandomInts.randomIntBetween(random, 20, 50)); + Thread.sleep(RandomNumbers.randomIntBetween(random, 20, 50)); } catch (InterruptedException ex) { Thread.currentThread().interrupt(); } diff --git a/core/src/test/java/org/elasticsearch/client/transport/FailAndRetryMockTransport.java b/core/src/test/java/org/elasticsearch/client/transport/FailAndRetryMockTransport.java index 9d2c176dffb..bc771f5721d 100644 --- a/core/src/test/java/org/elasticsearch/client/transport/FailAndRetryMockTransport.java +++ b/core/src/test/java/org/elasticsearch/client/transport/FailAndRetryMockTransport.java @@ -19,10 +19,7 @@ package org.elasticsearch.client.transport; -import com.carrotsearch.randomizedtesting.generators.RandomInts; -import org.elasticsearch.Version; import org.elasticsearch.action.admin.cluster.node.liveness.LivenessResponse; -import org.elasticsearch.action.admin.cluster.node.liveness.TransportLivenessAction; import org.elasticsearch.cluster.ClusterName; import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.component.Lifecycle; @@ -37,7 +34,6 @@ import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.transport.TransportRequestOptions; import org.elasticsearch.transport.TransportResponse; import org.elasticsearch.transport.TransportResponseHandler; -import org.elasticsearch.transport.TransportService; import org.elasticsearch.transport.TransportServiceAdapter; import java.io.IOException; @@ -83,7 +79,7 @@ abstract class FailAndRetryMockTransport imp //once nodes are connected we'll just return errors for each sendRequest call triedNodes.add(node); - if (RandomInts.randomInt(random, 100) > 10) { + if (random.nextInt(100) > 10) { connectTransportExceptions.incrementAndGet(); throw new ConnectTransportException(node, "node not available"); } else { diff --git a/core/src/test/java/org/elasticsearch/index/query/RandomQueryBuilder.java b/core/src/test/java/org/elasticsearch/index/query/RandomQueryBuilder.java index c244273d13a..d16b225ab69 100644 --- a/core/src/test/java/org/elasticsearch/index/query/RandomQueryBuilder.java +++ b/core/src/test/java/org/elasticsearch/index/query/RandomQueryBuilder.java @@ -19,7 +19,7 @@ package org.elasticsearch.index.query; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import com.carrotsearch.randomizedtesting.generators.RandomStrings; import org.elasticsearch.test.AbstractQueryTestCase; @@ -38,7 +38,7 @@ public class RandomQueryBuilder { * @return a random {@link QueryBuilder} */ public static QueryBuilder createQuery(Random r) { - switch (RandomInts.randomIntBetween(r, 0, 3)) { + switch (RandomNumbers.randomIntBetween(r, 0, 3)) { case 0: return new MatchAllQueryBuilderTests().createTestQueryBuilder(); case 1: @@ -61,7 +61,7 @@ public class RandomQueryBuilder { // for now, only use String Rangequeries for MultiTerm test, numeric and date makes little sense // see issue #12123 for discussion MultiTermQueryBuilder multiTermQueryBuilder; - switch(RandomInts.randomIntBetween(r, 0, 3)) { + switch(RandomNumbers.randomIntBetween(r, 0, 3)) { case 0: RangeQueryBuilder stringRangeQuery = new RangeQueryBuilder(AbstractQueryTestCase.STRING_FIELD_NAME); stringRangeQuery.from("a" + RandomStrings.randomAsciiOfLengthBetween(r, 1, 10)); @@ -81,7 +81,7 @@ public class RandomQueryBuilder { throw new UnsupportedOperationException(); } if (r.nextBoolean()) { - multiTermQueryBuilder.boost(2.0f / RandomInts.randomIntBetween(r, 1, 20)); + multiTermQueryBuilder.boost(2.0f / RandomNumbers.randomIntBetween(r, 1, 20)); } return multiTermQueryBuilder; } diff --git a/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTests.java b/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTests.java index 4bd8ba9cb3e..74b61047ace 100644 --- a/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTests.java +++ b/core/src/test/java/org/elasticsearch/index/snapshots/blobstore/SlicedInputStreamTests.java @@ -18,7 +18,7 @@ */ package org.elasticsearch.index.snapshots.blobstore; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import org.elasticsearch.test.ESTestCase; import java.io.ByteArrayInputStream; @@ -111,7 +111,7 @@ public class SlicedInputStreamTests extends ESTestCase { } private byte[] randomBytes(Random random) { - int length = RandomInts.randomIntBetween(random, 1, 10); + int length = RandomNumbers.randomIntBetween(random, 1, 10); byte[] data = new byte[length]; random.nextBytes(data); return data; diff --git a/core/src/test/java/org/elasticsearch/test/geo/RandomShapeGenerator.java b/core/src/test/java/org/elasticsearch/test/geo/RandomShapeGenerator.java index eeebe8cbcdc..e18ba0fe322 100644 --- a/core/src/test/java/org/elasticsearch/test/geo/RandomShapeGenerator.java +++ b/core/src/test/java/org/elasticsearch/test/geo/RandomShapeGenerator.java @@ -19,7 +19,7 @@ package org.elasticsearch.test.geo; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import com.vividsolutions.jts.algorithm.ConvexHull; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Geometry; @@ -61,7 +61,7 @@ public class RandomShapeGenerator extends RandomGeoGenerator { private static final ShapeType[] types = values(); public static ShapeType randomType(Random r) { - return types[RandomInts.randomIntBetween(r, 0, types.length - 1)]; + return types[RandomNumbers.randomIntBetween(r, 0, types.length - 1)]; } } @@ -115,7 +115,7 @@ public class RandomShapeGenerator extends RandomGeoGenerator { throws InvalidShapeException { if (numGeometries <= 0) { // cap geometry collection at 4 shapes (to save test time) - numGeometries = RandomInts.randomIntBetween(r, 2, 4); + numGeometries = RandomNumbers.randomIntBetween(r, 2, 4); } if (nearPoint == null) { @@ -187,7 +187,7 @@ public class RandomShapeGenerator extends RandomGeoGenerator { // for random testing having a maximum number of 10 points for a line string is more than sufficient // if this number gets out of hand, the number of self intersections for a linestring can become // (n^2-n)/2 and computing the relation intersection matrix will become NP-Hard - int numPoints = RandomInts.randomIntBetween(r, 3, 10); + int numPoints = RandomNumbers.randomIntBetween(r, 3, 10); CoordinatesBuilder coordinatesBuilder = new CoordinatesBuilder(); for (int i=0; i= 90; + return r.nextInt(100) >= 90; } private static Range xRandomRange(Random r, double near, Range bounds) { diff --git a/distribution/licenses/lucene-analyzers-common-6.2.0.jar.sha1 b/distribution/licenses/lucene-analyzers-common-6.2.0.jar.sha1 deleted file mode 100644 index 57aec3f4ac2..00000000000 --- a/distribution/licenses/lucene-analyzers-common-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -d254d52dd394b5079129f3d5f3bf4f2d44a5936e \ No newline at end of file diff --git a/distribution/licenses/lucene-analyzers-common-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-analyzers-common-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..7947a57e315 --- /dev/null +++ b/distribution/licenses/lucene-analyzers-common-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +6a96375ee285920400266dfc411342f2e3d3d623 \ No newline at end of file diff --git a/distribution/licenses/lucene-backward-codecs-6.2.0.jar.sha1 b/distribution/licenses/lucene-backward-codecs-6.2.0.jar.sha1 deleted file mode 100644 index 04aefc62f61..00000000000 --- a/distribution/licenses/lucene-backward-codecs-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -b625bb21456b3c0d1e5e431bced125cb060c1abd \ No newline at end of file diff --git a/distribution/licenses/lucene-backward-codecs-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-backward-codecs-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..e395661bace --- /dev/null +++ b/distribution/licenses/lucene-backward-codecs-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +aa0403f90ac23f50667477b314175e58175c8067 \ No newline at end of file diff --git a/distribution/licenses/lucene-core-6.2.0.jar.sha1 b/distribution/licenses/lucene-core-6.2.0.jar.sha1 deleted file mode 100644 index 2d74124e624..00000000000 --- a/distribution/licenses/lucene-core-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -849ee62525a294416802be2cacc66c80352f6f13 \ No newline at end of file diff --git a/distribution/licenses/lucene-core-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-core-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..0ac4d342184 --- /dev/null +++ b/distribution/licenses/lucene-core-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +6510e4e4af2b90a2d1e2e8c27e92120667c0bff8 \ No newline at end of file diff --git a/distribution/licenses/lucene-grouping-6.2.0.jar.sha1 b/distribution/licenses/lucene-grouping-6.2.0.jar.sha1 deleted file mode 100644 index 6ba525a038f..00000000000 --- a/distribution/licenses/lucene-grouping-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -9527fedfd5acc624b2bb3f862bd99fb8f470b053 \ No newline at end of file diff --git a/distribution/licenses/lucene-grouping-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-grouping-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..fddadafd79c --- /dev/null +++ b/distribution/licenses/lucene-grouping-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +16fb10b3b006a4a7cb2ed9b436e59c91dc9edf47 \ No newline at end of file diff --git a/distribution/licenses/lucene-highlighter-6.2.0.jar.sha1 b/distribution/licenses/lucene-highlighter-6.2.0.jar.sha1 deleted file mode 100644 index c258e3fb850..00000000000 --- a/distribution/licenses/lucene-highlighter-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -7ca342372a3f45e32bbd21cecaa757e38eccb8a5 \ No newline at end of file diff --git a/distribution/licenses/lucene-highlighter-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-highlighter-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..2e9d4b99abd --- /dev/null +++ b/distribution/licenses/lucene-highlighter-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +47a3c05e1be7f593a0860c744c752807fb4d44fb \ No newline at end of file diff --git a/distribution/licenses/lucene-join-6.2.0.jar.sha1 b/distribution/licenses/lucene-join-6.2.0.jar.sha1 deleted file mode 100644 index 01989e96a58..00000000000 --- a/distribution/licenses/lucene-join-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -da0b8de98511abd4fe9c7d48a353d17854c5ed46 \ No newline at end of file diff --git a/distribution/licenses/lucene-join-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-join-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..4cf7214aa44 --- /dev/null +++ b/distribution/licenses/lucene-join-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +2bbe25506f997056555c8bfba64382663433517e \ No newline at end of file diff --git a/distribution/licenses/lucene-memory-6.2.0.jar.sha1 b/distribution/licenses/lucene-memory-6.2.0.jar.sha1 deleted file mode 100644 index b8a4a87efe2..00000000000 --- a/distribution/licenses/lucene-memory-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -bc9e075b1ee051c8e5246c237c38d8e71dab8a66 \ No newline at end of file diff --git a/distribution/licenses/lucene-memory-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-memory-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..ea50210ceab --- /dev/null +++ b/distribution/licenses/lucene-memory-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +76a1c370acfa5ad74beef243512a1dda64d01d79 \ No newline at end of file diff --git a/distribution/licenses/lucene-misc-6.2.0.jar.sha1 b/distribution/licenses/lucene-misc-6.2.0.jar.sha1 deleted file mode 100644 index f4e081865ad..00000000000 --- a/distribution/licenses/lucene-misc-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -94ddde6312566a4da4a50a88e453b6c82c759b41 \ No newline at end of file diff --git a/distribution/licenses/lucene-misc-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-misc-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..85a2e7bfd79 --- /dev/null +++ b/distribution/licenses/lucene-misc-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +ce459756eb7210c1bf7cd2a0cb25c7c5660de224 \ No newline at end of file diff --git a/distribution/licenses/lucene-queries-6.2.0.jar.sha1 b/distribution/licenses/lucene-queries-6.2.0.jar.sha1 deleted file mode 100644 index f7270a23afe..00000000000 --- a/distribution/licenses/lucene-queries-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -dce47238f78e3e97d91dc6fefa9f46f07866bc2b \ No newline at end of file diff --git a/distribution/licenses/lucene-queries-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-queries-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..83e1c72fa8a --- /dev/null +++ b/distribution/licenses/lucene-queries-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +1c27529566f2b8ab8856e8b0a4779ad2071588fc \ No newline at end of file diff --git a/distribution/licenses/lucene-queryparser-6.2.0.jar.sha1 b/distribution/licenses/lucene-queryparser-6.2.0.jar.sha1 deleted file mode 100644 index 8e95aa600ec..00000000000 --- a/distribution/licenses/lucene-queryparser-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -17ef728ac15e668bfa1105321611548424637645 \ No newline at end of file diff --git a/distribution/licenses/lucene-queryparser-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-queryparser-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..3a2cbe25abf --- /dev/null +++ b/distribution/licenses/lucene-queryparser-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +b5a9d1e55751dc193879c22a48823a863492bbe2 \ No newline at end of file diff --git a/distribution/licenses/lucene-sandbox-6.2.0.jar.sha1 b/distribution/licenses/lucene-sandbox-6.2.0.jar.sha1 deleted file mode 100644 index 1f34be3033d..00000000000 --- a/distribution/licenses/lucene-sandbox-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -520183f7b9aba77a26e224760c420a3844b0631a \ No newline at end of file diff --git a/distribution/licenses/lucene-sandbox-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-sandbox-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..b83229a5e93 --- /dev/null +++ b/distribution/licenses/lucene-sandbox-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +8d73ab3c889d386b3a594941992a5d942c57513a \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial-6.2.0.jar.sha1 b/distribution/licenses/lucene-spatial-6.2.0.jar.sha1 deleted file mode 100644 index 22e81792e40..00000000000 --- a/distribution/licenses/lucene-spatial-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8dba929b66927b936fbc76103b109ad6c824daee \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-spatial-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..cfff1364101 --- /dev/null +++ b/distribution/licenses/lucene-spatial-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +85e74df9bc722f9a858775496cad7f35dce65aa0 \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial-extras-6.2.0.jar.sha1 b/distribution/licenses/lucene-spatial-extras-6.2.0.jar.sha1 deleted file mode 100644 index d5e8f379d78..00000000000 --- a/distribution/licenses/lucene-spatial-extras-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -3b5a6ef5cd90c0218a72e9e2f7e60104be2447da \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial-extras-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-spatial-extras-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..f3c30ce0275 --- /dev/null +++ b/distribution/licenses/lucene-spatial-extras-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +cc12ac933b39ef33e186e77f7f6af6bdc99f9108 \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial3d-6.2.0.jar.sha1 b/distribution/licenses/lucene-spatial3d-6.2.0.jar.sha1 deleted file mode 100644 index d0ce5275a26..00000000000 --- a/distribution/licenses/lucene-spatial3d-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -fcdb0567725722c5145149d1502848b6a96ec18d \ No newline at end of file diff --git a/distribution/licenses/lucene-spatial3d-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-spatial3d-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..32f9ef0d6aa --- /dev/null +++ b/distribution/licenses/lucene-spatial3d-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +8dfc7a42839db1e4ef69dbfc23d9ef2fb6c43ff6 \ No newline at end of file diff --git a/distribution/licenses/lucene-suggest-6.2.0.jar.sha1 b/distribution/licenses/lucene-suggest-6.2.0.jar.sha1 deleted file mode 100644 index 39392ad1158..00000000000 --- a/distribution/licenses/lucene-suggest-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -3d9d526c51f483d27f425c75d7e56bc0849242d6 \ No newline at end of file diff --git a/distribution/licenses/lucene-suggest-6.3.0-snapshot-ed102d6.jar.sha1 b/distribution/licenses/lucene-suggest-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..1cde0aa3992 --- /dev/null +++ b/distribution/licenses/lucene-suggest-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +0b065269e76aa5cf56fa30dcb0cb4641974b6bed \ No newline at end of file diff --git a/docs/plugins/index.asciidoc b/docs/plugins/index.asciidoc index 8b1c3dd7726..ec1954a86a8 100644 --- a/docs/plugins/index.asciidoc +++ b/docs/plugins/index.asciidoc @@ -3,7 +3,7 @@ :ref: https://www.elastic.co/guide/en/elasticsearch/reference/master :guide: https://www.elastic.co/guide :version: 6.0.0-alpha1 -:lucene_version: 6.2.0 +:lucene_version: 6.3.0 :plugin_url: https://artifacts.elastic.co/downloads/elasticsearch-plugins [[intro]] diff --git a/docs/reference/index.asciidoc b/docs/reference/index.asciidoc index 26181a0fd80..93b25802bd3 100644 --- a/docs/reference/index.asciidoc +++ b/docs/reference/index.asciidoc @@ -9,7 +9,7 @@ release-state can be: released | prerelease | unreleased ////////// :release-state: unreleased -:lucene_version: 6.2.0 +:lucene_version: 6.3.4 :branch: master :jdk: 1.8.0_73 :defguide: https://www.elastic.co/guide/en/elasticsearch/guide/master diff --git a/modules/lang-expression/licenses/lucene-expressions-6.2.0.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-6.2.0.jar.sha1 deleted file mode 100644 index 205aaae6e66..00000000000 --- a/modules/lang-expression/licenses/lucene-expressions-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -99764b20aba5443f8a181f7015a806443c589844 \ No newline at end of file diff --git a/modules/lang-expression/licenses/lucene-expressions-6.3.0-snapshot-ed102d6.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..5499a2d2ebf --- /dev/null +++ b/modules/lang-expression/licenses/lucene-expressions-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +3ad2da8a2c48520f05723050252b131c96cc3b7c \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analyzers-icu-6.2.0.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analyzers-icu-6.2.0.jar.sha1 deleted file mode 100644 index 2a734f79a3f..00000000000 --- a/plugins/analysis-icu/licenses/lucene-analyzers-icu-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -68de5f298090b92aa9a803eb4f5aed0c9104e685 \ No newline at end of file diff --git a/plugins/analysis-icu/licenses/lucene-analyzers-icu-6.3.0-snapshot-ed102d6.jar.sha1 b/plugins/analysis-icu/licenses/lucene-analyzers-icu-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..296a0b911fc --- /dev/null +++ b/plugins/analysis-icu/licenses/lucene-analyzers-icu-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +2794258f69dd65abe1d991013b6ba98ae8a2ab60 \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.2.0.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.2.0.jar.sha1 deleted file mode 100644 index 749cb8ecde8..00000000000 --- a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -17ee76df332c0342a172790472b777086487a299 \ No newline at end of file diff --git a/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.3.0-snapshot-ed102d6.jar.sha1 b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..12c5e58189c --- /dev/null +++ b/plugins/analysis-kuromoji/licenses/lucene-analyzers-kuromoji-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +7e325a21b6bde7a86861bf380b40aeaafabe8c90 \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.2.0.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.2.0.jar.sha1 deleted file mode 100644 index 359173e0084..00000000000 --- a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -8d2a6b8679563d9f044eb1cee580282b20d8e149 \ No newline at end of file diff --git a/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.3.0-snapshot-ed102d6.jar.sha1 b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..2618809af12 --- /dev/null +++ b/plugins/analysis-phonetic/licenses/lucene-analyzers-phonetic-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +746a7888f48f3be86f7a31d95a1ca1e033cf0c3f \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.2.0.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.2.0.jar.sha1 deleted file mode 100644 index 66e339bfa2f..00000000000 --- a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -ba3fd99d1cf47d31b82817accdb199fc7a8d838d \ No newline at end of file diff --git a/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.3.0-snapshot-ed102d6.jar.sha1 b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..6b89f1e5386 --- /dev/null +++ b/plugins/analysis-smartcn/licenses/lucene-analyzers-smartcn-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +fec95fc0b5bb2e0855a9c9be3dc2982c0ab0fa16 \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.2.0.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.2.0.jar.sha1 deleted file mode 100644 index 5cfb071f3a3..00000000000 --- a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.2.0.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -09d2a759a765f73e2e7becbc560411469c464cfa \ No newline at end of file diff --git a/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.3.0-snapshot-ed102d6.jar.sha1 b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.3.0-snapshot-ed102d6.jar.sha1 new file mode 100644 index 00000000000..f6e72856fd9 --- /dev/null +++ b/plugins/analysis-stempel/licenses/lucene-analyzers-stempel-6.3.0-snapshot-ed102d6.jar.sha1 @@ -0,0 +1 @@ +8663b181f65dadffa6f0f42e56a7ab36ff447fd4 \ No newline at end of file diff --git a/test/framework/src/main/java/org/elasticsearch/ingest/RandomDocumentPicks.java b/test/framework/src/main/java/org/elasticsearch/ingest/RandomDocumentPicks.java index 3be4cd3edf4..efdf10d5a5d 100644 --- a/test/framework/src/main/java/org/elasticsearch/ingest/RandomDocumentPicks.java +++ b/test/framework/src/main/java/org/elasticsearch/ingest/RandomDocumentPicks.java @@ -19,7 +19,7 @@ package org.elasticsearch.ingest; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import com.carrotsearch.randomizedtesting.generators.RandomPicks; import com.carrotsearch.randomizedtesting.generators.RandomStrings; @@ -41,7 +41,7 @@ public final class RandomDocumentPicks { * path to refer to a field name using the dot notation. */ public static String randomFieldName(Random random) { - int numLevels = RandomInts.randomIntBetween(random, 1, 5); + int numLevels = RandomNumbers.randomIntBetween(random, 1, 5); String fieldName = ""; for (int i = 0; i < numLevels; i++) { if (i > 0) { @@ -169,7 +169,7 @@ public final class RandomDocumentPicks { } private static Object randomFieldValue(Random random, int currentDepth) { - switch(RandomInts.randomIntBetween(random, 0, 9)) { + switch(RandomNumbers.randomIntBetween(random, 0, 9)) { case 0: return randomString(random); case 1: @@ -180,28 +180,28 @@ public final class RandomDocumentPicks { return random.nextDouble(); case 4: List stringList = new ArrayList<>(); - int numStringItems = RandomInts.randomIntBetween(random, 1, 10); + int numStringItems = RandomNumbers.randomIntBetween(random, 1, 10); for (int j = 0; j < numStringItems; j++) { stringList.add(randomString(random)); } return stringList; case 5: List intList = new ArrayList<>(); - int numIntItems = RandomInts.randomIntBetween(random, 1, 10); + int numIntItems = RandomNumbers.randomIntBetween(random, 1, 10); for (int j = 0; j < numIntItems; j++) { intList.add(random.nextInt()); } return intList; case 6: List booleanList = new ArrayList<>(); - int numBooleanItems = RandomInts.randomIntBetween(random, 1, 10); + int numBooleanItems = RandomNumbers.randomIntBetween(random, 1, 10); for (int j = 0; j < numBooleanItems; j++) { booleanList.add(random.nextBoolean()); } return booleanList; case 7: List doubleList = new ArrayList<>(); - int numDoubleItems = RandomInts.randomIntBetween(random, 1, 10); + int numDoubleItems = RandomNumbers.randomIntBetween(random, 1, 10); for (int j = 0; j < numDoubleItems; j++) { doubleList.add(random.nextDouble()); } @@ -211,7 +211,7 @@ public final class RandomDocumentPicks { addRandomFields(random, newNode, ++currentDepth); return newNode; case 9: - byte[] byteArray = new byte[RandomInts.randomIntBetween(random, 1, 1024)]; + byte[] byteArray = new byte[RandomNumbers.randomIntBetween(random, 1, 1024)]; random.nextBytes(byteArray); return byteArray; default: @@ -230,7 +230,7 @@ public final class RandomDocumentPicks { if (currentDepth > 5) { return; } - int numFields = RandomInts.randomIntBetween(random, 1, 10); + int numFields = RandomNumbers.randomIntBetween(random, 1, 10); for (int i = 0; i < numFields; i++) { String fieldName = randomLeafFieldName(random); Object fieldValue = randomFieldValue(random, currentDepth); diff --git a/test/framework/src/main/java/org/elasticsearch/test/BackgroundIndexer.java b/test/framework/src/main/java/org/elasticsearch/test/BackgroundIndexer.java index 3c5f105e4d1..b739099cff0 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/BackgroundIndexer.java +++ b/test/framework/src/main/java/org/elasticsearch/test/BackgroundIndexer.java @@ -18,7 +18,7 @@ package org.elasticsearch.test;/* */ import com.carrotsearch.randomizedtesting.RandomizedTest; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import com.carrotsearch.randomizedtesting.generators.RandomStrings; import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.message.ParameterizedMessage; @@ -208,10 +208,10 @@ public class BackgroundIndexer implements AutoCloseable { } private XContentBuilder generateSource(long id, Random random) throws IOException { - int contentLength = RandomInts.randomIntBetween(random, minFieldSize, maxFieldSize); + int contentLength = RandomNumbers.randomIntBetween(random, minFieldSize, maxFieldSize); StringBuilder text = new StringBuilder(contentLength); while (text.length() < contentLength) { - int tokenLength = RandomInts.randomIntBetween(random, 1, Math.min(contentLength - text.length(), 10)); + int tokenLength = RandomNumbers.randomIntBetween(random, 1, Math.min(contentLength - text.length(), 10)); text.append(" ").append(RandomStrings.randomRealisticUnicodeOfCodepointLength(random, tokenLength)); } XContentBuilder builder = XContentFactory.smileBuilder(); diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java index 1f2f01cc352..bde3ebaa85c 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java @@ -20,7 +20,7 @@ package org.elasticsearch.test; import com.carrotsearch.randomizedtesting.RandomizedContext; import com.carrotsearch.randomizedtesting.annotations.TestGroup; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import com.carrotsearch.randomizedtesting.generators.RandomPicks; import org.apache.http.HttpHost; import org.apache.lucene.util.IOUtils; @@ -433,7 +433,7 @@ public abstract class ESIntegTestCase extends ESTestCase { if (randomBoolean()) { // keep this low so we don't stall tests - builder.put(UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), RandomInts.randomIntBetween(random, 1, 15) + "ms"); + builder.put(UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 1, 15) + "ms"); } return builder; @@ -446,8 +446,8 @@ public abstract class ESIntegTestCase extends ESTestCase { } switch (random.nextInt(4)) { case 3: - final int maxThreadCount = RandomInts.randomIntBetween(random, 1, 4); - final int maxMergeCount = RandomInts.randomIntBetween(random, maxThreadCount, maxThreadCount + 4); + final int maxThreadCount = RandomNumbers.randomIntBetween(random, 1, 4); + final int maxMergeCount = RandomNumbers.randomIntBetween(random, maxThreadCount, maxThreadCount + 4); builder.put(MergeSchedulerConfig.MAX_MERGE_COUNT_SETTING.getKey(), maxMergeCount); builder.put(MergeSchedulerConfig.MAX_THREAD_COUNT_SETTING.getKey(), maxThreadCount); break; @@ -458,7 +458,7 @@ public abstract class ESIntegTestCase extends ESTestCase { private static Settings.Builder setRandomIndexTranslogSettings(Random random, Settings.Builder builder) { if (random.nextBoolean()) { - builder.put(IndexSettings.INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 1, 300), ByteSizeUnit.MB)); + builder.put(IndexSettings.INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 1, 300), ByteSizeUnit.MB)); } if (random.nextBoolean()) { builder.put(IndexSettings.INDEX_TRANSLOG_FLUSH_THRESHOLD_SIZE_SETTING.getKey(), new ByteSizeValue(1, ByteSizeUnit.PB)); // just don't flush @@ -468,14 +468,14 @@ public abstract class ESIntegTestCase extends ESTestCase { } if (random.nextBoolean()) { - builder.put(IndexSettings.INDEX_TRANSLOG_SYNC_INTERVAL_SETTING.getKey(), RandomInts.randomIntBetween(random, 100, 5000), TimeUnit.MILLISECONDS); + builder.put(IndexSettings.INDEX_TRANSLOG_SYNC_INTERVAL_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 100, 5000), TimeUnit.MILLISECONDS); } return builder; } private TestCluster buildWithPrivateContext(final Scope scope, final long seed) throws Exception { - return RandomizedContext.current().runWithPrivateRandomness(new com.carrotsearch.randomizedtesting.Randomness(seed), new Callable() { + return RandomizedContext.current().runWithPrivateRandomness(seed, new Callable() { @Override public TestCluster call() throws Exception { return buildTestCluster(scope, seed); diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java index 9f6f17b80df..f75774a7364 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESTestCase.java @@ -25,7 +25,7 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope; import com.carrotsearch.randomizedtesting.annotations.ThreadLeakScope.Scope; import com.carrotsearch.randomizedtesting.annotations.TimeoutSuite; import com.carrotsearch.randomizedtesting.generators.CodepointSetGenerator; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import com.carrotsearch.randomizedtesting.generators.RandomPicks; import com.carrotsearch.randomizedtesting.generators.RandomStrings; import com.carrotsearch.randomizedtesting.rules.TestRuleAdapter; @@ -288,7 +288,7 @@ public abstract class ESTestCase extends LuceneTestCase { * @see #scaledRandomIntBetween(int, int) */ public static int randomIntBetween(int min, int max) { - return RandomInts.randomIntBetween(random(), min, max); + return RandomNumbers.randomIntBetween(random(), min, max); } /** diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java index ef86c45b59f..360a94c0a6d 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java +++ b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java @@ -21,7 +21,7 @@ package org.elasticsearch.test; import com.carrotsearch.randomizedtesting.RandomizedTest; import com.carrotsearch.randomizedtesting.SeedUtils; import com.carrotsearch.randomizedtesting.SysGlobals; -import com.carrotsearch.randomizedtesting.generators.RandomInts; +import com.carrotsearch.randomizedtesting.generators.RandomNumbers; import com.carrotsearch.randomizedtesting.generators.RandomPicks; import com.carrotsearch.randomizedtesting.generators.RandomStrings; import org.apache.logging.log4j.Logger; @@ -249,7 +249,7 @@ public final class InternalTestCluster extends TestCluster { boolean useDedicatedMasterNodes = randomlyAddDedicatedMasters ? random.nextBoolean() : false; - this.numSharedDataNodes = RandomInts.randomIntBetween(random, minNumDataNodes, maxNumDataNodes); + this.numSharedDataNodes = RandomNumbers.randomIntBetween(random, minNumDataNodes, maxNumDataNodes); assert this.numSharedDataNodes >= 0; if (numSharedDataNodes == 0) { @@ -267,7 +267,7 @@ public final class InternalTestCluster extends TestCluster { this.numSharedDedicatedMasterNodes = 0; } if (numClientNodes < 0) { - this.numSharedCoordOnlyNodes = RandomInts.randomIntBetween(random, DEFAULT_MIN_NUM_CLIENT_NODES, DEFAULT_MAX_NUM_CLIENT_NODES); + this.numSharedCoordOnlyNodes = RandomNumbers.randomIntBetween(random, DEFAULT_MIN_NUM_CLIENT_NODES, DEFAULT_MAX_NUM_CLIENT_NODES); } else { this.numSharedCoordOnlyNodes = numClientNodes; } @@ -321,14 +321,14 @@ public final class InternalTestCluster extends TestCluster { // Some tests make use of scripting quite a bit, so increase the limit for integration tests builder.put(ScriptService.SCRIPT_MAX_COMPILATIONS_PER_MINUTE.getKey(), 1000); if (TEST_NIGHTLY) { - builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 5, 10)); - builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 5, 10)); + builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 5, 10)); + builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 5, 10)); } else if (random.nextInt(100) <= 90) { - builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 2, 5)); - builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 2, 5)); + builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 2, 5)); + builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 2, 5)); } // always reduce this - it can make tests really slow - builder.put(RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_STATE_SYNC_SETTING.getKey(), TimeValue.timeValueMillis(RandomInts.randomIntBetween(random, 20, 50))); + builder.put(RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_STATE_SYNC_SETTING.getKey(), TimeValue.timeValueMillis(RandomNumbers.randomIntBetween(random, 20, 50))); defaultSettings = builder.build(); executor = EsExecutors.newScaling("test runner", 0, Integer.MAX_VALUE, 0, TimeUnit.SECONDS, EsExecutors.daemonThreadFactory("test_" + clusterName), new ThreadContext(Settings.EMPTY)); } @@ -396,7 +396,7 @@ public final class InternalTestCluster extends TestCluster { } if (random.nextBoolean()) { - builder.put(MappingUpdatedAction.INDICES_MAPPING_DYNAMIC_TIMEOUT_SETTING.getKey(), new TimeValue(RandomInts.randomIntBetween(random, 10, 30), TimeUnit.SECONDS)); + builder.put(MappingUpdatedAction.INDICES_MAPPING_DYNAMIC_TIMEOUT_SETTING.getKey(), new TimeValue(RandomNumbers.randomIntBetween(random, 10, 30), TimeUnit.SECONDS)); } if (random.nextInt(10) == 0) { @@ -406,9 +406,9 @@ public final class InternalTestCluster extends TestCluster { if (random.nextBoolean()) { if (random.nextInt(10) == 0) { // do something crazy slow here - builder.put(IndexStoreConfig.INDICES_STORE_THROTTLE_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 1, 10), ByteSizeUnit.MB)); + builder.put(IndexStoreConfig.INDICES_STORE_THROTTLE_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 1, 10), ByteSizeUnit.MB)); } else { - builder.put(IndexStoreConfig.INDICES_STORE_THROTTLE_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 10, 200), ByteSizeUnit.MB)); + builder.put(IndexStoreConfig.INDICES_STORE_THROTTLE_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 10, 200), ByteSizeUnit.MB)); } } if (random.nextBoolean()) { @@ -417,21 +417,21 @@ public final class InternalTestCluster extends TestCluster { if (random.nextBoolean()) { if (random.nextInt(10) == 0) { // do something crazy slow here - builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 1, 10), ByteSizeUnit.MB)); + builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 1, 10), ByteSizeUnit.MB)); } else { - builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomInts.randomIntBetween(random, 10, 200), ByteSizeUnit.MB)); + builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC_SETTING.getKey(), new ByteSizeValue(RandomNumbers.randomIntBetween(random, 10, 200), ByteSizeUnit.MB)); } } if (random.nextBoolean()) { - builder.put(TcpTransport.PING_SCHEDULE.getKey(), RandomInts.randomIntBetween(random, 100, 2000) + "ms"); + builder.put(TcpTransport.PING_SCHEDULE.getKey(), RandomNumbers.randomIntBetween(random, 100, 2000) + "ms"); } if (random.nextBoolean()) { - builder.put(ScriptService.SCRIPT_CACHE_SIZE_SETTING.getKey(), RandomInts.randomIntBetween(random, 0, 2000)); + builder.put(ScriptService.SCRIPT_CACHE_SIZE_SETTING.getKey(), RandomNumbers.randomIntBetween(random, 0, 2000)); } if (random.nextBoolean()) { - builder.put(ScriptService.SCRIPT_CACHE_EXPIRE_SETTING.getKey(), TimeValue.timeValueMillis(RandomInts.randomIntBetween(random, 750, 10000000)).getStringRep()); + builder.put(ScriptService.SCRIPT_CACHE_EXPIRE_SETTING.getKey(), TimeValue.timeValueMillis(RandomNumbers.randomIntBetween(random, 750, 10000000)).getStringRep()); } return builder.build();