Skip to content

Commit

Permalink
AllJobsPage should still report correct completed & failed job count,…
Browse files Browse the repository at this point in the history
… even if some have been cleaned, to make it consistent w/ AllStagesPage
  • Loading branch information
squito committed Mar 19, 2015
1 parent 36e4062 commit 84cd497
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ private[ui] class AllJobsPage(parent: JobsTab) extends WebUIPage("") {
if (shouldShowCompletedJobs) {
<li>
<a href="#completed"><strong>Completed Jobs:</strong></a>
{completedJobs.size}
{listener.numCompletedJobs}
</li>
}
}
{
if (shouldShowFailedJobs) {
<li>
<a href="#failed"><strong>Failed Jobs:</strong></a>
{failedJobs.size}
{listener.numFailedJobs}
</li>
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ class JobProgressListener(conf: SparkConf) extends SparkListener with Logging {
// JobProgressListener's retention limits.
var numCompletedStages = 0
var numFailedStages = 0
var numCompletedJobs = 0
var numFailedJobs = 0

// Misc:
val executorIdToBlockManagerId = HashMap[ExecutorId, BlockManagerId]()
Expand Down Expand Up @@ -195,10 +197,12 @@ class JobProgressListener(conf: SparkConf) extends SparkListener with Logging {
completedJobs += jobData
trimJobsIfNecessary(completedJobs)
jobData.status = JobExecutionStatus.SUCCEEDED
numCompletedJobs += 1
case JobFailed(exception) =>
failedJobs += jobData
trimJobsIfNecessary(failedJobs)
jobData.status = JobExecutionStatus.FAILED
numFailedJobs += 1
}
for (stageId <- jobData.stageIds) {
stageIdToActiveJobIds.get(stageId).foreach { jobsUsingStage =>
Expand Down

0 comments on commit 84cd497

Please sign in to comment.