You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2021/10/13 16:51:08 UTC

[GitHub] [drill] rymarm opened a new pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

rymarm opened a new pull request #2333:
URL: https://github.com/apache/drill/pull/2333


   # [DRILL-8009](https://issues.apache.org/jira/browse/DRILL-8009): DrillConnectionImpl#isValid() doesn't correspond JDBC API
   
   ## Description
   
   I've add ping function which send message with [RpcMode.PING](http://drill.apache.org/apidocs/org/apache/drill/exec/proto/GeneralRPCProtos.RpcMode.html#PING) to drillbit and after that waits for a response message with [RpcMode.PONG](drill.apache.org/apidocs/org/apache/drill/exec/proto/GeneralRPCProtos.RpcMode.html#PONG). This method is used to validate connection. I add this verification to [DrillConnectionImpl#isValid(int timeout)](https://github.com/apache/drill/blob/5f5ae89392471d237605c0b5e1a337e5bc0e10ff/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java#L522) as it is required by JDBC API [documentation](https://docs.oracle.com/en/java/javase/11/docs/api/java.sql/java/sql/Connection.html#isValid(int)) and gives opportunity accurately validate connection:
   
   >  The driver shall submit a query on the connection or use some other mechanism that positively verifies the connection is still valid when this method is called
   
   Also, I've add to [DrillConnectionImpl#isValid(int timeout)](https://github.com/apache/drill/blob/5f5ae89392471d237605c0b5e1a337e5bc0e10ff/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java#L522) simple check for [channel#isActive()](https://netty.io/4.1/api/io/netty/channel/Channel.html#isActive--).
   
   [Previously, in Drill](https://github.com/apache/drill/commit/960f876a1945eee4eeb0d6a98c5c58dfe2eea1a9) were add `PING` and `PONG` RpcMode's, but they was primarily used for "hearbeat" function — to let drillbit know, that connection with client is still alive and now I also used it for client verification of connection to drillbit.
   
   I've used listener pattern for checking whether client got `PONG` answer or not. If you think, that this realization is not best, I have ideas how it can be implemented in other, more "netty's" way.
   
   ## Documentation
   No doc impact
   
   ## Testing
   Manual tests with cases:
   * server (drillbit) closes connection
   * server (drillbit) shut down
   * server (drillbit) process has been killed
   * client (jdbc) lost network connection
   * client (jdbc) temporary lost connection and restored it until JDBC's ping timeout has been elapsed. 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-975385292


   @luocooong Hello! Can someone take a look at this PR? I pinged @paul-rogers but seems he is busy, it has passed 18 days since my remind. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-945625343


   @luocooong Hello! My build for this change fails with:
   ```
   TestPStoreProviders.verifyZkStore:65 » NoSuchElement
   ```
   But, this change does not come anywhere near ZK or persistent storage.
   
   I've tried to run this test locally and it passed:
   <details>
   <summary><b>TestPStoreProviders test result</b></summary>
   
   ```
   maksym@home-pc:~/dev/private-drill$ mvn test -V -Dtest=org.apache.drill.exec.store.sys.TestPStoreProviders -pl exec/java-exec
   Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
   Maven home: /home/maksym/.sdkman/candidates/maven/current
   Java version: 11.0.9, vendor: Oracle Corporation, runtime: /home/maksym/.sdkman/candidates/java/11.0.9.open-adpt
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "5.11.0-37-generic", arch: "amd64", family: "unix"
   [INFO] Scanning for projects...
   [INFO] ------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] ------------------------------------------------------------------------
   [INFO] os.detected.name: linux
   [INFO] os.detected.arch: x86_64
   [INFO] os.detected.version: 5.11
   [INFO] os.detected.version.major: 5
   [INFO] os.detected.version.minor: 11
   [INFO] os.detected.release: ubuntu
   [INFO] os.detected.release.version: 20.04
   [INFO] os.detected.release.like.ubuntu: true
   [INFO] os.detected.release.like.debian: true
   [INFO] os.detected.classifier: linux-x86_64
   ....
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.drill.exec.store.sys.TestPStoreProviders
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.93 s - in org.apache.drill.exec.store.sys.TestPStoreProviders
   [INFO] 
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
   [INFO] 
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  15.564 s
   [INFO] Finished at: 2021-10-18T12:47:08+03:00
   [INFO] ------------------------------------------------------------------------
   ```
   </details>
   
   As along with JDBC tests:
   <details>
   <summary><b>JDBC tests result</b></summary>
   
   ```
   maksym@home-pc:~/dev/private-drill$ mvn test -V -Dtest=org.apache.drill.exec.store.sys.TestPStoreProviders -pl exec/java-exec
   Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
   Maven home: /home/maksym/.sdkman/candidates/maven/current
   Java version: 11.0.9, vendor: Oracle Corporation, runtime: /home/maksym/.sdkman/candidates/java/11.0.9.open-adpt
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "5.11.0-37-generic", arch: "amd64", family: "unix"
   [INFO] Scanning for projects...
   [INFO] ------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] ------------------------------------------------------------------------
   [INFO] os.detected.name: linux
   [INFO] os.detected.arch: x86_64
   [INFO] os.detected.version: 5.11
   [INFO] os.detected.version.major: 5
   [INFO] os.detected.version.minor: 11
   [INFO] os.detected.release: ubuntu
   [INFO] os.detected.release.version: 20.04
   [INFO] os.detected.release.like.ubuntu: true
   [INFO] os.detected.release.like.debian: true
   [INFO] os.detected.classifier: linux-x86_64
   [INFO] 
   [INFO] ---------------< org.apache.drill.exec:drill-java-exec >----------------
   [INFO] Building Drill : Exec : Java Execution Engine 1.20.0-SNAPSHOT
   [INFO] --------------------------------[ jar ]---------------------------------
   [INFO] 
   [INFO] --- apache-rat-plugin:0.13:check (rat-checks) @ drill-java-exec ---
   [INFO] RAT will not execute since it is configured to be skipped via system property 'rat.skip'.
   [INFO] 
   [INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven-version) @ drill-java-exec ---
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:copy-resources (default) @ drill-java-exec ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Copying 1 resource
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:copy-resources (copy-fmpp-resources) @ drill-java-exec ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Copying 101 resources
   [INFO] 
   [INFO] --- maven-dependency-plugin:3.1.1:unpack (unpack-parser-template) @ drill-java-exec ---
   [INFO] Configured Artifact: com.github.vvysotskyi.drill-calcite:calcite-core:?:jar
   [INFO] Unpacking /home/maksym/.m2/repository/com/github/vvysotskyi/drill-calcite/calcite-core/1.21.0-drill-r4/calcite-core-1.21.0-drill-r4.jar to /home/maksym/dev/private-drill/exec/java-exec/target with includes "codegen/templates/Parser.jj" and excludes ""
   [INFO] 
   [INFO] --- maven-dependency-plugin:3.1.1:unpack (unpack-vector-types) @ drill-java-exec ---
   [INFO] Configured Artifact: org.apache.drill.exec:vector:?:jar
   [INFO] Unpacking /home/maksym/.m2/repository/org/apache/drill/exec/vector/1.20.0-SNAPSHOT/vector-1.20.0-SNAPSHOT.jar to /home/maksym/dev/private-drill/exec/java-exec/target with includes "codegen/data/ValueVectorTypes.tdd" and excludes ""
   [INFO] 
   [INFO] --- drill-fmpp-maven-plugin:1.20.0-SNAPSHOT:generate (generate-fmpp) @ drill-java-exec ---
   [INFO] Freemarker generation:
    scope: compile,
    config: /home/maksym/dev/private-drill/exec/java-exec/target/codegen/config.fmpp,
    templates: /home/maksym/dev/private-drill/exec/java-exec/target/codegen/templates
   [INFO] Adding maven data loader
   ...........................................................................
   [INFO] Freemarker generation took 532ms
   [INFO] Incremental output update took 0ms
   [INFO] new: 0
   [INFO] changed: 0
   maksym@home-pc:~/dev/private-drill$ sdk install maven 3.8.3^C
   maksym@home-pc:~/dev/private-drill$ cler-exec
   
   Command 'cler' not found, did you mean:
   
     command 'cleo' from deb cleo (0.004-2)
     command 'cver' from deb gplcver (2.12a-1.1build1)
     command 'clex' from deb clex (4.6.patch8-1)
     command 'clear' from deb ncurses-bin (6.2-0ubuntu2)
   
   Try: sudo apt install <deb name>
   
   maksym@home-pc:~/dev/private-drill$ clear
   maksym@home-pc:~/dev/private-drill$ mvn test -V -pl exec/jdbc 
   Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
   Maven home: /home/maksym/.sdkman/candidates/maven/current
   Java version: 11.0.9, vendor: Oracle Corporation, runtime: /home/maksym/.sdkman/candidates/java/11.0.9.open-adpt
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "5.11.0-37-generic", arch: "amd64", family: "unix"
   [INFO] Scanning for projects...
   [INFO] ------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] ------------------------------------------------------------------------
   [INFO] os.detected.name: linux
   [INFO] os.detected.arch: x86_64
   [INFO] os.detected.version: 5.11
   [INFO] os.detected.version.major: 5
   [INFO] os.detected.version.minor: 11
   [INFO] os.detected.release: ubuntu
   [INFO] os.detected.release.version: 20.04
   [INFO] os.detected.release.like.ubuntu: true
   [INFO] os.detected.release.like.debian: true
   [INFO] os.detected.classifier: linux-x86_64
   [INFO] 
   [INFO] ------------------< org.apache.drill.exec:drill-jdbc >------------------
   [INFO] Building Drill : Exec : JDBC Driver using dependencies 1.20.0-SNAPSHOT
   [INFO] --------------------------------[ jar ]---------------------------------
   [INFO] 
   [INFO] --- apache-rat-plugin:0.13:check (rat-checks) @ drill-jdbc ---
   [INFO] RAT will not execute since it is configured to be skipped via system property 'rat.skip'.
   [INFO] 
   [INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven-version) @ drill-jdbc ---
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:copy-resources (default) @ drill-jdbc ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Copying 1 resource
   [INFO] 
   [INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) @ drill-jdbc ---
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ drill-jdbc ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Copying 2 resources
   [INFO] Copying 3 resources
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ drill-jdbc ---
   [INFO] Compiling 2 source files to /home/maksym/dev/private-drill/exec/jdbc/target/classes
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ drill-jdbc ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Copying 10 resources
   [INFO] Copying 3 resources
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ drill-jdbc ---
   [INFO] Nothing to compile - all classes are up to date
   [INFO] 
   [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ drill-jdbc ---
   [INFO] 
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.drill.jdbc.DrillResultSetTest
   [INFO] Running org.apache.drill.jdbc.ResultSetMetaDataTest
   [ERROR] WARNING: An illegal reflective access operation has occurred
   [ERROR] WARNING: Illegal reflective access by javassist.util.proxy.SecurityActions (file:/home/maksym/.m2/repository/org/javassist/javassist/3.27.0-GA/javassist-3.27.0-GA.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
   [ERROR] WARNING: Please consider reporting this to the maintainers of javassist.util.proxy.SecurityActions
   [ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
   [ERROR] WARNING: All illegal access operations will be denied in a future release
   [ERROR] WARNING: An illegal reflective access operation has occurred
   [ERROR] WARNING: Illegal reflective access by javassist.util.proxy.SecurityActions (file:/home/maksym/.m2/repository/org/javassist/javassist/3.27.0-GA/javassist-3.27.0-GA.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
   [ERROR] WARNING: Please consider reporting this to the maintainers of javassist.util.proxy.SecurityActions
   [ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
   [ERROR] WARNING: All illegal access operations will be denied in a future release
   [WARNING] Tests run: 5, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 5.35 s - in org.apache.drill.jdbc.DrillResultSetTest
   [INFO] Running org.apache.drill.jdbc.ConnectionTransactionMethodsTest
   [WARNING] Tests run: 96, Failures: 0, Errors: 0, Skipped: 23, Time elapsed: 5.432 s - in org.apache.drill.jdbc.ResultSetMetaDataTest
   [INFO] Running org.apache.drill.jdbc.proxy.TracingProxyDriverTest
   [INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.463 s - in org.apache.drill.jdbc.ConnectionTransactionMethodsTest
   [INFO] Running org.apache.drill.jdbc.proxy.TracingProxyDriverClassLoadingTest
   [WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.001 s - in org.apache.drill.jdbc.proxy.TracingProxyDriverClassLoadingTest
   [INFO] Running org.apache.drill.jdbc.ResultSetGetMethodConversionsTest
   TRACER: SETUP: Proxy driver class org.apache.drill.jdbc.proxy.TracingProxyDriver initializing.
   TRACER: SETUP: Abbreviating (unique) class names in packages java.lang, java.sql, java.util, javax.sql, javax.sql.rowset, javax.sql.rowset.serial, javax.sql.rowset.spi.
   TRACER: SETUP: Proxy driver registering with DriverManager.
   TRACER: SETUP: Proxy's acceptsURL(...) called with "jdbc:proxy:org.apache.drill.jdbc.Driver:jdbc:drill:zk=local".
   TRACER: SETUP: Proxy calling DriverManager.getDriver(...) for proxied URL "jdbc:drill:zk=local".
   TRACER: SETUP: DriverManager.getDriver( "jdbc:drill:zk=local" ) returned a(n) org.apache.drill.jdbc.Driver: org.apache.drill.jdbc.Driver@54275b5d.
   TRACER: SETUP: Proxy's acceptsURL( "jdbc:proxy:org.apache.drill.jdbc.Driver:jdbc:drill:zk=local" ) returning true.
   TRACER: SETUP: Proxy's connect(...) called with URL "jdbc:proxy::jdbc:drill:zk=local".
   TRACER: SETUP: Proxy calling DriverManager.getDriver(...) for proxied URL "jdbc:drill:zk=local".
   TRACER: SETUP: DriverManager.getDriver( "jdbc:drill:zk=local" ) returned a(n) org.apache.drill.jdbc.Driver: org.apache.drill.jdbc.Driver@54275b5d.
   TRACER: CALL:   ((Driver) <id=1> ...) . connect( (String) "jdbc:drill:zk=local", (Properties) <id=2> {} )
   TRACER: RETURN: ((Driver) <id=1> ...) . connect( (String) "jdbc:drill:zk=local", (Properties) <id=2> {} ), RESULT: (Connection) <id=3> ...
   TRACER: CALL:   ((Connection) <id=3> ...) . createStatement()
   TRACER: RETURN: ((Connection) <id=3> ...) . createStatement(), RESULT: (Statement) <id=4> ...
   TRACER: CALL:   ((Statement) <id=4> ...) . executeQuery( (String) "SELECT * FROM INFORMATION_SCHEMA.CATALOGS" )
   TRACER: RETURN: ((Statement) <id=4> ...) . executeQuery( (String) "SELECT * FROM INFORMATION_SCHEMA.CATALOGS" ), RESULT: (ResultSet) <id=5> ...
   TRACER: CALL:   ((ResultSet) <id=5> ...) . next()
   TRACER: RETURN: ((ResultSet) <id=5> ...) . next(), RESULT: (boolean) true
   TRACER: CALL:   ((ResultSet) <id=5> ...) . getString( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=5> ...) . getString( (int) 1 ), RESULT: (String) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=5> ...) . getObject( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=5> ...) . getObject( (int) 1 ), RESULT: (Object) "DRILL"
   TRACER: CALL:   ((Statement) <id=4> ...) . close()
   TRACER: RETURN: ((Statement) <id=4> ...) . close(), RESULT: (none--void) 
   TRACER: CALL:   ((Connection) <id=3> ...) . createStatement()
   TRACER: RETURN: ((Connection) <id=3> ...) . createStatement(), RESULT: (Statement) <id=6> ...
   TRACER: CALL:   ((Statement) <id=6> ...) . close()
   TRACER: RETURN: ((Statement) <id=6> ...) . close(), RESULT: (none--void) 
   TRACER: CALL:   ((Driver) <id=1> ...) . getMajorVersion()
   TRACER: RETURN: ((Driver) <id=1> ...) . getMajorVersion(), RESULT: (int) 1
   TRACER: CALL:   ((Driver) <id=1> ...) . getMinorVersion()
   TRACER: RETURN: ((Driver) <id=1> ...) . getMinorVersion(), RESULT: (int) 20
   TRACER: CALL:   ((Driver) <id=1> ...) . jdbcCompliant()
   TRACER: RETURN: ((Driver) <id=1> ...) . jdbcCompliant(), RESULT: (boolean) false
   TRACER: CALL:   ((Driver) <id=1> ...) . getParentLogger()
   TRACER: WARNING: Unnoted type encountered in formatting (value might not render well): class java.util.logging.LogManager$RootLogger.
   TRACER: RETURN: ((Driver) <id=1> ...) . getParentLogger(), RESULT: (java.util.logging.Logger) (java.util.logging.LogManager$RootLogger) <id=7> java.util.logging.LogManager$RootLogger@6d0dbfca
   TRACER: CALL:   ((Driver) <id=1> ...) . getPropertyInfo( (String) "jdbc:proxy::jdbc:drill:zk=local", (Properties) <id=8> {} )
   TRACER: RETURN: ((Driver) <id=1> ...) . getPropertyInfo( (String) "jdbc:proxy::jdbc:drill:zk=local", (Properties) <id=8> {} ), RESULT: (DriverPropertyInfo[]) <id=9> { [ name = "FACTORY", value = null, required = false, choices = null, description = null ], [ name = "SCHEMA", value = null, required = false, choices = null, description = null ], [ name = "TIME_ZONE", value = null, required = false, choices = null, description = null ], [ name = "URL", value = null, required = false, choices = null, description = null ], [ name = "SERIALIZATION", value = null, required = false, choices = null, description = null ], [ name = "AUTHENTICATION", value = null, required = false, choices = null, description = null ], [ name = "AVATICA_USER", value = null, required = false, choices = null, description = null ], [ name = "AVATICA_PASSWORD", value = null, required = false, choices = null, description = null ], [ name = "HTTP_CLIENT_FACTORY", value = null, required = false, choices = null, desc
 ription = null ], [ name = "HTTP_CLIENT_IMPL", value = null, required = false, choices = null, description = null ], [ name = "PRINCIPAL", value = null, required = false, choices = null, description = null ], [ name = "KEYTAB", value = null, required = false, choices = null, description = null ], [ name = "TRUSTSTORE", value = null, required = false, choices = null, description = null ], [ name = "TRUSTSTORE_PASSWORD", value = null, required = false, choices = null, description = null ], [ name = "KEYSTORE", value = null, required = false, choices = null, description = null ], [ name = "KEYSTORE_PASSWORD", value = null, required = false, choices = null, description = null ], [ name = "KEY_PASSWORD", value = null, required = false, choices = null, description = null ], [ name = "HOSTNAME_VERIFICATION", value = null, required = false, choices = null, description = null ] }
   TRACER: CALL:   ((Connection) <id=3> ...) . getMetaData()
   TRACER: RETURN: ((Connection) <id=3> ...) . getMetaData(), RESULT: (DatabaseMetaData) <id=10> ...
   TRACER: CALL:   ((DatabaseMetaData) <id=10> ...) . getConnection()
   TRACER: RETURN: ((DatabaseMetaData) <id=10> ...) . getConnection(), RESULT: (Connection) <id=3> ...
   TRACER: CALL:   ((DatabaseMetaData) <id=10> ...) . allTablesAreSelectable()
   TRACER: RETURN: ((DatabaseMetaData) <id=10> ...) . allTablesAreSelectable(), RESULT: (boolean) false
   TRACER: CALL:   ((DatabaseMetaData) <id=10> ...) . ownUpdatesAreVisible( (int) 1003 )
   TRACER: THROW:  ((DatabaseMetaData) <id=10> ...) . ownUpdatesAreVisible( (int) 1003 ), threw: (SQLFeatureNotSupportedException) "java.sql.SQLFeatureNotSupportedException: ownUpdatesAreVisible(int) is not supported" ==> (RuntimeException) "java.lang.RuntimeException: todo: implement this method"
   TRACER: CALL:   ((DatabaseMetaData) <id=10> ...) . getCatalogs()
   TRACER: RETURN: ((DatabaseMetaData) <id=10> ...) . getCatalogs(), RESULT: (ResultSet) <id=11> ...
   TRACER: CALL:   ((ResultSet) <id=11> ...) . next()
   TRACER: RETURN: ((ResultSet) <id=11> ...) . next(), RESULT: (boolean) true
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getString( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getString( (int) 1 ), RESULT: (String) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getObject( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getObject( (int) 1 ), RESULT: (Object) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getMetaData()
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getMetaData(), RESULT: (ResultSetMetaData) <id=12> ...
   TRACER: CALL:   ((ResultSetMetaData) <id=12> ...) . getColumnCount()
   TRACER: RETURN: ((ResultSetMetaData) <id=12> ...) . getColumnCount(), RESULT: (int) 1
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getObject( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getObject( (int) 1 ), RESULT: (Object) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getString( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getString( (int) 1 ), RESULT: (String) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getInt( (int) 1 )
   TRACER: THROW:  ((ResultSet) <id=11> ...) . getInt( (int) 1 ), threw: (SQLDataException) "java.sql.SQLDataException: cannot convert to long (org.apache.calcite.avatica.util.AbstractCursor$StringAccessor@61cdb5a4)"
   TRACER: CALL:   ((Connection) <id=3> ...) . getMetaData()
   TRACER: RETURN: ((Connection) <id=3> ...) . getMetaData(), RESULT: (DatabaseMetaData) <id=10> ...
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getMetaData()
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getMetaData(), RESULT: (ResultSetMetaData) <id=12> ...
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.816 s - in org.apache.drill.jdbc.proxy.TracingProxyDriverTest
   [INFO] Running org.apache.drill.jdbc.PreparedStatementMaxRowsTest
   [WARNING] Tests run: 75, Failures: 0, Errors: 0, Skipped: 28, Time elapsed: 1.192 s - in org.apache.drill.jdbc.ResultSetGetMethodConversionsTest
   [INFO] Running org.apache.drill.jdbc.LegacyDatabaseMetaDataGetColumnsTest
   [WARNING] Tests run: 9, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 2.102 s - in org.apache.drill.jdbc.PreparedStatementMaxRowsTest
   [INFO] Running org.apache.drill.jdbc.DatabaseMetaDataGetColumnsTest
   [WARNING] Tests run: 389, Failures: 0, Errors: 0, Skipped: 79, Time elapsed: 2.054 s - in org.apache.drill.jdbc.DatabaseMetaDataGetColumnsTest
   [INFO] Running org.apache.drill.jdbc.StatementTest
   [WARNING] Tests run: 389, Failures: 0, Errors: 0, Skipped: 79, Time elapsed: 9.571 s - in org.apache.drill.jdbc.LegacyDatabaseMetaDataGetColumnsTest
   [INFO] Running org.apache.drill.jdbc.DrillColumnMetaDataListTest
   [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.905 s - in org.apache.drill.jdbc.DrillColumnMetaDataListTest
   [INFO] Running org.apache.drill.jdbc.ConnectionTest
   [WARNING] Tests run: 25, Failures: 0, Errors: 0, Skipped: 9, Time elapsed: 0.771 s - in org.apache.drill.jdbc.ConnectionTest
   [INFO] Running org.apache.drill.jdbc.impl.TypeConvertingSqlAccessorTest
   [INFO] Tests run: 43, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 s - in org.apache.drill.jdbc.impl.TypeConvertingSqlAccessorTest
   [INFO] Running org.apache.drill.jdbc.test.TestAggregateFunctionsQuery
   [WARNING] Tests run: 5, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 1.66 s - in org.apache.drill.jdbc.test.TestAggregateFunctionsQuery
   [INFO] Running org.apache.drill.jdbc.test.TestJdbcMetadata
   [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.552 s - in org.apache.drill.jdbc.test.TestJdbcMetadata
   [INFO] Running org.apache.drill.jdbc.test.TestLegacyJdbcMetadata
   [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 10.89 s - in org.apache.drill.jdbc.StatementTest
   [INFO] Running org.apache.drill.jdbc.test.JdbcNullOrderingAndGroupingTest
   [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 2.975 s - in org.apache.drill.jdbc.test.TestLegacyJdbcMetadata
   [INFO] Running org.apache.drill.jdbc.test.TestBugFixes
   [WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.539 s - in org.apache.drill.jdbc.test.TestBugFixes
   [INFO] Running org.apache.drill.jdbc.test.Bug1735ConnectionCloseTest
   [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.852 s - in org.apache.drill.jdbc.test.Bug1735ConnectionCloseTest
   [INFO] Running org.apache.drill.jdbc.test.Bug1735ResultSetCloseReleasesBuffersTest
   [WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.447 s - in org.apache.drill.jdbc.test.Bug1735ResultSetCloseReleasesBuffersTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest
   java.lang.NullPointerException
           at java.base/java.util.Objects.requireNonNull(Objects.java:221)
           at org.apache.calcite.avatica.Meta$MetaResultSet.create(Meta.java:577)
           at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1136)
           at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1143)
           at org.apache.calcite.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:548)
           at org.apache.calcite.avatica.AvaticaPreparedStatement.executeLargeUpdate(AvaticaPreparedStatement.java:152)
           at org.apache.calcite.avatica.AvaticaPreparedStatement.executeUpdate(AvaticaPreparedStatement.java:147)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest$NoNonSqlExceptionsChecker.testOneMethod(Drill2769UnsupportedReportsUseSqlExceptionTest.java:242)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest$NoNonSqlExceptionsChecker.testMethods(Drill2769UnsupportedReportsUseSqlExceptionTest.java:308)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest.testPreparedStatementMethodsThrowRight(Drill2769UnsupportedReportsUseSqlExceptionTest.java:423)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
           at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
           at mockit.integration.junit4.JUnit4TestRunnerDecorator.executeTestMethod(JUnit4TestRunnerDecorator.java:157)
           at mockit.integration.junit4.JUnit4TestRunnerDecorator.invokeExplosively(JUnit4TestRunnerDecorator.java:71)
           at mockit.integration.junit4.FakeFrameworkMethod.invokeExplosively(FakeFrameworkMethod.java:29)
           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java)
           at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
           at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
           at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
           at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at java.base/java.lang.Thread.run(Thread.java:834)
   java.lang.NullPointerException
           at java.base/java.util.Objects.requireNonNull(Objects.java:221)
           at org.apache.calcite.avatica.Meta$MetaResultSet.create(Meta.java:577)
           at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1136)
           at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1143)
           at org.apache.calcite.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:548)
           at org.apache.calcite.avatica.AvaticaPreparedStatement.executeLargeUpdate(AvaticaPreparedStatement.java:152)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest$NoNonSqlExceptionsChecker.testOneMethod(Drill2769UnsupportedReportsUseSqlExceptionTest.java:242)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest$NoNonSqlExceptionsChecker.testMethods(Drill2769UnsupportedReportsUseSqlExceptionTest.java:308)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest.testPreparedStatementMethodsThrowRight(Drill2769UnsupportedReportsUseSqlExceptionTest.java:423)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
           at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
           at mockit.integration.junit4.JUnit4TestRunnerDecorator.executeTestMethod(JUnit4TestRunnerDecorator.java:157)
           at mockit.integration.junit4.JUnit4TestRunnerDecorator.invokeExplosively(JUnit4TestRunnerDecorator.java:71)
           at mockit.integration.junit4.FakeFrameworkMethod.invokeExplosively(FakeFrameworkMethod.java:29)
           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java)
           at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
           at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
           at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
           at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at java.base/java.lang.Thread.run(Thread.java:834)
   [WARNING] Tests run: 7, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 2.681 s - in org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2461IntervalsBreakInfoSchemaBugTest
   [WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.595 s - in org.apache.drill.jdbc.test.Drill2461IntervalsBreakInfoSchemaBugTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2489CallsAfterCloseThrowExceptionsTest
   [WARNING] Tests run: 17, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.667 s - in org.apache.drill.jdbc.test.Drill2489CallsAfterCloseThrowExceptionsTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2463GetNullsFailedWithAssertionsBugTest
   [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.556 s - in org.apache.drill.jdbc.test.Drill2463GetNullsFailedWithAssertionsBugTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2130JavaJdbcHamcrestConfigurationTest
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s - in org.apache.drill.jdbc.test.Drill2130JavaJdbcHamcrestConfigurationTest
   [INFO] Running org.apache.drill.jdbc.test.TestExecutionExceptionsToClient
   [WARNING] Tests run: 9, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.524 s - in org.apache.drill.jdbc.test.TestExecutionExceptionsToClient
   [INFO] Running org.apache.drill.jdbc.test.TestJdbcQuery
   [WARNING] Tests run: 91, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 10.045 s - in org.apache.drill.jdbc.test.JdbcNullOrderingAndGroupingTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2439GetBooleanFailsSayingWrongTypeBugTest
   [WARNING] Tests run: 4, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.471 s - in org.apache.drill.jdbc.test.Drill2439GetBooleanFailsSayingWrongTypeBugTest
   [INFO] Running org.apache.drill.jdbc.test.TestJdbcDistQuery
   [WARNING] Tests run: 18, Failures: 0, Errors: 0, Skipped: 5, Time elapsed: 2.722 s - in org.apache.drill.jdbc.test.TestJdbcDistQuery
   [INFO] Running org.apache.drill.jdbc.test.TestInformationSchemaColumns
   [WARNING] Tests run: 38, Failures: 0, Errors: 0, Skipped: 7, Time elapsed: 5.311 s - in org.apache.drill.jdbc.test.TestJdbcQuery
   [INFO] Running org.apache.drill.jdbc.test.Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest
   [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.441 s - in org.apache.drill.jdbc.test.Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2288GetColumnsMetadataWhenNoRowsTest
   [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.746 s - in org.apache.drill.jdbc.test.Drill2288GetColumnsMetadataWhenNoRowsTest
   [INFO] Running org.apache.drill.jdbc.ConnectionInfoTest
   [WARNING] Tests run: 384, Failures: 0, Errors: 0, Skipped: 93, Time elapsed: 2.975 s - in org.apache.drill.jdbc.test.TestInformationSchemaColumns
   [INFO] Running org.apache.drill.jdbc.PreparedStatementTest
   [WARNING] Tests run: 6, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 1.287 s - in org.apache.drill.jdbc.ConnectionInfoTest
   [INFO] Running org.apache.drill.jdbc.DatabaseMetaDataTest
   [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.178 s - in org.apache.drill.jdbc.DatabaseMetaDataTest
   [INFO] Running org.apache.drill.jdbc.LegacyDatabaseMetaDataTest
   [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.171 s - in org.apache.drill.jdbc.LegacyDatabaseMetaDataTest
   [INFO] Running org.apache.drill.jdbc.DriverTest
   [WARNING] Tests run: 38, Failures: 0, Errors: 0, Skipped: 23, Time elapsed: 0.432 s - in org.apache.drill.jdbc.DriverTest
   [INFO] Running org.apache.drill.jdbc.LegacyPreparedStatementTest
   [WARNING] Tests run: 4, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.427 s - in org.apache.drill.jdbc.LegacyPreparedStatementTest
   [INFO] Running org.apache.drill.jdbc.StatementMaxRowsTest
   [WARNING] Tests run: 9, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.841 s - in org.apache.drill.jdbc.StatementMaxRowsTest
   [WARNING] Tests run: 13, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 5.001 s - in org.apache.drill.jdbc.PreparedStatementTest
   [INFO] 
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 1812, Failures: 0, Errors: 0, Skipped: 370
   [INFO] 
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  48.828 s
   [INFO] Finished at: 2021-10-18T13:15:23+03:00
   [INFO] ------------------------------------------------------------------------
   ```
   </details>
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-948429459


   @luocooong could you, please, review my fix? Now it passes all verifications.
   
   I've found the root cause why the test was failing - the reason was that in my previous revision, method `DrillConnectionImpl#isValid` could close a connection if `DrillClient#ping` return `false` (what means, that connection is not valid, drillbit doesn't answer), and the test was written so, that every method of `Connection` is tested on the same connection, and if some of the methods close connection all farther methods will get a closed connection.
   
   As the test uses "dummy values" to invoke methods, `DrillClient#ping` is invoked with 0 timeout, which leads to unpredictable situations, when on some machines `DrillClient#ping` returns `false`, because the timeout is 0 and the method checks whether PONG answer was received without a wait.
   
   I've revised my fix and decided, that `DrillConnectionImpl#isValid` shouldn't close a connection, even if it was found, that the connection is not valid - a method should do only one thing and only what is expected from it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
luocooong commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-944885199


   @rymarm Hello. Could you please do a rebase on the master branch ?
   We just submitted a quick fix patch for the maven build.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on a change in pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on a change in pull request #2333:
URL: https://github.com/apache/drill/pull/2333#discussion_r734568806



##########
File path: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java
##########
@@ -520,8 +520,12 @@ public SQLXML createSQLXML() throws SQLException {
 
   @Override
   public boolean isValid(int timeout) throws SQLException {
-    checkOpen();
-    return super.isValid(timeout);
+    if (timeout < 0) {

Review comment:
       We could be nicer, but there are [requirements](https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#isValid-int-) of JDBC interface:  
   
   > https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#isValid-int-




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on a change in pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on a change in pull request #2333:
URL: https://github.com/apache/drill/pull/2333#discussion_r734579504



##########
File path: exec/rpc/src/main/java/org/apache/drill/exec/rpc/BasicClient.java
##########
@@ -121,7 +123,8 @@ protected void initChannel(SocketChannel ch) throws Exception {
               pipe.addLast(RpcConstants.IDLE_STATE_HANDLER, pingHandler);
             }
 
-            pipe.addLast(RpcConstants.MESSAGE_HANDLER, new InboundHandler(connection));
+            messageHandler = new InboundHandler(connection);
+            pipe.addLast(RpcConstants.MESSAGE_HANDLER, messageHandler);

Review comment:
       No, I've added it to make `messageHandler` accessible in `BasicClient` to use it inside `BasicClient#ping` for [listener subscribing](https://github.com/apache/drill/blob/66f3fdebe0a7d8d79052d55968a76301bf5cd673/exec/rpc/src/main/java/org/apache/drill/exec/rpc/BasicClient.java#L341):
   ```
     public boolean ping(int timeout) throws DrillRuntimeException {
       connection.getChannel()
               .writeAndFlush(PING_MESSAGE);
       PongListener pongListener = new PongListener();
       messageHandler.subscribeForPongMessage(pongListener);
   
       return pongListener.pongIsReceived(timeout);
     }
   ```
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on a change in pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on a change in pull request #2333:
URL: https://github.com/apache/drill/pull/2333#discussion_r734660997



##########
File path: exec/rpc/src/main/java/org/apache/drill/exec/rpc/PongListener.java
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.rpc;
+
+import org.apache.drill.common.exceptions.DrillRuntimeException;
+import org.apache.drill.shaded.guava.com.google.common.base.Stopwatch;
+
+import java.util.EventListener;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * PongListener realizes the listener pattern. It is used to verify, whether {@link org.apache.drill.exec.rpc.RpcBus.InboundHandler}
+ * received {@link InboundRpcMessage} with {@link org.apache.drill.exec.proto.GeneralRPCProtos.RpcMode#PONG PONG} mode.
+ */
+public class PongListener implements EventListener {

Review comment:
       > Suppose someone uses the new JDBC client with an older server that does not support this new handler. What happens?   
   
   My implementation doesn't break backward compatible because Drill's RPC already handles the ping/pong protocol. My changes only impact the client's behavior. Earlier, RPC [did nothing](https://github.com/apache/drill/blob/0c9451e6720e5028e1187067cc6d1957ff998bef/exec/rpc/src/main/java/org/apache/drill/exec/rpc/RpcBus.java#L321) on PONG answer, but I [add logic](https://github.com/apache/drill/blob/66f3fdebe0a7d8d79052d55968a76301bf5cd673/exec/rpc/src/main/java/org/apache/drill/exec/rpc/RpcBus.java#L323) to notify all who would like to be notified about PONG message (like our [listener](https://github.com/apache/drill/blob/66f3fdebe0a7d8d79052d55968a76301bf5cd673/exec/rpc/src/main/java/org/apache/drill/exec/rpc/BasicClient.java#L341)).   
   
   > At some point we talked about having a protocol version number in the "hello" message. If that exists, you can check if the server is new enough to handle this message, else skip the active ping from the client.   
   
   As I said before, even the previous version of the protocol can handle this message.   
   
   > ...doesn't Drill's RPC already handle the ping/pong protocol? Can we reuse that: just trigger a ping on demand rather than waiting for the next scheduled event?   
   
   Actually, it does. But it was [implemented](https://github.com/apache/drill/blob/66f3fdebe0a7d8d79052d55968a76301bf5cd673/exec/rpc/src/main/java/org/apache/drill/exec/rpc/BasicClient.java#L196) via netty's idle handler so it can't be called on-demand. 
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
luocooong commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-945662754


   @rymarm Thanks for the feedback. I will check it on the local and let you know.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong merged pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
luocooong merged pull request #2333:
URL: https://github.com/apache/drill/pull/2333


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
luocooong commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-943226470


   @rymarm Thanks for the contribution. Could you please check all the unit test of drill-jdbc module are successful ?
   See also [Github CI / Main Build (8)](https://github.com/apache/drill/runs/3889315894?check_suite_focus=true)
   ```
   Error:  Failures: 
   Error:    Drill2489CallsAfterCloseThrowExceptionsTest.testClosedConnectionMethodsThrowRight:459 Already-closed exception error(s):
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] paul-rogers commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
paul-rogers commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-976017727


   @rymarm & @luocooong sorry, I've been off on other stuff. Before I did into the code again, I'd like to check one thing. Suppose I build the new JDBC driver with this fix. Suppose I run it with a previously-released Drill that does not have the server-side fixes? Will it work? Or, does this JDBC driver require a matching server?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-949763798


   Thank @paul-rogers for your review! I've answered for all of your comment and I'm working on resolving [this one](https://github.com/apache/drill/pull/2333/files/66f3fdebe0a7d8d79052d55968a76301bf5cd673#r734235957).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] paul-rogers commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
paul-rogers commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-949869843


   @rymarm, thanks for the detailed explanations! I wonder, in addition to your other work, can you fix up the missing functionality in the current heartbeat implementation? Seems silly for us to send heartbeats, but ignore the results. That way, for Drill versions older than the one with your server-side fix, we'd know `isValid()` within the last 15 seconds, which seems pretty good.
   
   Also, can your new work simply use the existing ping mechanism so we don't have to change the server? That would eliminate the RPC versioning issues.
   
   I look forward to your remaining fix, then I'll give the code another review. Ping me when you're ready. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] paul-rogers commented on a change in pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
paul-rogers commented on a change in pull request #2333:
URL: https://github.com/apache/drill/pull/2333#discussion_r734233567



##########
File path: exec/rpc/src/main/java/org/apache/drill/exec/rpc/BasicClient.java
##########
@@ -121,7 +123,8 @@ protected void initChannel(SocketChannel ch) throws Exception {
               pipe.addLast(RpcConstants.IDLE_STATE_HANDLER, pingHandler);
             }
 
-            pipe.addLast(RpcConstants.MESSAGE_HANDLER, new InboundHandler(connection));
+            messageHandler = new InboundHandler(connection);
+            pipe.addLast(RpcConstants.MESSAGE_HANDLER, messageHandler);

Review comment:
       Left over debugging code?

##########
File path: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillConnectionImpl.java
##########
@@ -520,8 +520,12 @@ public SQLXML createSQLXML() throws SQLException {
 
   @Override
   public boolean isValid(int timeout) throws SQLException {
-    checkOpen();
-    return super.isValid(timeout);
+    if (timeout < 0) {

Review comment:
       We can be nicer: if the timeout is <0, just set it to 0.

##########
File path: exec/rpc/src/main/java/org/apache/drill/exec/rpc/BasicClient.java
##########
@@ -324,6 +327,22 @@ public void setAutoRead(boolean enableAutoRead) {
     connection.setAutoRead(enableAutoRead);
   }
 
+  /**
+   * Send {@link RpcMode#PING PING} message and waits for {@link RpcMode#PONG PONG} answer to verify connection.
+   *
+   * @param timeout time in seconds to wait message receiving. Should be higher than 0
+   * @return true if {@link RpcMode#PONG PONG} received until timeout, false otherwise
+   * @throws DrillRuntimeException if the value supplied for timeout is less than 0
+   */
+  public boolean ping(int timeout) throws DrillRuntimeException {

Review comment:
       Always nice to put the units in the variable name: `timeoutSec` or `timeoutMs`.

##########
File path: exec/rpc/src/main/java/org/apache/drill/exec/rpc/PongListener.java
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.rpc;
+
+import org.apache.drill.common.exceptions.DrillRuntimeException;
+import org.apache.drill.shaded.guava.com.google.common.base.Stopwatch;
+
+import java.util.EventListener;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * PongListener realizes the listener pattern. It is used to verify, whether {@link org.apache.drill.exec.rpc.RpcBus.InboundHandler}
+ * received {@link InboundRpcMessage} with {@link org.apache.drill.exec.proto.GeneralRPCProtos.RpcMode#PONG PONG} mode.
+ */
+public class PongListener implements EventListener {

Review comment:
       Also, this change modifies the Drillbit RPC. Historically, the JDBC client tried to be backward and forward compatible. Suppose someone uses the new JDBC client with an older server that does not support this new handler. What happens?
   
   At some point we talked about having a protocol version number in the "hello" message. If that exists, you can check if the server is new enough to handle this message, else skip the active ping from the client (unless you can find a way to use the existing mechanism so the RPC protocol does not change.)

##########
File path: exec/rpc/src/main/java/org/apache/drill/exec/rpc/PongListener.java
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.rpc;
+
+import org.apache.drill.common.exceptions.DrillRuntimeException;
+import org.apache.drill.shaded.guava.com.google.common.base.Stopwatch;
+
+import java.util.EventListener;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * PongListener realizes the listener pattern. It is used to verify, whether {@link org.apache.drill.exec.rpc.RpcBus.InboundHandler}
+ * received {@link InboundRpcMessage} with {@link org.apache.drill.exec.proto.GeneralRPCProtos.RpcMode#PONG PONG} mode.
+ */
+public class PongListener implements EventListener {
+  private boolean hasReceivedPong = false;
+
+  /**
+   * Verify whether received {@link org.apache.drill.exec.proto.GeneralRPCProtos.RpcMode#PONG PONG} mode.
+   *
+   * @param timeout time in seconds to wait message receiving. Should be higher than 0
+   * @return true if message is received until timeout, false otherwise
+   * @throws DrillRuntimeException if the value supplied for timeout is less than 0
+   */
+  public boolean pongIsReceived(int timeout) throws DrillRuntimeException {
+    if (timeout < 0) {
+      throw new DrillRuntimeException(String.format("Invalid timeout (%d<0).", timeout));
+    }
+
+    Stopwatch stopwatch = Stopwatch.createStarted();
+    while (!hasReceivedPong) {

Review comment:
       This will spin the CPU at 100%. We need a sleep between checks.
   
   Also, looks like we're polling a boolean set in another thread. In this use case, it might be OK if we miss an update or two.
   
   But, a better solution is to use a semaphore so that this thread blocks, up to a timeout, waiting for the semaphore to be set. Check out the Java concurrency package to find a good candidate.

##########
File path: exec/rpc/src/main/java/org/apache/drill/exec/rpc/PongListener.java
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.rpc;
+
+import org.apache.drill.common.exceptions.DrillRuntimeException;
+import org.apache.drill.shaded.guava.com.google.common.base.Stopwatch;
+
+import java.util.EventListener;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * PongListener realizes the listener pattern. It is used to verify, whether {@link org.apache.drill.exec.rpc.RpcBus.InboundHandler}
+ * received {@link InboundRpcMessage} with {@link org.apache.drill.exec.proto.GeneralRPCProtos.RpcMode#PONG PONG} mode.
+ */
+public class PongListener implements EventListener {

Review comment:
       General question here: doesn't Drill's RPC already handle the ping/pong protocol? Can we reuse that: just trigger a ping on demand rather than waiting for the next scheduled event?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm edited a comment on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm edited a comment on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-945625343


   @luocooong Hello! My build for this change fails with:
   ```
   TestPStoreProviders.verifyZkStore:65 » NoSuchElement
   ```
   But, this change does not come anywhere near ZK or persistent storage.
   
   I've tried to run this test locally and it passed:
   <details>
   <summary><b>TestPStoreProviders test result</b></summary>
   
   ```
   maksym@home-pc:~/dev/private-drill$ mvn test -V -Dtest=org.apache.drill.exec.store.sys.TestPStoreProviders -pl exec/java-exec
   Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
   Maven home: /home/maksym/.sdkman/candidates/maven/current
   Java version: 11.0.9, vendor: Oracle Corporation, runtime: /home/maksym/.sdkman/candidates/java/11.0.9.open-adpt
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "5.11.0-37-generic", arch: "amd64", family: "unix"
   [INFO] Scanning for projects...
   [INFO] ------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] ------------------------------------------------------------------------
   [INFO] os.detected.name: linux
   [INFO] os.detected.arch: x86_64
   [INFO] os.detected.version: 5.11
   [INFO] os.detected.version.major: 5
   [INFO] os.detected.version.minor: 11
   [INFO] os.detected.release: ubuntu
   [INFO] os.detected.release.version: 20.04
   [INFO] os.detected.release.like.ubuntu: true
   [INFO] os.detected.release.like.debian: true
   [INFO] os.detected.classifier: linux-x86_64
   ....
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.drill.exec.store.sys.TestPStoreProviders
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.93 s - in org.apache.drill.exec.store.sys.TestPStoreProviders
   [INFO] 
   [INFO] Results:
   [INFO] 
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
   [INFO] 
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  15.564 s
   [INFO] Finished at: 2021-10-18T12:47:08+03:00
   [INFO] ------------------------------------------------------------------------
   ```
   </details>
   
   As along with JDBC tests:
   <details>
   <summary><b>JDBC tests result</b></summary>
   
   ```
   maksym@home-pc:~/dev/private-drill$ mvn test -V -pl exec/jdbc 
   Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
   Maven home: /home/maksym/.sdkman/candidates/maven/current
   Java version: 11.0.9, vendor: Oracle Corporation, runtime: /home/maksym/.sdkman/candidates/java/11.0.9.open-adpt
   Default locale: en_US, platform encoding: UTF-8
   OS name: "linux", version: "5.11.0-37-generic", arch: "amd64", family: "unix"
   [INFO] Scanning for projects...
   [INFO] ------------------------------------------------------------------------
   [INFO] Detecting the operating system and CPU architecture
   [INFO] ------------------------------------------------------------------------
   [INFO] os.detected.name: linux
   [INFO] os.detected.arch: x86_64
   [INFO] os.detected.version: 5.11
   [INFO] os.detected.version.major: 5
   [INFO] os.detected.version.minor: 11
   [INFO] os.detected.release: ubuntu
   [INFO] os.detected.release.version: 20.04
   [INFO] os.detected.release.like.ubuntu: true
   [INFO] os.detected.release.like.debian: true
   [INFO] os.detected.classifier: linux-x86_64
   [INFO] 
   [INFO] ------------------< org.apache.drill.exec:drill-jdbc >------------------
   [INFO] Building Drill : Exec : JDBC Driver using dependencies 1.20.0-SNAPSHOT
   [INFO] --------------------------------[ jar ]---------------------------------
   [INFO] 
   [INFO] --- apache-rat-plugin:0.13:check (rat-checks) @ drill-jdbc ---
   [INFO] RAT will not execute since it is configured to be skipped via system property 'rat.skip'.
   [INFO] 
   [INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven-version) @ drill-jdbc ---
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:copy-resources (default) @ drill-jdbc ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Copying 1 resource
   [INFO] 
   [INFO] --- maven-remote-resources-plugin:1.5:process (process-resource-bundles) @ drill-jdbc ---
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ drill-jdbc ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Copying 2 resources
   [INFO] Copying 3 resources
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ drill-jdbc ---
   [INFO] Compiling 2 source files to /home/maksym/dev/private-drill/exec/jdbc/target/classes
   [INFO] 
   [INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ drill-jdbc ---
   [INFO] Using 'UTF-8' encoding to copy filtered resources.
   [INFO] Copying 10 resources
   [INFO] Copying 3 resources
   [INFO] 
   [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ drill-jdbc ---
   [INFO] Nothing to compile - all classes are up to date
   [INFO] 
   [INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ drill-jdbc ---
   [INFO] 
   [INFO] -------------------------------------------------------
   [INFO]  T E S T S
   [INFO] -------------------------------------------------------
   [INFO] Running org.apache.drill.jdbc.DrillResultSetTest
   [INFO] Running org.apache.drill.jdbc.ResultSetMetaDataTest
   [ERROR] WARNING: An illegal reflective access operation has occurred
   [ERROR] WARNING: Illegal reflective access by javassist.util.proxy.SecurityActions (file:/home/maksym/.m2/repository/org/javassist/javassist/3.27.0-GA/javassist-3.27.0-GA.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
   [ERROR] WARNING: Please consider reporting this to the maintainers of javassist.util.proxy.SecurityActions
   [ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
   [ERROR] WARNING: All illegal access operations will be denied in a future release
   [ERROR] WARNING: An illegal reflective access operation has occurred
   [ERROR] WARNING: Illegal reflective access by javassist.util.proxy.SecurityActions (file:/home/maksym/.m2/repository/org/javassist/javassist/3.27.0-GA/javassist-3.27.0-GA.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
   [ERROR] WARNING: Please consider reporting this to the maintainers of javassist.util.proxy.SecurityActions
   [ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
   [ERROR] WARNING: All illegal access operations will be denied in a future release
   [WARNING] Tests run: 5, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 5.35 s - in org.apache.drill.jdbc.DrillResultSetTest
   [INFO] Running org.apache.drill.jdbc.ConnectionTransactionMethodsTest
   [WARNING] Tests run: 96, Failures: 0, Errors: 0, Skipped: 23, Time elapsed: 5.432 s - in org.apache.drill.jdbc.ResultSetMetaDataTest
   [INFO] Running org.apache.drill.jdbc.proxy.TracingProxyDriverTest
   [INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.463 s - in org.apache.drill.jdbc.ConnectionTransactionMethodsTest
   [INFO] Running org.apache.drill.jdbc.proxy.TracingProxyDriverClassLoadingTest
   [WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.001 s - in org.apache.drill.jdbc.proxy.TracingProxyDriverClassLoadingTest
   [INFO] Running org.apache.drill.jdbc.ResultSetGetMethodConversionsTest
   TRACER: SETUP: Proxy driver class org.apache.drill.jdbc.proxy.TracingProxyDriver initializing.
   TRACER: SETUP: Abbreviating (unique) class names in packages java.lang, java.sql, java.util, javax.sql, javax.sql.rowset, javax.sql.rowset.serial, javax.sql.rowset.spi.
   TRACER: SETUP: Proxy driver registering with DriverManager.
   TRACER: SETUP: Proxy's acceptsURL(...) called with "jdbc:proxy:org.apache.drill.jdbc.Driver:jdbc:drill:zk=local".
   TRACER: SETUP: Proxy calling DriverManager.getDriver(...) for proxied URL "jdbc:drill:zk=local".
   TRACER: SETUP: DriverManager.getDriver( "jdbc:drill:zk=local" ) returned a(n) org.apache.drill.jdbc.Driver: org.apache.drill.jdbc.Driver@54275b5d.
   TRACER: SETUP: Proxy's acceptsURL( "jdbc:proxy:org.apache.drill.jdbc.Driver:jdbc:drill:zk=local" ) returning true.
   TRACER: SETUP: Proxy's connect(...) called with URL "jdbc:proxy::jdbc:drill:zk=local".
   TRACER: SETUP: Proxy calling DriverManager.getDriver(...) for proxied URL "jdbc:drill:zk=local".
   TRACER: SETUP: DriverManager.getDriver( "jdbc:drill:zk=local" ) returned a(n) org.apache.drill.jdbc.Driver: org.apache.drill.jdbc.Driver@54275b5d.
   TRACER: CALL:   ((Driver) <id=1> ...) . connect( (String) "jdbc:drill:zk=local", (Properties) <id=2> {} )
   TRACER: RETURN: ((Driver) <id=1> ...) . connect( (String) "jdbc:drill:zk=local", (Properties) <id=2> {} ), RESULT: (Connection) <id=3> ...
   TRACER: CALL:   ((Connection) <id=3> ...) . createStatement()
   TRACER: RETURN: ((Connection) <id=3> ...) . createStatement(), RESULT: (Statement) <id=4> ...
   TRACER: CALL:   ((Statement) <id=4> ...) . executeQuery( (String) "SELECT * FROM INFORMATION_SCHEMA.CATALOGS" )
   TRACER: RETURN: ((Statement) <id=4> ...) . executeQuery( (String) "SELECT * FROM INFORMATION_SCHEMA.CATALOGS" ), RESULT: (ResultSet) <id=5> ...
   TRACER: CALL:   ((ResultSet) <id=5> ...) . next()
   TRACER: RETURN: ((ResultSet) <id=5> ...) . next(), RESULT: (boolean) true
   TRACER: CALL:   ((ResultSet) <id=5> ...) . getString( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=5> ...) . getString( (int) 1 ), RESULT: (String) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=5> ...) . getObject( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=5> ...) . getObject( (int) 1 ), RESULT: (Object) "DRILL"
   TRACER: CALL:   ((Statement) <id=4> ...) . close()
   TRACER: RETURN: ((Statement) <id=4> ...) . close(), RESULT: (none--void) 
   TRACER: CALL:   ((Connection) <id=3> ...) . createStatement()
   TRACER: RETURN: ((Connection) <id=3> ...) . createStatement(), RESULT: (Statement) <id=6> ...
   TRACER: CALL:   ((Statement) <id=6> ...) . close()
   TRACER: RETURN: ((Statement) <id=6> ...) . close(), RESULT: (none--void) 
   TRACER: CALL:   ((Driver) <id=1> ...) . getMajorVersion()
   TRACER: RETURN: ((Driver) <id=1> ...) . getMajorVersion(), RESULT: (int) 1
   TRACER: CALL:   ((Driver) <id=1> ...) . getMinorVersion()
   TRACER: RETURN: ((Driver) <id=1> ...) . getMinorVersion(), RESULT: (int) 20
   TRACER: CALL:   ((Driver) <id=1> ...) . jdbcCompliant()
   TRACER: RETURN: ((Driver) <id=1> ...) . jdbcCompliant(), RESULT: (boolean) false
   TRACER: CALL:   ((Driver) <id=1> ...) . getParentLogger()
   TRACER: WARNING: Unnoted type encountered in formatting (value might not render well): class java.util.logging.LogManager$RootLogger.
   TRACER: RETURN: ((Driver) <id=1> ...) . getParentLogger(), RESULT: (java.util.logging.Logger) (java.util.logging.LogManager$RootLogger) <id=7> java.util.logging.LogManager$RootLogger@6d0dbfca
   TRACER: CALL:   ((Driver) <id=1> ...) . getPropertyInfo( (String) "jdbc:proxy::jdbc:drill:zk=local", (Properties) <id=8> {} )
   TRACER: RETURN: ((Driver) <id=1> ...) . getPropertyInfo( (String) "jdbc:proxy::jdbc:drill:zk=local", (Properties) <id=8> {} ), RESULT: (DriverPropertyInfo[]) <id=9> { [ name = "FACTORY", value = null, required = false, choices = null, description = null ], [ name = "SCHEMA", value = null, required = false, choices = null, description = null ], [ name = "TIME_ZONE", value = null, required = false, choices = null, description = null ], [ name = "URL", value = null, required = false, choices = null, description = null ], [ name = "SERIALIZATION", value = null, required = false, choices = null, description = null ], [ name = "AUTHENTICATION", value = null, required = false, choices = null, description = null ], [ name = "AVATICA_USER", value = null, required = false, choices = null, description = null ], [ name = "AVATICA_PASSWORD", value = null, required = false, choices = null, description = null ], [ name = "HTTP_CLIENT_FACTORY", value = null, required = false, choices = null, desc
 ription = null ], [ name = "HTTP_CLIENT_IMPL", value = null, required = false, choices = null, description = null ], [ name = "PRINCIPAL", value = null, required = false, choices = null, description = null ], [ name = "KEYTAB", value = null, required = false, choices = null, description = null ], [ name = "TRUSTSTORE", value = null, required = false, choices = null, description = null ], [ name = "TRUSTSTORE_PASSWORD", value = null, required = false, choices = null, description = null ], [ name = "KEYSTORE", value = null, required = false, choices = null, description = null ], [ name = "KEYSTORE_PASSWORD", value = null, required = false, choices = null, description = null ], [ name = "KEY_PASSWORD", value = null, required = false, choices = null, description = null ], [ name = "HOSTNAME_VERIFICATION", value = null, required = false, choices = null, description = null ] }
   TRACER: CALL:   ((Connection) <id=3> ...) . getMetaData()
   TRACER: RETURN: ((Connection) <id=3> ...) . getMetaData(), RESULT: (DatabaseMetaData) <id=10> ...
   TRACER: CALL:   ((DatabaseMetaData) <id=10> ...) . getConnection()
   TRACER: RETURN: ((DatabaseMetaData) <id=10> ...) . getConnection(), RESULT: (Connection) <id=3> ...
   TRACER: CALL:   ((DatabaseMetaData) <id=10> ...) . allTablesAreSelectable()
   TRACER: RETURN: ((DatabaseMetaData) <id=10> ...) . allTablesAreSelectable(), RESULT: (boolean) false
   TRACER: CALL:   ((DatabaseMetaData) <id=10> ...) . ownUpdatesAreVisible( (int) 1003 )
   TRACER: THROW:  ((DatabaseMetaData) <id=10> ...) . ownUpdatesAreVisible( (int) 1003 ), threw: (SQLFeatureNotSupportedException) "java.sql.SQLFeatureNotSupportedException: ownUpdatesAreVisible(int) is not supported" ==> (RuntimeException) "java.lang.RuntimeException: todo: implement this method"
   TRACER: CALL:   ((DatabaseMetaData) <id=10> ...) . getCatalogs()
   TRACER: RETURN: ((DatabaseMetaData) <id=10> ...) . getCatalogs(), RESULT: (ResultSet) <id=11> ...
   TRACER: CALL:   ((ResultSet) <id=11> ...) . next()
   TRACER: RETURN: ((ResultSet) <id=11> ...) . next(), RESULT: (boolean) true
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getString( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getString( (int) 1 ), RESULT: (String) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getObject( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getObject( (int) 1 ), RESULT: (Object) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getMetaData()
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getMetaData(), RESULT: (ResultSetMetaData) <id=12> ...
   TRACER: CALL:   ((ResultSetMetaData) <id=12> ...) . getColumnCount()
   TRACER: RETURN: ((ResultSetMetaData) <id=12> ...) . getColumnCount(), RESULT: (int) 1
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getObject( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getObject( (int) 1 ), RESULT: (Object) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getString( (int) 1 )
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getString( (int) 1 ), RESULT: (String) "DRILL"
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getInt( (int) 1 )
   TRACER: THROW:  ((ResultSet) <id=11> ...) . getInt( (int) 1 ), threw: (SQLDataException) "java.sql.SQLDataException: cannot convert to long (org.apache.calcite.avatica.util.AbstractCursor$StringAccessor@61cdb5a4)"
   TRACER: CALL:   ((Connection) <id=3> ...) . getMetaData()
   TRACER: RETURN: ((Connection) <id=3> ...) . getMetaData(), RESULT: (DatabaseMetaData) <id=10> ...
   TRACER: CALL:   ((ResultSet) <id=11> ...) . getMetaData()
   TRACER: RETURN: ((ResultSet) <id=11> ...) . getMetaData(), RESULT: (ResultSetMetaData) <id=12> ...
   [INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.816 s - in org.apache.drill.jdbc.proxy.TracingProxyDriverTest
   [INFO] Running org.apache.drill.jdbc.PreparedStatementMaxRowsTest
   [WARNING] Tests run: 75, Failures: 0, Errors: 0, Skipped: 28, Time elapsed: 1.192 s - in org.apache.drill.jdbc.ResultSetGetMethodConversionsTest
   [INFO] Running org.apache.drill.jdbc.LegacyDatabaseMetaDataGetColumnsTest
   [WARNING] Tests run: 9, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 2.102 s - in org.apache.drill.jdbc.PreparedStatementMaxRowsTest
   [INFO] Running org.apache.drill.jdbc.DatabaseMetaDataGetColumnsTest
   [WARNING] Tests run: 389, Failures: 0, Errors: 0, Skipped: 79, Time elapsed: 2.054 s - in org.apache.drill.jdbc.DatabaseMetaDataGetColumnsTest
   [INFO] Running org.apache.drill.jdbc.StatementTest
   [WARNING] Tests run: 389, Failures: 0, Errors: 0, Skipped: 79, Time elapsed: 9.571 s - in org.apache.drill.jdbc.LegacyDatabaseMetaDataGetColumnsTest
   [INFO] Running org.apache.drill.jdbc.DrillColumnMetaDataListTest
   [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.905 s - in org.apache.drill.jdbc.DrillColumnMetaDataListTest
   [INFO] Running org.apache.drill.jdbc.ConnectionTest
   [WARNING] Tests run: 25, Failures: 0, Errors: 0, Skipped: 9, Time elapsed: 0.771 s - in org.apache.drill.jdbc.ConnectionTest
   [INFO] Running org.apache.drill.jdbc.impl.TypeConvertingSqlAccessorTest
   [INFO] Tests run: 43, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 s - in org.apache.drill.jdbc.impl.TypeConvertingSqlAccessorTest
   [INFO] Running org.apache.drill.jdbc.test.TestAggregateFunctionsQuery
   [WARNING] Tests run: 5, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 1.66 s - in org.apache.drill.jdbc.test.TestAggregateFunctionsQuery
   [INFO] Running org.apache.drill.jdbc.test.TestJdbcMetadata
   [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.552 s - in org.apache.drill.jdbc.test.TestJdbcMetadata
   [INFO] Running org.apache.drill.jdbc.test.TestLegacyJdbcMetadata
   [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 10.89 s - in org.apache.drill.jdbc.StatementTest
   [INFO] Running org.apache.drill.jdbc.test.JdbcNullOrderingAndGroupingTest
   [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 2.975 s - in org.apache.drill.jdbc.test.TestLegacyJdbcMetadata
   [INFO] Running org.apache.drill.jdbc.test.TestBugFixes
   [WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.539 s - in org.apache.drill.jdbc.test.TestBugFixes
   [INFO] Running org.apache.drill.jdbc.test.Bug1735ConnectionCloseTest
   [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 0.852 s - in org.apache.drill.jdbc.test.Bug1735ConnectionCloseTest
   [INFO] Running org.apache.drill.jdbc.test.Bug1735ResultSetCloseReleasesBuffersTest
   [WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.447 s - in org.apache.drill.jdbc.test.Bug1735ResultSetCloseReleasesBuffersTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest
   java.lang.NullPointerException
           at java.base/java.util.Objects.requireNonNull(Objects.java:221)
           at org.apache.calcite.avatica.Meta$MetaResultSet.create(Meta.java:577)
           at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1136)
           at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1143)
           at org.apache.calcite.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:548)
           at org.apache.calcite.avatica.AvaticaPreparedStatement.executeLargeUpdate(AvaticaPreparedStatement.java:152)
           at org.apache.calcite.avatica.AvaticaPreparedStatement.executeUpdate(AvaticaPreparedStatement.java:147)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest$NoNonSqlExceptionsChecker.testOneMethod(Drill2769UnsupportedReportsUseSqlExceptionTest.java:242)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest$NoNonSqlExceptionsChecker.testMethods(Drill2769UnsupportedReportsUseSqlExceptionTest.java:308)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest.testPreparedStatementMethodsThrowRight(Drill2769UnsupportedReportsUseSqlExceptionTest.java:423)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
           at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
           at mockit.integration.junit4.JUnit4TestRunnerDecorator.executeTestMethod(JUnit4TestRunnerDecorator.java:157)
           at mockit.integration.junit4.JUnit4TestRunnerDecorator.invokeExplosively(JUnit4TestRunnerDecorator.java:71)
           at mockit.integration.junit4.FakeFrameworkMethod.invokeExplosively(FakeFrameworkMethod.java:29)
           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java)
           at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
           at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
           at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
           at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at java.base/java.lang.Thread.run(Thread.java:834)
   java.lang.NullPointerException
           at java.base/java.util.Objects.requireNonNull(Objects.java:221)
           at org.apache.calcite.avatica.Meta$MetaResultSet.create(Meta.java:577)
           at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1136)
           at org.apache.drill.jdbc.impl.DrillMetaImpl.execute(DrillMetaImpl.java:1143)
           at org.apache.calcite.avatica.AvaticaConnection.executeQueryInternal(AvaticaConnection.java:548)
           at org.apache.calcite.avatica.AvaticaPreparedStatement.executeLargeUpdate(AvaticaPreparedStatement.java:152)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest$NoNonSqlExceptionsChecker.testOneMethod(Drill2769UnsupportedReportsUseSqlExceptionTest.java:242)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest$NoNonSqlExceptionsChecker.testMethods(Drill2769UnsupportedReportsUseSqlExceptionTest.java:308)
           at org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest.testPreparedStatementMethodsThrowRight(Drill2769UnsupportedReportsUseSqlExceptionTest.java:423)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.base/java.lang.reflect.Method.invoke(Method.java:566)
           at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
           at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
           at mockit.integration.junit4.JUnit4TestRunnerDecorator.executeTestMethod(JUnit4TestRunnerDecorator.java:157)
           at mockit.integration.junit4.JUnit4TestRunnerDecorator.invokeExplosively(JUnit4TestRunnerDecorator.java:71)
           at mockit.integration.junit4.FakeFrameworkMethod.invokeExplosively(FakeFrameworkMethod.java:29)
           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java)
           at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
           at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
           at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
           at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at java.base/java.lang.Thread.run(Thread.java:834)
   [WARNING] Tests run: 7, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 2.681 s - in org.apache.drill.jdbc.test.Drill2769UnsupportedReportsUseSqlExceptionTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2461IntervalsBreakInfoSchemaBugTest
   [WARNING] Tests run: 2, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.595 s - in org.apache.drill.jdbc.test.Drill2461IntervalsBreakInfoSchemaBugTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2489CallsAfterCloseThrowExceptionsTest
   [WARNING] Tests run: 17, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.667 s - in org.apache.drill.jdbc.test.Drill2489CallsAfterCloseThrowExceptionsTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2463GetNullsFailedWithAssertionsBugTest
   [WARNING] Tests run: 8, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.556 s - in org.apache.drill.jdbc.test.Drill2463GetNullsFailedWithAssertionsBugTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2130JavaJdbcHamcrestConfigurationTest
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 s - in org.apache.drill.jdbc.test.Drill2130JavaJdbcHamcrestConfigurationTest
   [INFO] Running org.apache.drill.jdbc.test.TestExecutionExceptionsToClient
   [WARNING] Tests run: 9, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.524 s - in org.apache.drill.jdbc.test.TestExecutionExceptionsToClient
   [INFO] Running org.apache.drill.jdbc.test.TestJdbcQuery
   [WARNING] Tests run: 91, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 10.045 s - in org.apache.drill.jdbc.test.JdbcNullOrderingAndGroupingTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2439GetBooleanFailsSayingWrongTypeBugTest
   [WARNING] Tests run: 4, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.471 s - in org.apache.drill.jdbc.test.Drill2439GetBooleanFailsSayingWrongTypeBugTest
   [INFO] Running org.apache.drill.jdbc.test.TestJdbcDistQuery
   [WARNING] Tests run: 18, Failures: 0, Errors: 0, Skipped: 5, Time elapsed: 2.722 s - in org.apache.drill.jdbc.test.TestJdbcDistQuery
   [INFO] Running org.apache.drill.jdbc.test.TestInformationSchemaColumns
   [WARNING] Tests run: 38, Failures: 0, Errors: 0, Skipped: 7, Time elapsed: 5.311 s - in org.apache.drill.jdbc.test.TestJdbcQuery
   [INFO] Running org.apache.drill.jdbc.test.Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest
   [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.441 s - in org.apache.drill.jdbc.test.Drill2128GetColumnsDataTypeNotTypeCodeIntBugsTest
   [INFO] Running org.apache.drill.jdbc.test.Drill2288GetColumnsMetadataWhenNoRowsTest
   [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.746 s - in org.apache.drill.jdbc.test.Drill2288GetColumnsMetadataWhenNoRowsTest
   [INFO] Running org.apache.drill.jdbc.ConnectionInfoTest
   [WARNING] Tests run: 384, Failures: 0, Errors: 0, Skipped: 93, Time elapsed: 2.975 s - in org.apache.drill.jdbc.test.TestInformationSchemaColumns
   [INFO] Running org.apache.drill.jdbc.PreparedStatementTest
   [WARNING] Tests run: 6, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 1.287 s - in org.apache.drill.jdbc.ConnectionInfoTest
   [INFO] Running org.apache.drill.jdbc.DatabaseMetaDataTest
   [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.178 s - in org.apache.drill.jdbc.DatabaseMetaDataTest
   [INFO] Running org.apache.drill.jdbc.LegacyDatabaseMetaDataTest
   [INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.171 s - in org.apache.drill.jdbc.LegacyDatabaseMetaDataTest
   [INFO] Running org.apache.drill.jdbc.DriverTest
   [WARNING] Tests run: 38, Failures: 0, Errors: 0, Skipped: 23, Time elapsed: 0.432 s - in org.apache.drill.jdbc.DriverTest
   [INFO] Running org.apache.drill.jdbc.LegacyPreparedStatementTest
   [WARNING] Tests run: 4, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.427 s - in org.apache.drill.jdbc.LegacyPreparedStatementTest
   [INFO] Running org.apache.drill.jdbc.StatementMaxRowsTest
   [WARNING] Tests run: 9, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.841 s - in org.apache.drill.jdbc.StatementMaxRowsTest
   [WARNING] Tests run: 13, Failures: 0, Errors: 0, Skipped: 2, Time elapsed: 5.001 s - in org.apache.drill.jdbc.PreparedStatementTest
   [INFO] 
   [INFO] Results:
   [INFO] 
   [WARNING] Tests run: 1812, Failures: 0, Errors: 0, Skipped: 370
   [INFO] 
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD SUCCESS
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  48.828 s
   [INFO] Finished at: 2021-10-18T13:15:23+03:00
   [INFO] ------------------------------------------------------------------------
   ```
   </details>
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] lgtm-com[bot] commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
lgtm-com[bot] commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-952163481


   This pull request **introduces 1 alert** when merging 5b3dd9f9b800f4b7304e9eb8bd91bbc6f9509a14 into b6da35ece5a278a5ca72ecc33bafc98ba8f861f6 - [view on LGTM.com](https://lgtm.com/projects/g/apache/drill/rev/pr-2f6a0aa4f35071a673d558e227249697c90e2bcf)
   
   **new alerts:**
   
   * 1 for Result of multiplication cast to wider type


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] paul-rogers commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
paul-rogers commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-949284641


   Hi @rymarm, thanks for the contribution!
   
   Your description mentions that the Drill RPC already sends heartbeats. Here is some background.
   
   For systems such as MySQL, the connection to the server can remain open, but idle if no queries are sent. At some point, the MySql server will close the connection due to inactivity. The client won't know this until it tries to take some action. In this case, `isValid()` makes sense: it sends something to see if anyone is still on the other end.
   
   In Drill's case, there is always the heartbeat, so the connection will never timeout from disuse, only from a network failure or because the server failed. So, the client always knows that the connection is still valid (or was at the time of the last heartbeat. We can check how frequently they occur; I think it is on the order of 30 seconds or so, but I may be wrong.)
   
   The Drill JDBC connection uses Drill's native home-grown Netty-based RPC mechanism. That mechanism includes keep-alive heartbeats. On servers, each Drillbit sends the Ping/Pong messages to each other to verify that the Drillbits are still up. In fact, in the old days, somethings things would fail under heavy load because the CPU was so busy that the heartbeat thread didn't get a chance to run, and the connection was assumed failed.
   
   The Ping/Pong messages occur over the same channel as the data flow. We had cases where the client was slow to read data, and thus a heartbeat message was backed up behind data batches and the connection ended up failing as a result. I don't recall how we resolved that. Did we disable heartbeat for clients? Move heartbeat to the control channel?
   
   Given all this, the extra work in `isValid()` is not as necessary as it is with other systems such as MySQL. Still, no harm in adding an extra check. So, the question is, does the `isValid()` method need to know the state at this exact instant? Or, is it good enough to know that the connection was OK when we last checked 30 seconds (or whatever) ago? Either way, we'll keep checking in the background whether the client asks or not.
   
   What do you think?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-949656576


   Hi @paul-rogers, thank you for your review!
   
   By answering the main questions:   
   > ...So, the question is, does the isValid() method need to know the state at this exact instant? Or, is it good enough to know that the connection was OK when we last checked 30 seconds (or whatever) ago?   
   
   I think the answer is pretty easy and very predictable — yes, the method needs to know the state at this exact instant, as it is required by JDBC API and is described in [java documentation](https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#isValid-int-). As we implement some interface we should comply with it, so as users may simply use Drill JDBC driver without deep knowledge of its implementation and the method result will be predictable.
   
   ------------------------
   
   And let me comment on other parts of your message.
   
   > ...So, the client always knows that the connection is still valid (or was at the time of the last heartbeat. We can check how frequently they occur; I think it is on the order of 30 seconds or so, but I may be wrong.   
   
   The current implementation does not correspond to what you said. For a now, only the server always knows that the connection is still valid, because it receives a heartbeat from the client, while the client doesn't check, whether the server (drillbit) has answered on the PING with a PONG. Heartbeat mechanism was implemented in [this commit](https://github.com/apache/drill/commit/960f876a1945eee4eeb0d6a98c5c58dfe2eea1a9), and there were missed functions that on the client side checks whether the server answers for requests.   
   
   There are [`IdleStateHandler`](https://github.com/apache/drill/blob/960f876a1945eee4eeb0d6a98c5c58dfe2eea1a9/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicClient.java#L119) that sends PING (heartbeat) request if the client doesn't send any request for a while. But this handler, [doesn't check, whether the client received a PONG answer](https://github.com/apache/drill/blob/960f876a1945eee4eeb0d6a98c5c58dfe2eea1a9/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/RpcBus.java#L266) from the server. I may suppose, that author of this logic (heartbeat) believed, that netty's [`Future#isSuccess`](https://netty.io/4.1/api/io/netty/util/concurrent/Future.html#isSuccess--) will return `false` if the server [didn't receive PING message](https://github.com/apache/drill/blob/960f876a1945eee4eeb0d6a98c5c58dfe2eea1a9/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/BasicClient.java#L123), but it doesn't: `Future#isSuccess` mean only successful flush to a socket and it d
 oesn't mean that any data was delivered ([source](https://github.com/netty/netty/issues/10343#issuecomment-641365702)).    
   
   Therefore, the client doesn't have any mechanism, that checks whether the server (drillbit) still answers. And in cases when drillbit is not accessible now due to network issues, drillbit failing, etc — the client (or HikariCP for example) will think, that connection is still valid.
   
   >  ...I think it is on the order of 30 seconds or so, but I may be wrong.   
   
   It is 15 seconds by default and calculates as `drill.exec.rpc.user.timeout` * 0.5 ([souserce](https://github.com/apache/drill/blob/4aefcef2b665c5737471664912a26ef6ed9a6cfc/exec/rpc/src/main/java/org/apache/drill/exec/rpc/BasicClient.java#L87)).
   
   > ...a heartbeat message was backed up behind data batches and the connection ended up failing as a result.   
   
   I even heard about cases, when zookeeper was losing drillbit from a cluster, because it didn't send heartbeat in time due to garbage collector freeze. And therefore in infrequent cases, queries may fail, because a foreman decides, that one of the drillbits is lost.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
luocooong commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-948654855


   @paul-rogers Hi, Paul. Could you please take a look? thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-961055102


   @paul-rogers Hello! Could you, please, review my fix? I've rewritten my previous code totally and made it in "netty style" to make it thread-safe, extensible and simple to understand.
   
   Besides this, I've also:
   - corrected `DrillConnectionImpl#close()` so it worked correctly and could catch cases, when netty`s connection was closed;
   - overrided  `AvaticaConnection#close()` in `DrillConnectionImpl` so it now correctly implement `Autocloseable` interface.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-945172356


   @luocooong Thank you for remind! I've made rebase. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-976760317


   @paul-rogers yes, JDBC driver will work with previously build server. Server handle PING request starting from Drill 1.0.0: https://github.com/apache/drill/commit/960f876a1945eee4eeb0d6a98c5c58dfe2eea1a9#diff-b22efd8eda87a1b49514aff0d3886c7f01a1ea0f6a914f7ad390b891d8adec25


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
luocooong commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-975419903


   @rymarm Hello, sorry for the delay. Paul will take a look in the next couple of days.  The pull request is associated with the core module, Paul has the most powerful voice. Thank you for understanding.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] rymarm commented on a change in pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
rymarm commented on a change in pull request #2333:
URL: https://github.com/apache/drill/pull/2333#discussion_r734666739



##########
File path: exec/rpc/src/main/java/org/apache/drill/exec/rpc/PongListener.java
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.rpc;
+
+import org.apache.drill.common.exceptions.DrillRuntimeException;
+import org.apache.drill.shaded.guava.com.google.common.base.Stopwatch;
+
+import java.util.EventListener;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * PongListener realizes the listener pattern. It is used to verify, whether {@link org.apache.drill.exec.rpc.RpcBus.InboundHandler}
+ * received {@link InboundRpcMessage} with {@link org.apache.drill.exec.proto.GeneralRPCProtos.RpcMode#PONG PONG} mode.
+ */
+public class PongListener implements EventListener {
+  private boolean hasReceivedPong = false;
+
+  /**
+   * Verify whether received {@link org.apache.drill.exec.proto.GeneralRPCProtos.RpcMode#PONG PONG} mode.
+   *
+   * @param timeout time in seconds to wait message receiving. Should be higher than 0
+   * @return true if message is received until timeout, false otherwise
+   * @throws DrillRuntimeException if the value supplied for timeout is less than 0
+   */
+  public boolean pongIsReceived(int timeout) throws DrillRuntimeException {
+    if (timeout < 0) {
+      throw new DrillRuntimeException(String.format("Invalid timeout (%d<0).", timeout));
+    }
+
+    Stopwatch stopwatch = Stopwatch.createStarted();
+    while (!hasReceivedPong) {

Review comment:
       Thank you for your remark! I'll look at how to change this.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [drill] luocooong commented on pull request #2333: DRILL-8009: DrillConnectionImpl#isValid() doesn't correspond JDBC API

Posted by GitBox <gi...@apache.org>.
luocooong commented on pull request #2333:
URL: https://github.com/apache/drill/pull/2333#issuecomment-948653169


   @rymarm Thanks for making the fix. Actually, the GitHub CI failures are random, low-frequency, and you just need to ignore it and restart the CI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org