Skip to content
Snippets Groups Projects
Commit f4416a1d authored by Matei Zaharia's avatar Matei Zaharia
Browse files

Merge pull request #681 from BlackNiuza/memory_leak

Remove active job from idToActiveJob when job finished or aborted
parents e063e29a 44a24400
No related branches found
No related tags found
No related merge requests found
......@@ -524,6 +524,7 @@ class DAGScheduler(
job.numFinished += 1
// If the whole job has finished, remove it
if (job.numFinished == job.numPartitions) {
idToActiveJob -= stage.priority
activeJobs -= job
resultStageToJob -= stage
markStageAsFinished(stage)
......@@ -671,6 +672,7 @@ class DAGScheduler(
val error = new SparkException("Job failed: " + reason)
job.listener.jobFailed(error)
sparkListeners.foreach(_.onJobEnd(SparkListenerJobEnd(job, JobFailed(error))))
idToActiveJob -= resultStage.priority
activeJobs -= job
resultStageToJob -= resultStage
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment