You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/11/04 00:24:00 UTC
[jira] [Commented] (DRILL-3640) Drill JDBC driver support
Statement.setQueryTimeout(int)
[ https://issues.apache.org/jira/browse/DRILL-3640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16238629#comment-16238629 ]
ASF GitHub Bot commented on DRILL-3640:
---------------------------------------
GitHub user kkhatua opened a pull request:
https://github.com/apache/drill/pull/1024
DRILL-3640: Support JDBC Statement.setQueryTimeout(int)
Allow for queries to be cancelled if they don't complete within the stipulated time.
This is done by having `Drill[Prepared]StatementImpl` create a `Stopwatch` timer to track elapsed time.
* `DrillCursor` uses this to detect timeouts.
* `DrillResultSetImpl` uses this to detech timeout from the client side (e.g. a slow client, when all batches have been processed by DrillCursor)
Tests added to test these and other query timeout scenarios for both, `Statement` and `PreparedStatement`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kkhatua/drill DRILL-3640_Alt
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/1024.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1024
----
commit 0fe2cfa71a60e7ed17ea12c1ba15fa28be66508f
Author: Kunal Khatua <kk...@maprtech.com>
Date: 2017-11-04T00:20:59Z
DRILL-3640: Support JDBC Statement.setQueryTimeout(int)
Allow for queries to be cancelled if they don't complete within the stipulated time.
This is done by having Drill[Prepared]StatementImpl create a Stopwatch timer to track elapsed time.
* DrillCursor uses this to detect timeouts.
* DrillResultSetImpl uses this to detech timeout from the client side (e.g. a slow client, when all batches have been processed by DrillCursor)
Tests added to test these and other query timeout scenarios.
----
> Drill JDBC driver support Statement.setQueryTimeout(int)
> --------------------------------------------------------
>
> Key: DRILL-3640
> URL: https://issues.apache.org/jira/browse/DRILL-3640
> Project: Apache Drill
> Issue Type: New Feature
> Components: Client - JDBC
> Affects Versions: 1.2.0
> Reporter: Chun Chang
> Assignee: Kunal Khatua
> Priority: Major
> Fix For: 1.12.0
>
>
> It would be nice if we have this implemented. Run away queries can be automatically canceled by setting the timeout.
> java.sql.SQLFeatureNotSupportedException: Setting network timeout is not supported.
> at org.apache.drill.jdbc.impl.DrillStatementImpl.setQueryTimeout(DrillStatementImpl.java:152)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)