Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ class JobProgressListener(conf: SparkConf) extends SparkListener with Logging {
) {
jobData.numActiveStages -= 1
if (stage.failureReason.isEmpty) {
jobData.completedStageIndices.add(stage.stageId)
if (!stage.submissionTime.isEmpty) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this case? A stage didn't fail but never submitted, so is it skipped?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, like the case described in the jira.

jobData.completedStageIndices.add(stage.stageId)
}
} else {
jobData.numFailedStages += 1
}
Expand Down Expand Up @@ -304,6 +306,9 @@ class JobProgressListener(conf: SparkConf) extends SparkListener with Logging {
jobData <- jobIdToData.get(jobId)
) {
jobData.numActiveStages += 1

// If a stage retries again, it should be removed from completedStageIndices set
jobData.completedStageIndices.remove(stage.stageId)
}
}

Expand Down
3 changes: 2 additions & 1 deletion core/src/main/scala/org/apache/spark/ui/jobs/UIData.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.apache.spark.executor.TaskMetrics
import org.apache.spark.scheduler.{AccumulableInfo, TaskInfo}
import org.apache.spark.util.collection.OpenHashSet

import scala.collection.mutable
import scala.collection.mutable.HashMap

private[jobs] object UIData {
Expand Down Expand Up @@ -63,7 +64,7 @@ private[jobs] object UIData {
/* Stages */
var numActiveStages: Int = 0,
// This needs to be a set instead of a simple count to prevent double-counting of rerun stages:
var completedStageIndices: OpenHashSet[Int] = new OpenHashSet[Int](),
var completedStageIndices: mutable.HashSet[Int] = new mutable.HashSet[Int](),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might leave out this change as it's no longer buying anything and might make the memory size increase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you disagree this? But the OpenHashSet doesn't support remove operation. Do you have any suggestion on this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I understand. OK.

var numSkippedStages: Int = 0,
var numFailedStages: Int = 0
)
Expand Down