AngersZhuuuu commented on a change in pull request #25611: [SPARK-28901][SQL]
Support cancel SparkThriftServer's SQL Operation
URL: https://github.com/apache/spark/pull/25611#discussion_r318875853
##########
File path:
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
##########
@@ -70,6 +70,14 @@ private[hive] class SparkExecuteStatementOperation(
}
}
+ def cancelStatement(): Unit = {
+ // RDDs will be cleaned automatically upon garbage collection.
+ logDebug(s"CANCELING $statementId")
+ cleanup(OperationState.CANCELED)
+ sqlContext.sparkContext.clearJobGroup()
+ HiveThriftServer2.listener.onStatementCanceled(statementId)
+ }
+
Review comment:
In current version, we can't just override cancel() method, so I add a new
special one for SparkExecuteStatementOperation.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]