maropu commented on a change in pull request #29933:
URL: https://github.com/apache/spark/pull/29933#discussion_r499193324



##########
File path: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
##########
@@ -201,6 +202,12 @@ private[hive] class SparkExecuteStatementOperation(
       parentSession.getUsername)
     setHasResultSet(true) // avoid no resultset for async run
 
+    if (queryTimeout > 0) {
+      Executors.newSingleThreadScheduledExecutor.schedule(new Runnable {
+          override def run(): Unit = cancel(OperationState.TIMEDOUT)

Review comment:
       Did you mean the log (that I added in L206) before starting the thread? 
Looks `cancel` itself already has a log in 
https://github.com/apache/spark/pull/29933/files#diff-72dcd8f81a51c8a815159fdf0332acdcR343
 though.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to