[
https://issues.apache.org/jira/browse/DRILL-3640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16070492#comment-16070492
]
ASF GitHub Bot commented on DRILL-3640:
---------------------------------------
Github user kkhatua commented on the issue:
https://github.com/apache/drill/pull/858
@laurentgo Within the DrillCursor, the only place I could do such a check
was
https://github.com/kkhatua/drill/blob/c51473859d1dd81cf70e857f729c3a8491b2834a/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillCursor.java#L582
(Hosting a fork of this PR in this repo:
https://github.com/kkhatua/drill/commits/altDrill3640 )
My JDBC client for performance testing has a similar mechanism for JDBC
drivers that don't support timeout, but allow for query cancellation by using a
cancelling-trigger thread to sleep until the timeout, before waking up
explicitly cancelling the query. I've simply replicated behaviour that in the
Drill JDBC package. Having a constant check on the time remaining using a
system call like {{System.currentTimeMillis()}} is actually expensive, which is
why I didn't want to have the DrillCursor contantly do that check before
throwing an exception. Can you point to me on which async framework should I be
looking at as well ?
> 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
> Fix For: 1.11.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)