Skip to content

Commit 39a82f2

Browse files
author
Nathan Kronenfeld
committed
Clear local copies of accumulators as soon as we're done with them
1 parent 17c162f commit 39a82f2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/src/main/scala/org/apache/spark/Accumulators.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ private object Accumulators {
311311
for ((id, accum) <- localAccums.getOrElse(Thread.currentThread, Map())) {
312312
ret(id) = accum.localValue
313313
}
314+
localAccums.remove(Thread.currentThread)
314315
return ret
315316
}
316317

0 commit comments

Comments
 (0)