-
- Downloads
[SPARK-17549][SQL] Only collect table size stat in driver for cached relation.
This reverts commit 9ac68dbc. Turns out the original fix was correct. Original change description: The existing code caches all stats for all columns for each partition in the driver; for a large relation, this causes extreme memory usage, which leads to gc hell and application failures. It seems that only the size in bytes of the data is actually used in the driver, so instead just colllect that. In executors, the full stats are still kept, but that's not a big problem; we expect the data to be distributed and thus not really incur in too much memory pressure in each individual executor. There are also potential improvements on the executor side, since the data being stored currently is very wasteful (e.g. storing boxed types vs. primitive types for stats). But that's a separate issue. Author: Marcelo Vanzin <vanzin@cloudera.com> Closes #15304 from vanzin/SPARK-17549.2.
Showing
- sql/core/src/main/scala/org/apache/spark/sql/execution/columnar/InMemoryRelation.scala 6 additions, 18 deletions...pache/spark/sql/execution/columnar/InMemoryRelation.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/columnar/InMemoryColumnarQuerySuite.scala 14 additions, 0 deletions...k/sql/execution/columnar/InMemoryColumnarQuerySuite.scala
Please register or sign in to comment