pan3793 commented on code in PR #5410:
URL: https://github.com/apache/kyuubi/pull/5410#discussion_r1371476027


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/SQLOperationListener.scala:
##########
@@ -134,9 +140,18 @@ class SQLOperationListener(
 
   override def onStageCompleted(stageCompleted: SparkListenerStageCompleted): 
Unit = {
     val stageInfo = stageCompleted.stageInfo
+    val stageId = stageInfo.stageId
     val stageAttempt = SparkStageAttempt(stageInfo.stageId, 
stageInfo.attemptNumber())
     activeStages.synchronized {
       if (activeStages.remove(stageAttempt) != null) {
+        stageInfo.getStatusString match {
+          case "succeeded" =>
+            activeJobs.asScala.foreach(item => {
+              if (item._2.stageIds.contains(stageId)) {
+                item._2.numCompleteStages.getAndIncrement()
+              }
+            })

Review Comment:
   ```suggestion
               activeJobs.asScala.foreach { case (_, jobInfo) =>
                 if (jobInfo.stageIds.contains(stageId)) {
                   jobInfo.numCompleteStages.getAndIncrement()
                 }
               }
   ```



-- 
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: [email protected]

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