File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
core/src/main/scala/org/apache/spark/ui/jobs Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -138,15 +138,15 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
138138 if (shouldShowCompletedJobs) {
139139 <li >
140140 <a href =" #completed" ><strong >Completed Jobs :</ strong></ a>
141- {completedJobs.size }
141+ {listener.numCompletedJobs }
142142 </li >
143143 }
144144 }
145145 {
146146 if (shouldShowFailedJobs) {
147147 <li >
148148 <a href =" #failed" ><strong >Failed Jobs :</ strong></ a>
149- {failedJobs.size }
149+ {listener.numFailedJobs }
150150 </li >
151151 }
152152 }
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ class JobProgressListener(conf: SparkConf) extends SparkListener with Logging {
7070 // JobProgressListener's retention limits.
7171 var numCompletedStages = 0
7272 var numFailedStages = 0
73+ var numCompletedJobs = 0
74+ var numFailedJobs = 0
7375
7476 // Misc:
7577 val executorIdToBlockManagerId = HashMap [ExecutorId , BlockManagerId ]()
@@ -195,10 +197,12 @@ class JobProgressListener(conf: SparkConf) extends SparkListener with Logging {
195197 completedJobs += jobData
196198 trimJobsIfNecessary(completedJobs)
197199 jobData.status = JobExecutionStatus .SUCCEEDED
200+ numCompletedJobs += 1
198201 case JobFailed (exception) =>
199202 failedJobs += jobData
200203 trimJobsIfNecessary(failedJobs)
201204 jobData.status = JobExecutionStatus .FAILED
205+ numFailedJobs += 1
202206 }
203207 for (stageId <- jobData.stageIds) {
204208 stageIdToActiveJobIds.get(stageId).foreach { jobsUsingStage =>
You can’t perform that action at this time.
0 commit comments