aboutsummaryrefslogtreecommitdiff
path: root/bin/spark-shell
diff options
context:
space:
mode:
authorNathan Kronenfeld <nkronenfeld@oculusinfo.com>2014-12-09 23:53:17 -0800
committerJosh Rosen <joshrosen@databricks.com>2014-12-09 23:53:17 -0800
commit94b377f94487109a1cc3e07dd230b1df7a96e28d (patch)
tree424f1bba8d6644c1e86b76b14c0bec04e2a12357 /bin/spark-shell
parentf79c1cfc997c1a7ddee480ca3d46f5341b69d3b7 (diff)
downloadspark-94b377f94487109a1cc3e07dd230b1df7a96e28d.tar.gz
spark-94b377f94487109a1cc3e07dd230b1df7a96e28d.tar.bz2
spark-94b377f94487109a1cc3e07dd230b1df7a96e28d.zip
[SPARK-4772] Clear local copies of accumulators as soon as we're done with them
Accumulators keep thread-local copies of themselves. These copies were only cleared at the beginning of a task. This meant that (a) the memory they used was tied up until the next task ran on that thread, and (b) if a thread died, the memory it had used for accumulators was locked up forever on that worker. This PR clears the thread-local copies of accumulators at the end of each task, in the tasks finally block, to make sure they are cleaned up between tasks. It also stores them in a ThreadLocal object, so that if, for some reason, the thread dies, any memory they are using at the time should be freed up. Author: Nathan Kronenfeld <nkronenfeld@oculusinfo.com> Closes #3570 from nkronenfeld/Accumulator-Improvements and squashes the following commits: a581f3f [Nathan Kronenfeld] Change Accumulators to private[spark] instead of adding mima exclude to get around false positive in mima tests b6c2180 [Nathan Kronenfeld] Include MiMa exclude as per build error instructions - this version incompatibility should be irrelevent, as it will only surface if a master is talking to a worker running a different version of spark. 537baad [Nathan Kronenfeld] Fuller refactoring as intended, incorporating JR's suggestions for ThreadLocal localAccums, and keeping clear(), but also calling it in tasks' finally block, rather than just at the beginning of the task. 39a82f2 [Nathan Kronenfeld] Clear local copies of accumulators as soon as we're done with them
Diffstat (limited to 'bin/spark-shell')
0 files changed, 0 insertions, 0 deletions