Skip to content
Snippets Groups Projects
Commit dd583b7e authored by Stephen Haberman's avatar Stephen Haberman
Browse files

Call executeOnCompleteCallbacks in a finally block.

parent cb867e9f
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,11 @@ private[spark] class ResultTask[T, U](
override def run(attemptId: Long): U = {
val context = new TaskContext(stageId, partition, attemptId)
val result = func(context, rdd.iterator(split, context))
context.executeOnCompleteCallbacks()
result
try {
func(context, rdd.iterator(split, context))
} finally {
context.executeOnCompleteCallbacks()
}
}
override def preferredLocations: Seq[String] = locs
......
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