You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "HyukjinKwon (via GitHub)" <gi...@apache.org> on 2023/07/24 08:25:33 UTC

[GitHub] [spark] HyukjinKwon commented on a diff in pull request #42009: [SPARK-44422][CONNECT] Spark Connect fine grained interrupt

HyukjinKwon commented on code in PR #42009:
URL: https://github.com/apache/spark/pull/42009#discussion_r1271916223


##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/ExecuteHolder.scala:
##########
@@ -85,8 +106,19 @@ private[connect] class ExecuteHolder(
   /**
    * Interrupt the execution. Interrupts the running thread, which cancels all running Spark Jobs
    * and makes the execution throw an OPERATION_CANCELED error.
+   * @return
+   *   true if it was not interrupted before, false if it was already interrupted.
    */
-  def interrupt(): Unit = {
+  def interrupt(): Boolean = {
     runner.interrupt()
   }
+
+  /**
+   * Spark Connect tags are also added as SparkContext job tags, but to make the tag unique, they
+   * need to be combined with userId and sessionId.
+   */
+  def tagToSparkJobTag(tag: String): String = {

Review Comment:
   sure
   



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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