This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch branch-1.8
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/branch-1.8 by this push:
     new 72f93c7d7 [KYUUBI #6206] Update comments for job group id of Spark 
broadcast jobs
72f93c7d7 is described below

commit 72f93c7d7a6c3f6df314da50eb081ee5009219c4
Author: Cheng Pan <[email protected]>
AuthorDate: Mon Mar 25 17:15:38 2024 +0800

    [KYUUBI #6206] Update comments for job group id of Spark broadcast jobs
    
    # :mag: Description
    
    Prior SPARK-43952 (3.5.0), broadcast jobs uses a different group id, so we 
can cancel those broadcast jobs. See more details in SPARK-20774 (3.0.0)
    
    ## Types of changes :bookmark:
    
    - [ ] Bugfix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
    
    ## Test Plan ๐Ÿงช
    
    Only touch comment, review is sufficient.
    
    ---
    
    # Checklist ๐Ÿ“
    
    - [x] This patch was not authored or co-authored using [Generative 
Tooling](https://www.apache.org/legal/generative-tooling.html)
    
    **Be nice. Be informative.**
    
    Closes #6206 from pan3793/spark-cancel.
    
    Closes #6206
    
    6a4304d35 [Cheng Pan] fix
    a242efab7 [Cheng Pan] Update comments for job group id of Spark broadcast 
jobs
    
    Authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
    (cherry picked from commit 54687e0af71f9029d88ecdbb5fb100f19506d183)
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../org/apache/kyuubi/engine/spark/operation/SparkOperation.scala   | 2 ++
 .../main/scala/org/apache/spark/kyuubi/SQLOperationListener.scala   | 6 ++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala
 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala
index 5799e0237..2743301ad 100644
--- 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala
+++ 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/operation/SparkOperation.scala
@@ -165,6 +165,8 @@ abstract class SparkOperation(session: Session)
     // We should use Throwable instead of Exception since 
`java.lang.NoClassDefFoundError`
     // could be thrown.
     case e: Throwable =>
+      // Prior SPARK-43952 (3.5.0), broadcast jobs uses a different group id, 
so we can not
+      // cancel those broadcast jobs. See more details in SPARK-20774 (3.0.0)
       if (cancel && !spark.sparkContext.isStopped) 
spark.sparkContext.cancelJobGroup(statementId)
       withLockRequired {
         val errMsg = Utils.stringifyException(e)
diff --git 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/SQLOperationListener.scala
 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/SQLOperationListener.scala
index a7d409c7c..41970e10a 100644
--- 
a/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/SQLOperationListener.scala
+++ 
b/externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/SQLOperationListener.scala
@@ -63,10 +63,8 @@ class SQLOperationListener(
 
   def getExecutionId: Option[Long] = executionId
 
-  // For broadcast, Spark will introduce a new runId as SPARK_JOB_GROUP_ID, 
see:
-  // https://github.com/apache/spark/pull/24595, So we will miss these logs.
-  // TODO: Fix this until the below ticket resolved
-  // https://issues.apache.org/jira/browse/SPARK-34064
+  // Prior SPARK-43952 (3.5.0), broadcast jobs uses a different group id, so 
we will
+  // miss those logs. See more details in SPARK-20774 (3.0.0)
   private def sameGroupId(properties: Properties): Boolean = {
     properties != null && properties.getProperty(KYUUBI_STATEMENT_ID_KEY) == 
operationId
   }

Reply via email to