diff --git a/sql/cli-proto/build.gradle b/sql/cli-proto/build.gradle index 059f8d384e4..cefc4c5c532 100644 --- a/sql/cli-proto/build.gradle +++ b/sql/cli-proto/build.gradle @@ -1,7 +1,11 @@ apply plugin: 'elasticsearch.build' description = 'Request and response objects shared by the cli and ' + - 'its backend in :x-pack-elasticsearch:plugin' + 'its backend in :sql:server' + +dependencies { + testCompile project(':x-pack-elasticsearch:sql:test-utils') +} forbiddenApisMain { // does not depend on core, so only jdk and http signatures should be checked diff --git a/sql/cli-proto/src/main/java/org/elasticsearch/xpack/sql/cli/net/protocol/CommandResponse.java b/sql/cli-proto/src/main/java/org/elasticsearch/xpack/sql/cli/net/protocol/CommandResponse.java index 1963872dd06..912646801b5 100644 --- a/sql/cli-proto/src/main/java/org/elasticsearch/xpack/sql/cli/net/protocol/CommandResponse.java +++ b/sql/cli-proto/src/main/java/org/elasticsearch/xpack/sql/cli/net/protocol/CommandResponse.java @@ -8,40 +8,65 @@ package org.elasticsearch.xpack.sql.cli.net.protocol; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; +import java.util.Objects; import org.elasticsearch.xpack.sql.cli.net.protocol.Proto.Action; import org.elasticsearch.xpack.sql.cli.net.protocol.Proto.Status; public class CommandResponse extends Response { - public final long serverTimeQueryReceived, serverTimeResponseSent, timeSpent; + public final long serverTimeQueryReceived, serverTimeResponseSent; public final String requestId; - public final Object data; // NOCOMMIT should be a string? reading it is weird. + public final Object data; // NOCOMMIT should be a string? serialization is weird too. public CommandResponse(long serverTimeQueryReceived, long serverTimeResponseSent, String requestId, Object data) { super(Action.COMMAND); this.serverTimeQueryReceived = serverTimeQueryReceived; this.serverTimeResponseSent = serverTimeResponseSent; - this.timeSpent = serverTimeQueryReceived - serverTimeResponseSent; this.requestId = requestId; this.data = data; } + public CommandResponse(DataInput in) throws IOException { + super(Action.COMMAND); + serverTimeQueryReceived = in.readLong(); + serverTimeResponseSent = in.readLong(); + requestId = in.readUTF(); + data = null; + } + public void encode(DataOutput out) throws IOException { - out.writeInt(Status.toSuccess(action)); + out.writeInt(Status.toSuccess(action)); // NOCOMMIT no symetric! out.writeLong(serverTimeQueryReceived); out.writeLong(serverTimeResponseSent); out.writeUTF(requestId); } - public static CommandResponse decode(DataInput in) throws IOException { - long serverTimeQueryReceived = in.readLong(); - long serverTimeResponseSent = in.readLong(); - String requestId = in.readUTF(); + @Override + public String toString() { + return "CommandResponse"; + } - return new CommandResponse(serverTimeQueryReceived, serverTimeResponseSent, requestId, null); + @Override + public boolean equals(Object obj) { + if (obj == null || obj.getClass() != getClass()) { + return false; + } + CommandResponse other = (CommandResponse) obj; + return serverTimeQueryReceived == other.serverTimeQueryReceived + && serverTimeResponseSent == other.serverTimeResponseSent + && Objects.equals(requestId, other.requestId) + && Objects.equals(data, other.data); + } + + @Override + public int hashCode() { + return Objects.hash(serverTimeQueryReceived, serverTimeResponseSent, requestId, data); } } \ No newline at end of file diff --git a/sql/cli-proto/src/main/java/org/elasticsearch/xpack/sql/cli/net/protocol/ProtoUtils.java b/sql/cli-proto/src/main/java/org/elasticsearch/xpack/sql/cli/net/protocol/ProtoUtils.java index 1dde0e342fb..6214fd40595 100644 --- a/sql/cli-proto/src/main/java/org/elasticsearch/xpack/sql/cli/net/protocol/ProtoUtils.java +++ b/sql/cli-proto/src/main/java/org/elasticsearch/xpack/sql/cli/net/protocol/ProtoUtils.java @@ -51,10 +51,10 @@ public abstract class ProtoUtils { case INFO: return InfoResponse.decode(in); case COMMAND: - return CommandResponse.decode(in); + return new CommandResponse(in); default: // cannot find action type - return null; + return null; // NOCOMMIT throw an exception? } default: return null; diff --git a/sql/cli-proto/src/test/java/org/elasticsearch/xpack/sql/cli/net/protocol/CommandResponseTests.java b/sql/cli-proto/src/test/java/org/elasticsearch/xpack/sql/cli/net/protocol/CommandResponseTests.java new file mode 100644 index 00000000000..29c27e76f5d --- /dev/null +++ b/sql/cli-proto/src/test/java/org/elasticsearch/xpack/sql/cli/net/protocol/CommandResponseTests.java @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ +package org.elasticsearch.xpack.sql.cli.net.protocol; + +import org.elasticsearch.test.ESTestCase; + +import java.io.IOException; + +import static org.elasticsearch.xpack.sql.test.RoundTripTestUtils.assertRoundTrip; + +public class CommandResponseTests extends ESTestCase { + static CommandResponse randomCommandResponse() { + long start = randomNonNegativeLong(); + long end = randomValueOtherThanMany(l -> l >= start, ESTestCase::randomNonNegativeLong); + return new CommandResponse(start, end, randomAlphaOfLength(5), randomAlphaOfLength(5)); + } + + public void testRoundTrip() throws IOException { + assertRoundTrip(randomCommandResponse(), (response, out) -> { + // NOCOMMIT make this simpler + response.encode(out); + out.writeUTF(response.data.toString()); + }, in -> { + // NOCOMMIT make this simpler + CommandResponse response = (CommandResponse) ProtoUtils.readResponse(in, in.readInt()); + return new CommandResponse(response.serverTimeQueryReceived, response.serverTimeResponseSent, + response.requestId, in.readUTF()); + }); + } +} diff --git a/sql/cli/src/main/java/org/elasticsearch/xpack/sql/cli/net/client/CliHttpClient.java b/sql/cli/src/main/java/org/elasticsearch/xpack/sql/cli/net/client/CliHttpClient.java index e6557dcdaf9..09a3ebc5655 100644 --- a/sql/cli/src/main/java/org/elasticsearch/xpack/sql/cli/net/client/CliHttpClient.java +++ b/sql/cli/src/main/java/org/elasticsearch/xpack/sql/cli/net/client/CliHttpClient.java @@ -41,6 +41,7 @@ public class CliHttpClient implements AutoCloseable { Response response = readResponse(in, Action.COMMAND); // read data if (response instanceof CommandResponse) { + // NOCOMMIT embed data in response String result = in.readUTF(); CommandResponse cr = (CommandResponse) response; return new CommandResponse(cr.serverTimeQueryReceived, cr.serverTimeResponseSent, cr.requestId, result); diff --git a/sql/cli/test b/sql/cli/test deleted file mode 100644 index acca0ae4ab3..00000000000 --- a/sql/cli/test +++ /dev/null @@ -1,726 +0,0 @@ -:buildSrc:compileJava UP-TO-DATE -:buildSrc:compileGroovy UP-TO-DATE -:buildSrc:writeVersionProperties UP-TO-DATE -:buildSrc:processResources UP-TO-DATE -:buildSrc:classes UP-TO-DATE -:buildSrc:jar UP-TO-DATE -:buildSrc:assemble UP-TO-DATE -:buildSrc:compileTestJava UP-TO-DATE -:buildSrc:compileTestGroovy UP-TO-DATE -:buildSrc:processTestResources UP-TO-DATE -:buildSrc:testClasses UP-TO-DATE -:buildSrc:test UP-TO-DATE -:buildSrc:check UP-TO-DATE -:buildSrc:build UP-TO-DATE -======================================= -Elasticsearch Build Hamster says Hello! -======================================= - Gradle Version : 3.3 - OS Info : Mac OS X 10.12.5 (x86_64) - JDK Version : Oracle Corporation 1.8.0_111 [Java HotSpot(TM) 64-Bit Server VM 25.111-b14] - JAVA_HOME : /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home - Random Testing Seed : 9AA91CE0393837C9 -Incremental java compilation is an incubating feature. -:x-pack-elasticsearch:sql:cli:dependencies - ------------------------------------------------------------- -Project :x-pack-elasticsearch:sql:cli - Command line interface to Elasticsearch that speaks SQL ------------------------------------------------------------- - -_plugin_integTestCluster_:x-pack-elasticsearch:plugin -\--- project :x-pack-elasticsearch:plugin - -_plugin_runServer_:x-pack-elasticsearch:plugin -\--- project :x-pack-elasticsearch:plugin - -_transitive_org.jline:jline:3.3.1 -\--- org.jline:jline:3.3.1 - -archives - Configuration for archive artifacts. -No dependencies - -checkstyle - The Checkstyle libraries to be used for this project. -\--- com.puppycrawl.tools:checkstyle:7.5 - +--- antlr:antlr:2.7.7 - +--- org.antlr:antlr4-runtime:4.6 - +--- commons-beanutils:commons-beanutils:1.9.3 - | \--- commons-collections:commons-collections:3.2.2 - +--- commons-cli:commons-cli:1.3.1 - \--- com.google.guava:guava:19.0 - -compile - Dependencies for source set 'main'. -+--- org.jline:jline:3.3.1 -+--- project :x-pack-elasticsearch:sql:net-client -\--- project :x-pack-elasticsearch:sql:cli-proto - -compileClasspath - Compile classpath for source set 'main'. -+--- org.jline:jline:3.3.1 -+--- project :x-pack-elasticsearch:sql:net-client -\--- project :x-pack-elasticsearch:sql:cli-proto - -compileOnly - Compile dependencies for source set 'main'. -+--- org.jline:jline:3.3.1 -+--- project :x-pack-elasticsearch:sql:net-client -\--- project :x-pack-elasticsearch:sql:cli-proto - -default - Configuration for default artifacts. -+--- org.jline:jline:3.3.1 -+--- project :x-pack-elasticsearch:sql:net-client -+--- project :x-pack-elasticsearch:sql:cli-proto -+--- org.fusesource.jansi:jansi:1.16 -\--- org.elasticsearch:jna:4.4.0-1 - -integTestCluster_elasticsearchBwcDistro -No dependencies - -integTestCluster_elasticsearchBwcPlugins -No dependencies - -integTestCluster_elasticsearchDistro -\--- org.elasticsearch.distribution.zip:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :distribution:zip - -loggerUsagePlugin -\--- org.elasticsearch.test:logger-usage:6.0.0-alpha3-SNAPSHOT -> project :test:logger-usage - +--- org.ow2.asm:asm-debug-all:5.0.4 - \--- org.apache.logging.log4j:log4j-api:2.8.2 - -namingConventions -\--- org.elasticsearch.gradle:build-tools:6.0.0-alpha3-SNAPSHOT -> project :build-tools - -provided - much like compile, but indicates that you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive. -No dependencies - -restSpec -\--- org.elasticsearch:rest-api-spec:6.0.0-alpha3-SNAPSHOT -> project :rest-api-spec - -runServer_elasticsearchBwcDistro -No dependencies - -runServer_elasticsearchBwcPlugins -No dependencies - -runServer_elasticsearchDistro -\--- org.elasticsearch.distribution.zip:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :distribution:zip - -runtime - Runtime dependencies for source set 'main'. -+--- org.jline:jline:3.3.1 -+--- project :x-pack-elasticsearch:sql:net-client -+--- project :x-pack-elasticsearch:sql:cli-proto -+--- org.fusesource.jansi:jansi:1.16 -\--- org.elasticsearch:jna:4.4.0-1 - -testCompile - Dependencies for source set 'test'. -+--- org.jline:jline:3.3.1 -+--- project :x-pack-elasticsearch:sql:net-client -+--- project :x-pack-elasticsearch:sql:cli-proto -+--- org.elasticsearch.test:framework:6.0.0-alpha3-SNAPSHOT -> project :test:framework -| +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core -| | +--- org.apache.lucene:lucene-core:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-analyzers-common:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-backward-codecs:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-grouping:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-highlighter:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-join:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-memory:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-misc:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-queries:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-queryparser:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-sandbox:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial-extras:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial3d:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-suggest:7.0.0-snapshot-ad2cb77 -| | +--- org.elasticsearch:securesm:1.1 -| | +--- net.sf.jopt-simple:jopt-simple:5.0.2 -| | +--- com.carrotsearch:hppc:0.7.1 -| | +--- joda-time:joda-time:2.9.5 -| | +--- org.yaml:snakeyaml:1.15 -| | +--- com.fasterxml.jackson.core:jackson-core:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.6 -| | +--- com.tdunning:t-digest:3.0 -| | +--- org.hdrhistogram:HdrHistogram:2.1.9 -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | +--- org.apache.logging.log4j:log4j-1.2-api:2.8.2 -| | \--- org.elasticsearch:jna:4.4.0-1 -| +--- com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.5.2 -| +--- junit:junit:4.12 -| +--- org.hamcrest:hamcrest-all:1.3 -| +--- org.apache.lucene:lucene-test-framework:7.0.0-snapshot-ad2cb77 -| +--- org.apache.lucene:lucene-codecs:7.0.0-snapshot-ad2cb77 -| +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest -| | +--- org.apache.httpcomponents:httpclient:4.5.2 -| | +--- org.apache.httpcomponents:httpcore:4.4.5 -| | +--- org.apache.httpcomponents:httpasyncclient:4.1.2 -| | +--- org.apache.httpcomponents:httpcore-nio:4.4.5 -| | +--- commons-codec:commons-codec:1.10 -| | \--- commons-logging:commons-logging:1.1.3 -| +--- org.apache.httpcomponents:httpclient:4.5.2 -| +--- org.apache.httpcomponents:httpcore:4.4.5 -| +--- commons-logging:commons-logging:1.1.3 -| +--- commons-codec:commons-codec:1.10 -| +--- org.elasticsearch:securemock:1.2 -| \--- org.elasticsearch:mocksocket:1.2 -+--- project :x-pack-elasticsearch:transport-client -| +--- org.elasticsearch.plugin:x-pack-api:6.0.0-alpha3-SNAPSHOT -> project :x-pack-elasticsearch:plugin -| | +--- project :modules:transport-netty4 -| | | +--- io.netty:netty-buffer:4.1.11.Final -| | | +--- io.netty:netty-codec:4.1.11.Final -| | | +--- io.netty:netty-codec-http:4.1.11.Final -| | | +--- io.netty:netty-common:4.1.11.Final -| | | +--- io.netty:netty-handler:4.1.11.Final -| | | +--- io.netty:netty-resolver:4.1.11.Final -| | | +--- io.netty:netty-transport:4.1.11.Final -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | +--- com.unboundid:unboundid-ldapsdk:3.2.0 -| | +--- org.bouncycastle:bcprov-jdk15on:1.55 -| | +--- org.bouncycastle:bcpkix-jdk15on:1.55 -| | +--- com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239 -| | +--- com.google.guava:guava:18.0 -| | +--- com.sun.mail:javax.mail:1.5.6 -| | +--- javax.activation:activation:1.1.1 -| | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | +--- org.elasticsearch.client:sniffer:6.0.0-alpha3-SNAPSHOT -> project :client:sniffer -| | | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | | +--- org.apache.httpcomponents:httpclient:4.5.2 -| | | +--- org.apache.httpcomponents:httpcore:4.4.5 -| | | +--- commons-codec:commons-codec:1.10 -| | | +--- commons-logging:commons-logging:1.1.3 -| | | \--- com.fasterxml.jackson.core:jackson-core:2.8.6 -| | +--- net.sf.supercsv:super-csv:2.4.0 -| | +--- project :x-pack-elasticsearch:sql:server -| | | +--- project :x-pack-elasticsearch:sql:jdbc-proto -| | | +--- project :x-pack-elasticsearch:sql:cli-proto -| | | \--- org.antlr:antlr4-runtime:4.5.1-1 -| | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | +--- org.elasticsearch:jna:4.4.0-1 -| | +--- org.elasticsearch.test:framework:6.0.0-alpha3-SNAPSHOT -> project :test:framework (*) -| | +--- com.google.jimfs:jimfs:1.1 -| | +--- org.subethamail:subethasmtp:3.1.7 -| | +--- com.google.code.findbugs:jsr305:3.0.1 -| | +--- org.ini4j:ini4j:0.5.2 -| | +--- org.elasticsearch:securemock:1.2 -| | +--- org.elasticsearch:mocksocket:1.2 -| | +--- org.slf4j:slf4j-log4j12:1.6.2 -| | +--- org.slf4j:slf4j-api:1.6.2 -| | +--- project :modules:reindex -| | | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | +--- project :modules:parent-join -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | \--- project :modules:analysis-common -| | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | \--- org.elasticsearch:jna:4.4.0-1 -| \--- org.elasticsearch.client:transport:6.0.0-alpha3-SNAPSHOT -> project :client:transport -| +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| +--- org.elasticsearch.plugin:transport-netty4-client:6.0.0-alpha3-SNAPSHOT -> project :modules:transport-netty4 (*) -| +--- org.elasticsearch.plugin:reindex-client:6.0.0-alpha3-SNAPSHOT -> project :modules:reindex (*) -| +--- org.elasticsearch.plugin:lang-mustache-client:6.0.0-alpha3-SNAPSHOT -> project :modules:lang-mustache -| | \--- com.github.spullara.mustache.java:compiler:0.9.3 -| +--- org.elasticsearch.plugin:percolator-client:6.0.0-alpha3-SNAPSHOT -> project :modules:percolator -| \--- org.elasticsearch.plugin:parent-join-client:6.0.0-alpha3-SNAPSHOT -> project :modules:parent-join (*) -+--- project :x-pack-elasticsearch:plugin (*) -+--- project :x-pack-elasticsearch:sql:test-utils -| +--- org.elasticsearch.client:transport:6.0.0-alpha3-SNAPSHOT -> project :client:transport (*) -| +--- junit:junit:4.12 -| \--- org.hamcrest:hamcrest-all:1.3 -\--- project :modules:lang-painless - +--- org.antlr:antlr4-runtime:4.5.1-1 - +--- org.ow2.asm:asm-debug-all:5.1 - +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) - +--- org.locationtech.spatial4j:spatial4j:0.6 - +--- com.vividsolutions:jts:1.13 - +--- org.apache.logging.log4j:log4j-api:2.8.2 - +--- org.apache.logging.log4j:log4j-core:2.8.2 - \--- org.elasticsearch:jna:4.4.0-1 - -testCompileClasspath - Compile classpath for source set 'test'. -+--- org.jline:jline:3.3.1 -+--- project :x-pack-elasticsearch:sql:net-client -+--- project :x-pack-elasticsearch:sql:cli-proto -+--- org.elasticsearch.test:framework:6.0.0-alpha3-SNAPSHOT -> project :test:framework -| +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core -| | +--- org.apache.lucene:lucene-core:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-analyzers-common:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-backward-codecs:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-grouping:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-highlighter:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-join:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-memory:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-misc:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-queries:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-queryparser:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-sandbox:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial-extras:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial3d:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-suggest:7.0.0-snapshot-ad2cb77 -| | +--- org.elasticsearch:securesm:1.1 -| | +--- net.sf.jopt-simple:jopt-simple:5.0.2 -| | +--- com.carrotsearch:hppc:0.7.1 -| | +--- joda-time:joda-time:2.9.5 -| | +--- org.yaml:snakeyaml:1.15 -| | +--- com.fasterxml.jackson.core:jackson-core:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.6 -| | +--- com.tdunning:t-digest:3.0 -| | +--- org.hdrhistogram:HdrHistogram:2.1.9 -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | +--- org.apache.logging.log4j:log4j-1.2-api:2.8.2 -| | \--- org.elasticsearch:jna:4.4.0-1 -| +--- com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.5.2 -| +--- junit:junit:4.12 -| +--- org.hamcrest:hamcrest-all:1.3 -| +--- org.apache.lucene:lucene-test-framework:7.0.0-snapshot-ad2cb77 -| +--- org.apache.lucene:lucene-codecs:7.0.0-snapshot-ad2cb77 -| +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest -| | +--- org.apache.httpcomponents:httpclient:4.5.2 -| | +--- org.apache.httpcomponents:httpcore:4.4.5 -| | +--- org.apache.httpcomponents:httpasyncclient:4.1.2 -| | +--- org.apache.httpcomponents:httpcore-nio:4.4.5 -| | +--- commons-codec:commons-codec:1.10 -| | \--- commons-logging:commons-logging:1.1.3 -| +--- org.apache.httpcomponents:httpclient:4.5.2 -| +--- org.apache.httpcomponents:httpcore:4.4.5 -| +--- commons-logging:commons-logging:1.1.3 -| +--- commons-codec:commons-codec:1.10 -| +--- org.elasticsearch:securemock:1.2 -| \--- org.elasticsearch:mocksocket:1.2 -+--- project :x-pack-elasticsearch:transport-client -| +--- org.elasticsearch.plugin:x-pack-api:6.0.0-alpha3-SNAPSHOT -> project :x-pack-elasticsearch:plugin -| | +--- project :modules:transport-netty4 -| | | +--- io.netty:netty-buffer:4.1.11.Final -| | | +--- io.netty:netty-codec:4.1.11.Final -| | | +--- io.netty:netty-codec-http:4.1.11.Final -| | | +--- io.netty:netty-common:4.1.11.Final -| | | +--- io.netty:netty-handler:4.1.11.Final -| | | +--- io.netty:netty-resolver:4.1.11.Final -| | | +--- io.netty:netty-transport:4.1.11.Final -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | +--- com.unboundid:unboundid-ldapsdk:3.2.0 -| | +--- org.bouncycastle:bcprov-jdk15on:1.55 -| | +--- org.bouncycastle:bcpkix-jdk15on:1.55 -| | +--- com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239 -| | +--- com.google.guava:guava:18.0 -| | +--- com.sun.mail:javax.mail:1.5.6 -| | +--- javax.activation:activation:1.1.1 -| | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | +--- org.elasticsearch.client:sniffer:6.0.0-alpha3-SNAPSHOT -> project :client:sniffer -| | | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | | +--- org.apache.httpcomponents:httpclient:4.5.2 -| | | +--- org.apache.httpcomponents:httpcore:4.4.5 -| | | +--- commons-codec:commons-codec:1.10 -| | | +--- commons-logging:commons-logging:1.1.3 -| | | \--- com.fasterxml.jackson.core:jackson-core:2.8.6 -| | +--- net.sf.supercsv:super-csv:2.4.0 -| | +--- project :x-pack-elasticsearch:sql:server -| | | +--- project :x-pack-elasticsearch:sql:jdbc-proto -| | | +--- project :x-pack-elasticsearch:sql:cli-proto -| | | \--- org.antlr:antlr4-runtime:4.5.1-1 -| | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | +--- org.elasticsearch:jna:4.4.0-1 -| | +--- org.elasticsearch.test:framework:6.0.0-alpha3-SNAPSHOT -> project :test:framework (*) -| | +--- com.google.jimfs:jimfs:1.1 -| | +--- org.subethamail:subethasmtp:3.1.7 -| | +--- com.google.code.findbugs:jsr305:3.0.1 -| | +--- org.ini4j:ini4j:0.5.2 -| | +--- org.elasticsearch:securemock:1.2 -| | +--- org.elasticsearch:mocksocket:1.2 -| | +--- org.slf4j:slf4j-log4j12:1.6.2 -| | +--- org.slf4j:slf4j-api:1.6.2 -| | +--- project :modules:reindex -| | | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | +--- project :modules:parent-join -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | \--- project :modules:analysis-common -| | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | \--- org.elasticsearch:jna:4.4.0-1 -| \--- org.elasticsearch.client:transport:6.0.0-alpha3-SNAPSHOT -> project :client:transport -| +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| +--- org.elasticsearch.plugin:transport-netty4-client:6.0.0-alpha3-SNAPSHOT -> project :modules:transport-netty4 (*) -| +--- org.elasticsearch.plugin:reindex-client:6.0.0-alpha3-SNAPSHOT -> project :modules:reindex (*) -| +--- org.elasticsearch.plugin:lang-mustache-client:6.0.0-alpha3-SNAPSHOT -> project :modules:lang-mustache -| | \--- com.github.spullara.mustache.java:compiler:0.9.3 -| +--- org.elasticsearch.plugin:percolator-client:6.0.0-alpha3-SNAPSHOT -> project :modules:percolator -| \--- org.elasticsearch.plugin:parent-join-client:6.0.0-alpha3-SNAPSHOT -> project :modules:parent-join (*) -+--- project :x-pack-elasticsearch:plugin (*) -+--- project :x-pack-elasticsearch:sql:test-utils -| +--- org.elasticsearch.client:transport:6.0.0-alpha3-SNAPSHOT -> project :client:transport (*) -| +--- junit:junit:4.12 -| \--- org.hamcrest:hamcrest-all:1.3 -\--- project :modules:lang-painless - +--- org.antlr:antlr4-runtime:4.5.1-1 - +--- org.ow2.asm:asm-debug-all:5.1 - +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) - +--- org.locationtech.spatial4j:spatial4j:0.6 - +--- com.vividsolutions:jts:1.13 - +--- org.apache.logging.log4j:log4j-api:2.8.2 - +--- org.apache.logging.log4j:log4j-core:2.8.2 - \--- org.elasticsearch:jna:4.4.0-1 - -testCompileOnly - Compile dependencies for source set 'test'. -+--- org.jline:jline:3.3.1 -+--- project :x-pack-elasticsearch:sql:net-client -+--- project :x-pack-elasticsearch:sql:cli-proto -+--- org.elasticsearch.test:framework:6.0.0-alpha3-SNAPSHOT -> project :test:framework -| +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core -| | +--- org.apache.lucene:lucene-core:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-analyzers-common:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-backward-codecs:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-grouping:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-highlighter:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-join:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-memory:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-misc:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-queries:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-queryparser:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-sandbox:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial-extras:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial3d:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-suggest:7.0.0-snapshot-ad2cb77 -| | +--- org.elasticsearch:securesm:1.1 -| | +--- net.sf.jopt-simple:jopt-simple:5.0.2 -| | +--- com.carrotsearch:hppc:0.7.1 -| | +--- joda-time:joda-time:2.9.5 -| | +--- org.yaml:snakeyaml:1.15 -| | +--- com.fasterxml.jackson.core:jackson-core:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.6 -| | +--- com.tdunning:t-digest:3.0 -| | +--- org.hdrhistogram:HdrHistogram:2.1.9 -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | +--- org.apache.logging.log4j:log4j-1.2-api:2.8.2 -| | \--- org.elasticsearch:jna:4.4.0-1 -| +--- com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.5.2 -| +--- junit:junit:4.12 -| +--- org.hamcrest:hamcrest-all:1.3 -| +--- org.apache.lucene:lucene-test-framework:7.0.0-snapshot-ad2cb77 -| +--- org.apache.lucene:lucene-codecs:7.0.0-snapshot-ad2cb77 -| +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest -| | +--- org.apache.httpcomponents:httpclient:4.5.2 -| | +--- org.apache.httpcomponents:httpcore:4.4.5 -| | +--- org.apache.httpcomponents:httpasyncclient:4.1.2 -| | +--- org.apache.httpcomponents:httpcore-nio:4.4.5 -| | +--- commons-codec:commons-codec:1.10 -| | \--- commons-logging:commons-logging:1.1.3 -| +--- org.apache.httpcomponents:httpclient:4.5.2 -| +--- org.apache.httpcomponents:httpcore:4.4.5 -| +--- commons-logging:commons-logging:1.1.3 -| +--- commons-codec:commons-codec:1.10 -| +--- org.elasticsearch:securemock:1.2 -| \--- org.elasticsearch:mocksocket:1.2 -+--- project :x-pack-elasticsearch:transport-client -| +--- org.elasticsearch.plugin:x-pack-api:6.0.0-alpha3-SNAPSHOT -> project :x-pack-elasticsearch:plugin -| | +--- project :modules:transport-netty4 -| | | +--- io.netty:netty-buffer:4.1.11.Final -| | | +--- io.netty:netty-codec:4.1.11.Final -| | | +--- io.netty:netty-codec-http:4.1.11.Final -| | | +--- io.netty:netty-common:4.1.11.Final -| | | +--- io.netty:netty-handler:4.1.11.Final -| | | +--- io.netty:netty-resolver:4.1.11.Final -| | | +--- io.netty:netty-transport:4.1.11.Final -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | +--- com.unboundid:unboundid-ldapsdk:3.2.0 -| | +--- org.bouncycastle:bcprov-jdk15on:1.55 -| | +--- org.bouncycastle:bcpkix-jdk15on:1.55 -| | +--- com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239 -| | +--- com.google.guava:guava:18.0 -| | +--- com.sun.mail:javax.mail:1.5.6 -| | +--- javax.activation:activation:1.1.1 -| | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | +--- org.elasticsearch.client:sniffer:6.0.0-alpha3-SNAPSHOT -> project :client:sniffer -| | | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | | +--- org.apache.httpcomponents:httpclient:4.5.2 -| | | +--- org.apache.httpcomponents:httpcore:4.4.5 -| | | +--- commons-codec:commons-codec:1.10 -| | | +--- commons-logging:commons-logging:1.1.3 -| | | \--- com.fasterxml.jackson.core:jackson-core:2.8.6 -| | +--- net.sf.supercsv:super-csv:2.4.0 -| | +--- project :x-pack-elasticsearch:sql:server -| | | +--- project :x-pack-elasticsearch:sql:jdbc-proto -| | | +--- project :x-pack-elasticsearch:sql:cli-proto -| | | \--- org.antlr:antlr4-runtime:4.5.1-1 -| | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | +--- org.elasticsearch:jna:4.4.0-1 -| | +--- org.elasticsearch.test:framework:6.0.0-alpha3-SNAPSHOT -> project :test:framework (*) -| | +--- com.google.jimfs:jimfs:1.1 -| | +--- org.subethamail:subethasmtp:3.1.7 -| | +--- com.google.code.findbugs:jsr305:3.0.1 -| | +--- org.ini4j:ini4j:0.5.2 -| | +--- org.elasticsearch:securemock:1.2 -| | +--- org.elasticsearch:mocksocket:1.2 -| | +--- org.slf4j:slf4j-log4j12:1.6.2 -| | +--- org.slf4j:slf4j-api:1.6.2 -| | +--- project :modules:reindex -| | | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | +--- project :modules:parent-join -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | \--- project :modules:analysis-common -| | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | \--- org.elasticsearch:jna:4.4.0-1 -| \--- org.elasticsearch.client:transport:6.0.0-alpha3-SNAPSHOT -> project :client:transport -| +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| +--- org.elasticsearch.plugin:transport-netty4-client:6.0.0-alpha3-SNAPSHOT -> project :modules:transport-netty4 (*) -| +--- org.elasticsearch.plugin:reindex-client:6.0.0-alpha3-SNAPSHOT -> project :modules:reindex (*) -| +--- org.elasticsearch.plugin:lang-mustache-client:6.0.0-alpha3-SNAPSHOT -> project :modules:lang-mustache -| | \--- com.github.spullara.mustache.java:compiler:0.9.3 -| +--- org.elasticsearch.plugin:percolator-client:6.0.0-alpha3-SNAPSHOT -> project :modules:percolator -| \--- org.elasticsearch.plugin:parent-join-client:6.0.0-alpha3-SNAPSHOT -> project :modules:parent-join (*) -+--- project :x-pack-elasticsearch:plugin (*) -+--- project :x-pack-elasticsearch:sql:test-utils -| +--- org.elasticsearch.client:transport:6.0.0-alpha3-SNAPSHOT -> project :client:transport (*) -| +--- junit:junit:4.12 -| \--- org.hamcrest:hamcrest-all:1.3 -\--- project :modules:lang-painless - +--- org.antlr:antlr4-runtime:4.5.1-1 - +--- org.ow2.asm:asm-debug-all:5.1 - +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) - +--- org.locationtech.spatial4j:spatial4j:0.6 - +--- com.vividsolutions:jts:1.13 - +--- org.apache.logging.log4j:log4j-api:2.8.2 - +--- org.apache.logging.log4j:log4j-core:2.8.2 - \--- org.elasticsearch:jna:4.4.0-1 - -testRuntime - Runtime dependencies for source set 'test'. -+--- org.jline:jline:3.3.1 -+--- project :x-pack-elasticsearch:sql:net-client -+--- project :x-pack-elasticsearch:sql:cli-proto -+--- org.fusesource.jansi:jansi:1.16 -+--- org.elasticsearch:jna:4.4.0-1 -+--- org.elasticsearch.test:framework:6.0.0-alpha3-SNAPSHOT -> project :test:framework -| +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core -| | +--- org.apache.lucene:lucene-core:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-analyzers-common:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-backward-codecs:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-grouping:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-highlighter:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-join:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-memory:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-misc:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-queries:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-queryparser:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-sandbox:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial-extras:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-spatial3d:7.0.0-snapshot-ad2cb77 -| | +--- org.apache.lucene:lucene-suggest:7.0.0-snapshot-ad2cb77 -| | +--- org.elasticsearch:securesm:1.1 -| | +--- net.sf.jopt-simple:jopt-simple:5.0.2 -| | +--- com.carrotsearch:hppc:0.7.1 -| | +--- joda-time:joda-time:2.9.5 -| | +--- org.yaml:snakeyaml:1.15 -| | +--- com.fasterxml.jackson.core:jackson-core:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.8.6 -| | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.8.6 -| | +--- com.tdunning:t-digest:3.0 -| | +--- org.hdrhistogram:HdrHistogram:2.1.9 -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | +--- org.apache.logging.log4j:log4j-1.2-api:2.8.2 -| | \--- org.elasticsearch:jna:4.4.0-1 -| +--- com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.5.2 -| +--- junit:junit:4.12 -| +--- org.hamcrest:hamcrest-all:1.3 -| +--- org.apache.lucene:lucene-test-framework:7.0.0-snapshot-ad2cb77 -| +--- org.apache.lucene:lucene-codecs:7.0.0-snapshot-ad2cb77 -| +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest -| | +--- org.apache.httpcomponents:httpclient:4.5.2 -| | +--- org.apache.httpcomponents:httpcore:4.4.5 -| | +--- org.apache.httpcomponents:httpasyncclient:4.1.2 -| | +--- org.apache.httpcomponents:httpcore-nio:4.4.5 -| | +--- commons-codec:commons-codec:1.10 -| | \--- commons-logging:commons-logging:1.1.3 -| +--- org.apache.httpcomponents:httpclient:4.5.2 -| +--- org.apache.httpcomponents:httpcore:4.4.5 -| +--- commons-logging:commons-logging:1.1.3 -| +--- commons-codec:commons-codec:1.10 -| +--- org.elasticsearch:securemock:1.2 -| \--- org.elasticsearch:mocksocket:1.2 -+--- project :x-pack-elasticsearch:transport-client -| +--- org.elasticsearch.plugin:x-pack-api:6.0.0-alpha3-SNAPSHOT -> project :x-pack-elasticsearch:plugin -| | +--- project :modules:transport-netty4 -| | | +--- io.netty:netty-buffer:4.1.11.Final -| | | +--- io.netty:netty-codec:4.1.11.Final -| | | +--- io.netty:netty-codec-http:4.1.11.Final -| | | +--- io.netty:netty-common:4.1.11.Final -| | | +--- io.netty:netty-handler:4.1.11.Final -| | | +--- io.netty:netty-resolver:4.1.11.Final -| | | +--- io.netty:netty-transport:4.1.11.Final -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | +--- com.unboundid:unboundid-ldapsdk:3.2.0 -| | +--- org.bouncycastle:bcprov-jdk15on:1.55 -| | +--- org.bouncycastle:bcpkix-jdk15on:1.55 -| | +--- com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239 -| | +--- com.google.guava:guava:18.0 -| | +--- com.sun.mail:javax.mail:1.5.6 -| | +--- javax.activation:activation:1.1.1 -| | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | +--- org.elasticsearch.client:sniffer:6.0.0-alpha3-SNAPSHOT -> project :client:sniffer -| | | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | | +--- org.apache.httpcomponents:httpclient:4.5.2 -| | | +--- org.apache.httpcomponents:httpcore:4.4.5 -| | | +--- commons-codec:commons-codec:1.10 -| | | +--- commons-logging:commons-logging:1.1.3 -| | | \--- com.fasterxml.jackson.core:jackson-core:2.8.6 -| | +--- net.sf.supercsv:super-csv:2.4.0 -| | +--- project :x-pack-elasticsearch:sql:server -| | | +--- project :x-pack-elasticsearch:sql:jdbc-proto -| | | +--- project :x-pack-elasticsearch:sql:cli-proto -| | | \--- org.antlr:antlr4-runtime:4.5.1-1 -| | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | +--- org.elasticsearch:jna:4.4.0-1 -| | +--- org.elasticsearch.test:framework:6.0.0-alpha3-SNAPSHOT -> project :test:framework (*) -| | +--- com.google.jimfs:jimfs:1.1 -| | +--- org.subethamail:subethasmtp:3.1.7 -| | +--- com.google.code.findbugs:jsr305:3.0.1 -| | +--- org.ini4j:ini4j:0.5.2 -| | +--- org.elasticsearch:securemock:1.2 -| | +--- org.elasticsearch:mocksocket:1.2 -| | +--- org.slf4j:slf4j-log4j12:1.6.2 -| | +--- org.slf4j:slf4j-api:1.6.2 -| | +--- project :modules:reindex -| | | +--- org.elasticsearch.client:rest:6.0.0-alpha3-SNAPSHOT -> project :client:rest (*) -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | +--- project :modules:parent-join -| | | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | | +--- com.vividsolutions:jts:1.13 -| | | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | | \--- org.elasticsearch:jna:4.4.0-1 -| | \--- project :modules:analysis-common -| | +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| | +--- org.locationtech.spatial4j:spatial4j:0.6 -| | +--- com.vividsolutions:jts:1.13 -| | +--- org.apache.logging.log4j:log4j-api:2.8.2 -| | +--- org.apache.logging.log4j:log4j-core:2.8.2 -| | \--- org.elasticsearch:jna:4.4.0-1 -| \--- org.elasticsearch.client:transport:6.0.0-alpha3-SNAPSHOT -> project :client:transport -| +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) -| +--- org.elasticsearch.plugin:transport-netty4-client:6.0.0-alpha3-SNAPSHOT -> project :modules:transport-netty4 (*) -| +--- org.elasticsearch.plugin:reindex-client:6.0.0-alpha3-SNAPSHOT -> project :modules:reindex (*) -| +--- org.elasticsearch.plugin:lang-mustache-client:6.0.0-alpha3-SNAPSHOT -> project :modules:lang-mustache -| | \--- com.github.spullara.mustache.java:compiler:0.9.3 -| +--- org.elasticsearch.plugin:percolator-client:6.0.0-alpha3-SNAPSHOT -> project :modules:percolator -| \--- org.elasticsearch.plugin:parent-join-client:6.0.0-alpha3-SNAPSHOT -> project :modules:parent-join (*) -+--- project :x-pack-elasticsearch:plugin (*) -+--- project :x-pack-elasticsearch:sql:test-utils -| +--- org.elasticsearch.client:transport:6.0.0-alpha3-SNAPSHOT -> project :client:transport (*) -| +--- junit:junit:4.12 -| \--- org.hamcrest:hamcrest-all:1.3 -\--- project :modules:lang-painless - +--- org.antlr:antlr4-runtime:4.5.1-1 - +--- org.ow2.asm:asm-debug-all:5.1 - +--- org.elasticsearch:elasticsearch:6.0.0-alpha3-SNAPSHOT -> project :core (*) - +--- org.locationtech.spatial4j:spatial4j:0.6 - +--- com.vividsolutions:jts:1.13 - +--- org.apache.logging.log4j:log4j-api:2.8.2 - +--- org.apache.logging.log4j:log4j-core:2.8.2 - \--- org.elasticsearch:jna:4.4.0-1 - -(*) - dependencies omitted (listed previously) - -BUILD SUCCESSFUL - -Total time: 21.622 secs diff --git a/sql/jdbc-proto/build.gradle b/sql/jdbc-proto/build.gradle index 3cfa7a795d8..e1386d39036 100644 --- a/sql/jdbc-proto/build.gradle +++ b/sql/jdbc-proto/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'elasticsearch.build' description = 'Request and response objects shared by the jdbc driver and ' + - 'its backend in :x-pack-elasticsearch:plugin' + 'its backend in :sql:server' dependencies { testCompile project(':x-pack-elasticsearch:sql:test-utils') diff --git a/sql/jdbc-proto/src/test/java/org/elasticsearch/xpack/sql/jdbc/net/protocol/QueryInitRequestTests.java b/sql/jdbc-proto/src/test/java/org/elasticsearch/xpack/sql/jdbc/net/protocol/QueryInitRequestTests.java index 2a5f5555fba..06530c78878 100644 --- a/sql/jdbc-proto/src/test/java/org/elasticsearch/xpack/sql/jdbc/net/protocol/QueryInitRequestTests.java +++ b/sql/jdbc-proto/src/test/java/org/elasticsearch/xpack/sql/jdbc/net/protocol/QueryInitRequestTests.java @@ -18,8 +18,6 @@ public class QueryInitRequestTests extends ESTestCase { } public void testRoundTrip() throws IOException { - TimeoutInfo example = new TimeoutInfo(randomNonNegativeLong(), randomNonNegativeLong(), randomNonNegativeLong()); - assertRoundTrip(example, TimeoutInfo::encode, TimeoutInfo::new); + assertRoundTrip(randomQueryInitRequest(), QueryInitRequest::encode, in -> (QueryInitRequest) ProtoUtils.readRequest(in)); } - } diff --git a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/cli/server/CliServer.java b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/cli/server/CliServer.java index 7fc74ee8c59..95e3acb44d2 100644 --- a/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/cli/server/CliServer.java +++ b/sql/server/src/main/java/org/elasticsearch/xpack/sql/plugin/cli/server/CliServer.java @@ -60,7 +60,7 @@ public class CliServer { } public void command(CommandRequest req, ActionListener listener) { - final long start = System.currentTimeMillis(); + final long start = System.currentTimeMillis(); // NOCOMMIT should be nanoTime or else clock skew will skew us // TODO support non-utc for cli server executor.sql(req.command, TimeZone.getTimeZone("UTC"), wrap( diff --git a/sql/test-utils/build.gradle b/sql/test-utils/build.gradle index ca1f583213c..80e3b5e1fbf 100644 --- a/sql/test-utils/build.gradle +++ b/sql/test-utils/build.gradle @@ -8,6 +8,18 @@ dependencies { compile "org.hamcrest:hamcrest-all:${versions.hamcrest}" } +thirdPartyAudit.excludes = [ + // Referneced by the test:framework but not used + 'org.apache.tools.ant.BuildException', + 'org.apache.tools.ant.DirectoryScanner', + 'org.apache.tools.ant.Task', + 'org.apache.tools.ant.types.FileSet', + 'org.easymock.EasyMock', + 'org.easymock.IArgumentMatcher', + 'org.jmock.core.Constraint', +] + + /* Elasticsearch traditionally disables this for test utilities because it is * hard to configure and (hopefully) much less important for tests than * production code. */ @@ -25,7 +37,7 @@ eclipse { } } } -forbiddenApisTest { +forbiddenApisMain { bundledSignatures -= 'jdk-non-portable' bundledSignatures += 'jdk-internal' } diff --git a/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/RoundTripTestUtils.java b/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/RoundTripTestUtils.java index 9fc54a466be..9fab1e6b826 100644 --- a/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/RoundTripTestUtils.java +++ b/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/RoundTripTestUtils.java @@ -41,7 +41,9 @@ public abstract class RoundTripTestUtils { try (ByteArrayOutputStream out = new ByteArrayOutputStream()) { encode.accept(example, new DataOutputStream(out)); try (InputStream in = new ByteArrayInputStream(out.toByteArray())) { - return decode.apply(new DataInputStream(in)); + T decoded = decode.apply(new DataInputStream(in)); + assertEquals("should have emptied the stream", 0, in.available()); + return decoded; } } } diff --git a/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/IOFunction.java b/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/IOFunction.java deleted file mode 100644 index af53cef839c..00000000000 --- a/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/IOFunction.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ -package org.elasticsearch.xpack.sql.test.server; - -import java.io.IOException; - -public interface IOFunction { - - R apply(T t) throws IOException; -} diff --git a/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHandler.java b/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHandler.java index af85b6ae89a..73213d58b50 100644 --- a/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHandler.java +++ b/sql/test-utils/src/main/java/org/elasticsearch/xpack/sql/test/server/ProtoHandler.java @@ -12,6 +12,7 @@ import org.apache.logging.log4j.Logger; import org.elasticsearch.action.admin.cluster.node.info.NodeInfo; import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse; import org.elasticsearch.client.Client; +import org.elasticsearch.common.CheckedFunction; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.logging.ESLoggerFactory; import org.elasticsearch.common.unit.TimeValue; @@ -23,14 +24,15 @@ import java.io.IOException; public abstract class ProtoHandler implements HttpHandler, AutoCloseable { - protected final static Logger log = ESLoggerFactory.getLogger(ProtoHandler.class.getName()); + protected static final Logger log = ESLoggerFactory.getLogger(ProtoHandler.class.getName()); private final TimeValue TV = TimeValue.timeValueSeconds(5); protected final NodeInfo info; protected final String clusterName; - private final IOFunction headerReader; - private final IOFunction toProto; + private final CheckedFunction headerReader; + private final CheckedFunction toProto; - protected ProtoHandler(Client client, IOFunction headerReader, IOFunction toProto) { + protected ProtoHandler(Client client, CheckedFunction headerReader, + CheckedFunction toProto) { NodesInfoResponse niResponse = client.admin().cluster().prepareNodesInfo("_local").clear().get(TV); info = niResponse.getNodes().get(0); clusterName = niResponse.getClusterName().value(); diff --git a/sql/test-utils/src/test/java/org/elasticsearch/xpack/sql/test/RoundTripTestUtilsTests.java b/sql/test-utils/src/test/java/org/elasticsearch/xpack/sql/test/RoundTripTestUtilsTests.java new file mode 100644 index 00000000000..08c8bad918a --- /dev/null +++ b/sql/test-utils/src/test/java/org/elasticsearch/xpack/sql/test/RoundTripTestUtilsTests.java @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License; + * you may not use this file except in compliance with the Elastic License. + */ +package org.elasticsearch.xpack.sql.test; + +import org.elasticsearch.test.ESTestCase; + +import java.io.DataInput; +import java.io.IOException; + +import static org.elasticsearch.xpack.sql.test.RoundTripTestUtils.assertRoundTrip; +import static org.hamcrest.Matchers.startsWith; + +public class RoundTripTestUtilsTests extends ESTestCase { + public void testAssertRoundTrip() throws IOException { + // Should pass + assertRoundTrip(randomAlphaOfLength(5), (str, out) -> out.writeUTF(str), DataInput::readUTF); + + // Should fail because we have trailing stuff + AssertionError e = expectThrows(AssertionError.class, () -> assertRoundTrip(randomAlphaOfLength(5), (str, out) -> { + out.writeUTF(str); + out.writeInt(randomInt()); + }, DataInput::readUTF)); + assertEquals("should have emptied the stream expected:<0> but was:<4>", e.getMessage()); + + // Should fail because we read the wrong string + e = expectThrows(AssertionError.class, () -> assertRoundTrip(randomAlphaOfLength(5), + (str, out) -> out.writeUTF(str), in -> in.readUTF() + "wrong")); + assertThat(e.getMessage(), startsWith("expected:<")); + } +}