You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/29 04:17:48 UTC

[GitHub] [spark] AngersZhuuuu commented on a change in pull request #25611: [SPARK-28901][SQL] Support cancel SparkThriftServer's SQL Operation

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org