cxzl25 commented on code in PR #5410:
URL: https://github.com/apache/kyuubi/pull/5410#discussion_r1361826510
##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/spark/kyuubi/SparkConsoleProgressBar.scala:
##########
@@ -81,7 +93,14 @@ class SparkConsoleProgressBar(
val width = TerminalWidth / stages.size
val bar = stages.map { s =>
val total = s.numTasks
- val header = s"[Stage ${s.stageId}:"
+ val result = findJobId(s.stageId)
+ var jobHeader = s"[There is no job about this stage]"
+ if (result.isDefined) {
+ val jobId = result.get
+ jobHeader = s"[Job $jobId (${liveJobs.get(jobId).numCompleteStages} " +
+ s"/ ${liveJobs.get(jobId).numStages}) Stages] "
+ }
Review Comment:
```suggestion
val jobHeader = findJobId(s.stageId).map(jobId =>
s"[Job $jobId (${liveJobs.get(jobId).numCompleteStages} " +
s"/ ${liveJobs.get(jobId).numStages}) Stages] ").getOrElse(
"[There is no job about this stage] ")
```
--
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]