File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/ui Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ private[ui] class AllExecutionsPage(parent: SQLTab) extends WebUIPage("") with L
39
39
val failed = new mutable.ArrayBuffer [SQLExecutionUIData ]()
40
40
41
41
sqlStore.executionsList().foreach { e =>
42
- val isRunning = e.jobs.exists { case (_, status) => status == JobExecutionStatus .RUNNING }
42
+ val isRunning = e.completionTime.isEmpty ||
43
+ e.jobs.exists { case (_, status) => status == JobExecutionStatus .RUNNING }
43
44
val isFailed = e.jobs.exists { case (_, status) => status == JobExecutionStatus .FAILED }
44
45
if (isRunning) {
45
46
running += e
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class SQLAppStatusListener(
88
88
89
89
exec.jobs = exec.jobs + (jobId -> JobExecutionStatus .RUNNING )
90
90
exec.stages ++= event.stageIds.toSet
91
- update(exec)
91
+ update(exec, force = true )
92
92
}
93
93
94
94
override def onStageSubmitted (event : SparkListenerStageSubmitted ): Unit = {
@@ -308,11 +308,13 @@ class SQLAppStatusListener(
308
308
})
309
309
}
310
310
311
- private def update (exec : LiveExecutionData ): Unit = {
311
+ private def update (exec : LiveExecutionData , force : Boolean = false ): Unit = {
312
312
val now = System .nanoTime()
313
313
if (exec.endEvents >= exec.jobs.size + 1 ) {
314
314
exec.write(kvstore, now)
315
315
liveExecutions.remove(exec.executionId)
316
+ } else if (force) {
317
+ exec.write(kvstore, now)
316
318
} else if (liveUpdatePeriodNs >= 0 ) {
317
319
if (now - exec.lastWriteTime > liveUpdatePeriodNs) {
318
320
exec.write(kvstore, now)
You can’t perform that action at this time.
0 commit comments